bazel-contrib / rules_oci

Bazel rules for building OCI containers
Apache License 2.0
305 stars 159 forks source link

warning when upgrading to 2.0.0 with distroless images #717

Closed pdeva closed 1 month ago

pdeva commented 1 month ago

i have code like this

bazel_dep(name = "rules_oci", version = "2.0.0")
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
oci.pull(
    name = "distroless_base",
    digest = "sha256:3d46a42c741d469811b95d0b6ec9d10c15ebb1be7c5eaa989d429d91b066d78c",
    image = "gcr.io/distroless/base-debian12",
    platforms = [
        "linux/amd64",
        "linux/arm64/v8",
    ],
)

use_repo(
    oci,
    "distroless_base",
)

i am getting this warning:

WARNING: /code/monorepo/MODULE.bazel:39:20: The module extension oci defined in @rules_oci//oci:extensions.bzl reported incorrect imports of repositories via use_repo():

Not imported, but reported as direct dependencies by the extension (may cause the build to fail):
    distroless_base_linux_amd64, distroless_base_linux_arm64_v8

what exactly does this mean? what is the recommended way to fix this?

thesayyn commented 1 month ago

you can run bazel mod tidy