Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

chore: upgrade to latest rules_oci 1.x#63085

Merged
Strum355 merged 1 commit intosourcegraph:mainfrom
thesayyn:update_rules_oci
Jun 5, 2024
Merged

chore: upgrade to latest rules_oci 1.x#63085
Strum355 merged 1 commit intosourcegraph:mainfrom
thesayyn:update_rules_oci

Conversation

@thesayyn
Copy link
Contributor

@thesayyn thesayyn commented Jun 4, 2024

Upgrades rules_oci from 1.4.3 to 1.7.6, the latest 1.x release of rules_oci before upgrading to rules_oci 2.x. Upgrading directly from 1.4.3 to 2.0.0 is big a jump, because a lot has changed in between.

Test plan

I don't expect any breaking changes. Also, I am assuming the repo already has a test coverage for containers built with rules_oci.

Changelog

@cla-bot
Copy link

cla-bot bot commented Jun 4, 2024

We require contributors to sign our Contributor License Agreement (CLA), and we don't have yours on file. In order for us to review and merge your code, please sign CLA to get yourself added.

Sourcegraph teammates should refer to Accepting contributions for guidance.

@thesayyn thesayyn force-pushed the update_rules_oci branch from f374e9a to 6f59c7f Compare June 4, 2024 20:05
@cla-bot
Copy link

cla-bot bot commented Jun 4, 2024

We require contributors to sign our Contributor License Agreement (CLA), and we don't have yours on file. In order for us to review and merge your code, please sign CLA to get yourself added.

Sourcegraph teammates should refer to Accepting contributions for guidance.

Signed-off-by: thesayyn <thesayyn@gmail.com>
@thesayyn thesayyn force-pushed the update_rules_oci branch from 6f59c7f to 666cf76 Compare June 4, 2024 20:06
@cla-bot
Copy link

cla-bot bot commented Jun 4, 2024

We require contributors to sign our Contributor License Agreement (CLA), and we don't have yours on file. In order for us to review and merge your code, please sign CLA to get yourself added.

Sourcegraph teammates should refer to Accepting contributions for guidance.

@Strum355
Copy link
Contributor

Strum355 commented Jun 5, 2024

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Jun 5, 2024
@cla-bot
Copy link

cla-bot bot commented Jun 5, 2024

The GitHub CLA Bot is rechecking to see that you have signed the CLA - note that it may take up to 30 minutes for your response to be synchronized.

@Strum355 Strum355 enabled auto-merge (squash) June 5, 2024 14:34
@Strum355 Strum355 merged commit 1425097 into sourcegraph:main Jun 5, 2024
Strum355 referenced this pull request Jun 11, 2024
Follow up https://github.com/sourcegraph/sourcegraph/pull/63085

rules_oci 2.0 brings a lot of performance improvement around oci_image
and oci_pull, which will benefit sourcegraph. It will also make RBE
faster and have less load on remote cache.

However, 2.0 makes some breaking changes like 

- oci_tarball's default output is no longer a tarball
- oci_image no longer compresses layers that are uncompressed, somebody
has to make sure all `pkg_tar` targets have a `compression` attribute
set to compress it beforehand.
- there is no curl fallback, but this is fine for sourcegraph as it
already uses bazel 7.1.

I checked all targets that use oci_tarball as much as i could to make
sure nothing depends on the default tarball output of oci_tarball. there
was one target which used the default output which i put a TODO for
somebody else (somebody who is more on top of the repo) to tackle later.

## Test plan

I am assuming that the repo has enough tests to catch potential problems
on CI. Also somebody who knows the repo better should double check my
changes.

---------

Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch>
Strum355 referenced this pull request Aug 7, 2024
2nd attempt of #63111, a follow up
https://github.com/sourcegraph/sourcegraph/pull/63085

rules_oci 2.0 brings a lot of performance improvement around oci_image
and oci_pull, which will benefit Sourcegraph. It will also make RBE
faster and have less load on remote cache.

However, 2.0 makes some breaking changes like

- oci_tarball's default output is no longer a tarball
- oci_image no longer compresses layers that are uncompressed, somebody
has to make sure all `pkg_tar` targets have a `compression` attribute
set to compress it beforehand.
- there is no curl fallback, but this is fine for sourcegraph as it
already uses bazel 7.1.

I checked all targets that use oci_tarball as much as i could to make
sure nothing depends on the default tarball output of oci_tarball. there
was one target which used the default output which i put a TODO for
somebody else (somebody who is more on top of the repo) to tackle
**later**.

## Test plan

CI. Also run delivery on this PR (don't land those changes)

---------

Co-authored-by: Noah Santschi-Cooney <noah@santschi-cooney.ch>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants