bazel-contrib / bazel-contrib/rules_img

Allow producing Bazel-tracked layer blob on demand when compact layers are enabled

Closed
#694 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
136
Forks
46
Avg merge
7h 11m
Merged PRs (30d)
33

Description

Currently, when compact layers are enabled, rules_img refuses to produce an oci layout for images that include such a layer.
Add a new flag that:
- allows using compact layers in oci layout and similar downstream artifacts
- adds a new action into all layer rules that will provide the `File` in the `blob` field of SingleLayerInfo

This means: the new action is only run if any downstream consumer needs it.
We should document the cost of this clearly.

[Slack thread](https://bazelbuild.slack.com/archives/CA3NW13MH/p1785961379031419?thread_ts=1782772343.038829&channel=CA3NW13MH&message_ts=1785961379.031419)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the layer rules and SingleLayerInfo, then follow how compact layers are rejected for an OCI layout and how downstream artifacts request layer data. Define the new flag and lazy blob-producing action across the layer rules, and document its cost; done means compact layers work for OCI and similar consumers without running the action unnecessarily.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.