The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(release): gate the whole-build pages on one all-jobs switch
ethernet525ead7866c0
diff --git a/.github/workflows/desktop-bundled-release.yml b/.github/workflows/desktop-bundled-release.ymlindex df91661f980..20cdba6ed30 100644--- a/.github/workflows/desktop-bundled-release.yml+++ b/.github/workflows/desktop-bundled-release.yml@@ -213,6 +213,8 @@ jobs:linux-x64: ${{ steps.admission.outputs.linux-x64 }}linux-arm64: ${{ steps.admission.outputs.linux-arm64 }}termux: ${{ steps.admission.outputs.termux }}+ # Every group selected: the joins that render or summarize a whole build.+ all-jobs: ${{ steps.admission.outputs.all-jobs }}channel-build: ${{ ((inputs.disposable_channel != '' || inputs.channel != '') && steps.allocate.outputs.channel_build) || '' }}channel-request-sha256: ${{ ((inputs.disposable_channel != '' || inputs.channel != '') && steps.allocate.outputs.channel_request_sha256) || '' }}disposable-run: ${{ (inputs.disposable_channel != '' && github.run_id) || inputs.disposable_run || '' }}@@ -2061,7 +2063,8 @@ jobs:builds-pending:name: Mark the builds table as in progressneeds: validate- if: inputs.build_commit == '' && inputs.upload_release == true && needs.validate.outputs.termux == 'true'+ # Pairs with builds-table: a pending page nothing finalizes must not be written.+ if: inputs.build_commit == '' && inputs.upload_release == true && needs.validate.outputs.all-jobs == 'true'runs-on: ubuntu-24.04steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2@@ -2106,10 +2109,7 @@ jobs:if: |always() && inputs.build_commit == '' && inputs.channel == '' && inputs.upload_release == true && inputs.release-phase == ''&& needs.validate.result == 'success' && needs.validate.outputs.sha != ''- && needs.validate.outputs.darwin-arm64 == 'true' && needs.validate.outputs.darwin-x64 == 'true'- && needs.validate.outputs.win32-arm64 == 'true' && needs.validate.outputs.win32-x64 == 'true'- && needs.validate.outputs.win32-bundle == 'true' && needs.validate.outputs.termux == 'true'- && needs.validate.outputs.linux-x64 == 'true' && needs.validate.outputs.linux-arm64 == 'true'+ && needs.validate.outputs.all-jobs == 'true'runs-on: ubuntu-24.04environment: release-signingsteps:@@ -2167,10 +2167,7 @@ jobs:if: |always() && inputs.build_commit != '' && inputs.channel == '' && inputs.disposable_channel == ''&& needs.validate.result == 'success' && needs.validate.outputs.sha != ''- && needs.validate.outputs.darwin-arm64 == 'true' && needs.validate.outputs.darwin-x64 == 'true'- && needs.validate.outputs.win32-arm64 == 'true' && needs.validate.outputs.win32-x64 == 'true'- && needs.validate.outputs.win32-bundle == 'true' && needs.validate.outputs.termux == 'true'- && needs.validate.outputs.linux-x64 == 'true' && needs.validate.outputs.linux-arm64 == 'true'+ && needs.validate.outputs.all-jobs == 'true'runs-on: ubuntu-24.04environment: release-signingpermissions:diff --git a/scripts/releases/job_groups.py b/scripts/releases/job_groups.pyindex 94253f82867..562f22d90cd 100644--- a/scripts/releases/job_groups.py+++ b/scripts/releases/job_groups.py@@ -71,10 +71,11 @@ def phase_jobs(selected: dict[str, bool], phase: str) -> list[str]:def main() -> None:- """Emit one `<group>=true|false` line per group for `$GITHUB_OUTPUT`."""+ """Emit one `<group>=true|false` line per group, and `all-jobs`, for `$GITHUB_OUTPUT`."""selected = parse_jobs(os.environ.get("JOBS"))for group in JOB_GROUPS:print(f"{group}={'true' if selected[group] else 'false'}")+ print(f"all-jobs={'true' if all(selected.values()) else 'false'}")if __name__ == "__main__":diff --git a/tests/scripts/test_job_groups.py b/tests/scripts/test_job_groups.pyindex 05dfe14cc1c..52913ac15c7 100644--- a/tests/scripts/test_job_groups.py+++ b/tests/scripts/test_job_groups.py@@ -58,3 +58,18 @@ def test_phase_jobs_judge_only_the_selected_groups():assert phase_jobs(every, "publish") == ["validate", "stable-publish", "stable-store"]with pytest.raises(ValueError, match="Unknown release phase"):phase_jobs(every, "promote")++[email protected]("jobs, expected", [(None, "true"), ("termux", "false"),+ ("darwin-arm64,darwin-x64", "false")])+def test_admission_emits_all_jobs_only_for_a_full_selection(monkeypatch, capsys, jobs, expected):+ from scripts.releases import job_groups++ if jobs is None:+ monkeypatch.delenv("JOBS", raising=False)+ else:+ monkeypatch.setenv("JOBS", jobs)+ job_groups.main()+ lines = dict(line.split("=", 1) for line in capsys.readouterr().out.splitlines())+ assert lines["all-jobs"] == expected+ assert set(lines) == {*job_groups.JOB_GROUPS, "all-jobs"}