I encountered two issues when upgrading to rules_oci 2.x. The same issues were also raised on Bazel Slack here.
@rules_oci//oci:repositories.bzl no longer exports a LATEST_CRANE_VERSION variable. I refactored repositories.bzl and extracted toolchain-related stuff used by the bzlmod extension to a new toolchains.bzl. repositories.bzl still requires LATEST_CRANE_VERSION, but it's no longer loaded by the bzlmod extension, so doesn't cause failures.
oci_push no longer depends on the yq toolchain. I've updated push_oci_rule to explicitly depend on the yq toolchain in addition to whatever else the underlying oci_push implementation depends on.
I encountered two issues when upgrading to
rules_oci
2.x. The same issues were also raised on Bazel Slack here.@rules_oci//oci:repositories.bzl
no longer exports aLATEST_CRANE_VERSION
variable. I refactoredrepositories.bzl
and extracted toolchain-related stuff used by the bzlmod extension to a newtoolchains.bzl
.repositories.bzl
still requiresLATEST_CRANE_VERSION
, but it's no longer loaded by the bzlmod extension, so doesn't cause failures.oci_push
no longer depends on theyq
toolchain. I've updatedpush_oci_rule
to explicitly depend on theyq
toolchain in addition to whatever else the underlyingoci_push
implementation depends on.