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

refactor: upgrade to rules_oci 2.0#63111

Merged
Strum355 merged 3 commits into
sourcegraph:mainfrom
thesayyn:upgrade_rules_oci
Jun 11, 2024
Merged

refactor: upgrade to rules_oci 2.0#63111
Strum355 merged 3 commits into
sourcegraph:mainfrom
thesayyn:upgrade_rules_oci

Conversation

@thesayyn

@thesayyn thesayyn commented Jun 5, 2024

Copy link
Copy Markdown
Contributor

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.

@cla-bot cla-bot Bot added the cla-signed label Jun 5, 2024
@thesayyn thesayyn force-pushed the upgrade_rules_oci branch from 316c12a to a764200 Compare June 11, 2024 04:10
@Strum355 Strum355 enabled auto-merge (squash) June 11, 2024 11:43
@Strum355 Strum355 merged commit c12fd6d into sourcegraph:main Jun 11, 2024
Strum355 added a commit that referenced this pull request Jun 11, 2024
jhchabran referenced this pull request Jun 11, 2024
Reverts sourcegraph/sourcegraph#63111
Issue with jobs only run on main

### Test plan

:wat:
Strum355 added a commit that 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