Repository navigation
Attribute every Bazel invocation through the shared NativeLink Action - #20
Open
MarcusSorealheis wants to merge 1 commit into
Open
MarcusSorealheis wants to merge 1 commit into
MarcusSorealheis wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jobs that run multiple Bazel commands currently reuse one attribution ticket from
.bazelrc. The NativeLink backend binds a ticket to one invocation, so later builds lose their GitHub identity. This change obtains a fresh, masked ticket when each Bazel invocation starts and leaves the shared RC free of tickets.The main Action installs a launcher for ordinary
bazelcommands. A newattribution/entry point lets repositories reuse the same implementation with an existing cache/BES setup. It exposes temporary files for Bazelisk hooks and BuildKit secret mounts, removes credentials in the post step, and skips cache-only forks. The backend's one-invocation binding remains intact. Python 3 is required when attribution is enabled.NativeLink's CI adoption is tracked in TraceMachina/nativelink#2741. No backend deployment, MongoDB change, or individual contributor profile authorization is required. This PR does not change published tags; consumers can pin the reviewed commit until a release is published.
Validation
7c6a05e.run --arguments, unchanged RC contents, failure/strict behavior, malformed tickets, and credential-bearing redirect rejection.How to test
permissions: { contents: read, id-token: write }.attribution_urlto the deployment's GitHub App origin; for the attribution-only entry point, setbazelrcto the existing RC file. Install Bazel and Python 3 before running the Action.bazel build/bazel testcommands in the same job. Verify both invocation records and UI pages show the repository and workflow actor, plus the separate PR author when applicable. Repeat for a merge-triggered build.fail_on_attribution_error: truestops the invocation.Local checks:
pnpm ci-test,pnpm package, andpython3 -m unittest discover -s scripts -v.