bazel-contrib / bazel-contrib/rules_oci

FR: Syntax sugar `select` generated by oci_pull is a common pitfall.

Open
#408 1 comment 0 reactions 0 assignees View on GitHub
documentation
Dominant language
Starlark
Stars
423
Forks
213
Avg merge
53m
Merged PRs (30d)
1

Description

I have seen countless users falling into the syntax sugar `select` trap generated by oci_pull. They either miss to add a transition or expect `architecture` and `os` to on the `oci_image` do the transition automatically for them.

I have no idea how widespread the optional toolchains feature of bazel is, therefore can't say it's time to implement transitions in `oci_image_index`. i don't want users to see bunch of toolchain issues which they can't make sense of.

There should be a warning to users about the select statement doing the wrong thing if there's no transitions.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the select syntax sugar generated by oci_pull and how oci_image consumes architecture and os, then compare the role of transitions in oci_image_index and optional toolchains. The work is done when users receive a clear warning when select is used without the required transitions; the issue does not name a file or test to run.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
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.