Repository navigation
lock the lockfile - #8031
lock the lockfile#8031mikea wants to merge 1 commit into
Conversation
|
💬 Approved with comments — The Python release workflows now refresh the lockfile. One WARNING remains: the V8 update docs don't include the Findings: 1 warning · 1 info The decision is advisory: this comment never approves, blocks or requests changes on the pull request. 🔧 Fix with your agentPaste the following into your coding agent to investigate and fix these issues. 📋 Code Quality: 💬 1 infoThe Python release workflows now refresh and stage MODULE.bazel.lock, which fixes the earlier warning. Recommendation: ✅ Approve
View full reviewFixed since the last review: both Python release workflows ( This review did not check 📝 Documentation:
|
|
Since last review: 0 resolved, 1 still open, 1 new. Lockfile refreshes were added to the Python release and WPT workflows. Not re-run: docs, tests (no author changes in their files since the last review) Reviewed commit: 9ac777a1 · github run |
ddf8b60 to
19394b6
Compare
|
The generated output of |
0f30c1a to
d7e7803
Compare
4546c62 to
d776e4a
Compare
| # repository, so it is regenerated for each commit that changes the dependency | ||
| # metadata, keeping every commit buildable. The same as `just update-lockfile`. | ||
| update_lockfile='bazel build --lockfile_mode=update --nobuild //... //build/deps/formatters:rustfmt@rule' | ||
| git rebase --autostash "$bump" --exec "git diff --quiet HEAD~ HEAD -- build/deps/shared_deps.jsonc || { $update_lockfile && { git diff --quiet -- MODULE.bazel.lock || git commit --amend --no-edit MODULE.bazel.lock; }; }" |
There was a problem hiding this comment.
[BLOCKING] build/deps/gen is still an allowed agent-authored path, and this rebase runs Bazel after replaying each such commit. Root MODULE.bazel includes shared_deps.MODULE.bazel; its http.archive tags accept patch_cmds, which build/exts/http.bzl forwards to http_archive. An agent that has processed untrusted upstream content can therefore commit a generated module fragment whose repository setup runs an arbitrary patch command in this write-token job. Regenerating the lockfile after invoking Bazel does not constrain that input. Reject dependency-metadata changes before the rebase (and align the agent contract/allowlist with that policy), or generate and validate these files from trusted inputs before this invocation.
| git rebase --autostash "$bump" --exec "git diff --quiet HEAD~ HEAD -- build/deps/shared_deps.jsonc || { $update_lockfile && { git diff --quiet -- MODULE.bazel.lock || git commit --amend --no-edit MODULE.bazel.lock; }; }" | |
| # Triage commits may not modify dependency metadata before this privileged job invokes Bazel. | |
| git diff --quiet "$bump..HEAD" -- build/deps/shared_deps.jsonc build/deps/gen || { | |
| echo "::error::Triage commits must not modify dependency metadata." | |
| exit 1 | |
| } | |
| # The commits cannot carry MODULE.bazel.lock, which would let them redirect any | |
| # repository, so it is regenerated for each commit that changes the dependency | |
| # metadata, keeping every commit buildable. The same as `just update-lockfile`. |
bazel build should not change the lockfile: we should always know what we are building.
d776e4a to
9ac777a
Compare
| # python_metadata.bzl is an input of the pyodide module extension, so the lockfile has | ||
| # to change with it. The same as `just update-lockfile`. | ||
| bazel build --lockfile_mode=update --nobuild //... //build/deps/formatters:rustfmt@rule | ||
|
|
||
| # Commit and push the changes | ||
| git add build/python_metadata.bzl | ||
| git add build/python_metadata.bzl MODULE.bazel.lock |
There was a problem hiding this comment.
[BLOCKING] A snapshot update replaces its content-addressed filename in python_metadata.bzl. The Pyodide extension derives pyodide-snapshot-<filename> repository names from that value, but build/deps/pyodide.MODULE.bazel has a fixed use_repo list that its own header says bazel mod tidy maintains. Updating the lockfile alone leaves that manifest pointing at the removed repository (and omits the new one), so the new Bazel invocation or the committed snapshot update cannot resolve the extension output.
| # python_metadata.bzl is an input of the pyodide module extension, so the lockfile has | |
| # to change with it. The same as `just update-lockfile`. | |
| bazel build --lockfile_mode=update --nobuild //... //build/deps/formatters:rustfmt@rule | |
| # Commit and push the changes | |
| git add build/python_metadata.bzl | |
| git add build/python_metadata.bzl MODULE.bazel.lock | |
| # Snapshot file names determine the Pyodide extension's repository names, so refresh the | |
| # corresponding use_repo list before regenerating its lockfile entry. | |
| bazel mod tidy --lockfile_mode=update | |
| bazel build --lockfile_mode=update --nobuild //... //build/deps/formatters:rustfmt@rule | |
| # Commit and push the changes | |
| git add build/python_metadata.bzl build/deps/pyodide.MODULE.bazel MODULE.bazel.lock |
No description provided.