Repository navigation
prebuilt guard: root the lock, audit and security tools dx commands run, from one list (part of #14064) - #14078
TrapsterDK wants to merge 1 commit into
Conversation
…un, from one list (part of #14064) Each <lang>/lang.json now lists the rules_dx targets dx commands run for it under `commands`, and dx_families holds the language-independent ones (generate, cosign, gitleaks, trivy, :dx) in COMMAND_TARGETS. dx update, dx audit, dx security and dx upgrade read their labels from there, and a dx_families test fails when a shipped source spells one inline. command_roots now takes the guarded languages, so the nested and in-graph prebuilt guards root the shared targets plus the commands of their languages. Also clears three clippy findings in touched files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The Generated by Claude Code |
|
The
Generated by Claude Code |
|
The failures in shards 10, 15, 24, 25 and 26 also come from main. I reran the shard 10, 15 and 24 failures and
Generated by Claude Code |
|
The failures in shards 0, 4 and 11 also come from main. I reran the shard 4 and shard 11
Not rerun: Generated by Claude Code |
|
Shard 22 fails only Generated by Claude Code |
|
Shard 8 fails three Generated by Claude Code |
|
Shard 12 fails Generated by Claude Code |
|
Shard 13 fails only Generated by Claude Code |
|
Superseded by #14081. |
Closes #14064
<lang>/lang.jsonnow has acommandslist: therules_dxtargets that dx commands run for that language. It covers go, elixir, erlang, perl, swift, ocaml, dart, php and julia. The schema and thefamilies_languages.jsonprojection carry it.dx_familiesaddsCOMMAND_TARGETS: generate, generate_check, cosign, gitleaks, trivy and:dx, each with a*_LABELconstant. It also addslanguage_commandsandcommand_label.dx_plan's ownCOMMAND_TARGETSand generate constants are removed;generate_targetreads fromdx_families.dx update(backend.rs, composer, julia, update_live, update_outdated),dx audit(gitleaks),dx security(trivy, cosign) anddx upgrade(:dx) read their labels from that list. A missing language command becomesBackendError::MissingCommand(lang_commands, infra) instead of a panic.secrets::RESOLVE_COMMANDis nowresolve_command()and is built from the label.dx_families_testgainsno_shipped_source_spells_a_command_label_inline. It fails when a shipped source incli/update,cli/cli,cli/auditorcli/exec_auditspells a command label inline.command_roots(repo, langs)returns the shared targets plus thecommandsof the guarded languages. The nested guard passes its languages. The in-graph guard now roots them next tocheckanddocsfor each language.needless_option_as_derefand twostring_add.Tested:
//cli/families:dx_families_test,//cli/update:dx_update_test,//cli/audit:dx_audit_test,//cli/exec_audit:dx_exec_audit_test,//cli/cli:dx_cli_test,//core/modules:lang_json_test,//core/modules:lang_projections_test,//tools/testing/consumer:prebuilt_guard_lib_testand//tools/testing/consumer:in_graph_prebuilt_guard_testpassed.tools/dx check --apply <touched files>is clean.Not passing locally:
//cli/plan:dx_plan_testhas 2 failures (every_family_with_shard_aspects_has_a_probe_for_that_capability,go_only_consumer_selects_core_and_go). The same 2 fail on main without this diff.//tools/testing/consumer:go_prebuilt_guard_testcould not run in the cloud container: the nested Bazel fails a TLS check (PKIX) when it downloadsaran/rules_flutterthrough the proxy.Left as draft until CI runs the nested go and java prebuilt guards. If a newly rooted target (cosign,
:dx, gitleaks, trivy,go/private/tools:go) compiles a rules_dx binary there, it needs an allowlist line with a reason, or its asset wired.Generated by Claude Code