bazel-contrib / bazel-contrib/rules_oci

FR: support automatically passing digest to the underlying oci_pull under bzlmod

Open
#538 2 comments 0 reactions 0 assignees View on GitHub
enhancement need: discussion
Dominant language
Starlark
Stars
423
Forks
213
Avg merge
53m
Merged PRs (30d)
1

Description

I am writing some automation that generates a lot of `oci.pull` calls in the `MODULE.bazel` and I would like to only need to specify the `tag` to the `oci.pull` rule but I would like `rules_oci` to get the `digest` within the context of the module extension and pass it to the underlying `oci.pull` rule so that the `digest` is recorded in the `MODULE.bazel.lock` file and I can benefit from caching within my code. This could also help with other automation that works mainly with tags.

Let me know if you would like me to explain more about my usecase.

Potentially related #510.

Contributor guide

Open the contributing guide

Research direction

Read the module-extension path that implements oci.pull and the bzlmod lockfile behavior; the issue names MODULE.bazel and MODULE.bazel.lock but no source file or test. Reproduce a generated tag-only oci.pull call and verify that the resulting lock file records a digest and supports the requested caching behavior.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.