From 491d4d9863a560afe9f9aaec7d01069f72063226 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 14 Oct 2026 09:28:04 -0700 Subject: [PATCH] Remove retired data snapshot rollout flag Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8fdf6fe0-0e03-49a2-ad0c-f84786acfdd8 --- .../pull-request-dashboard/WEBHOOK_SETUP.md | 36 ++++++++----------- .../test_data_snapshots.py | 8 +++-- .../test_owned_execution.py | 4 +-- .../pull-request-dashboard/test_rollout.py | 8 ++--- .../github-actions-queue-collector.yml | 2 -- .../pull-request-dashboard-drain.yml | 1 - ...equest-dashboard-refresh-author-nudges.yml | 1 - github-actions-queue/README.md | 7 ++-- pull-request-dashboard/README.md | 6 ++-- 9 files changed, 32 insertions(+), 41 deletions(-) diff --git a/.github/scripts/pull-request-dashboard/WEBHOOK_SETUP.md b/.github/scripts/pull-request-dashboard/WEBHOOK_SETUP.md index 9c384ab9fd7c..d58bea133a6a 100644 --- a/.github/scripts/pull-request-dashboard/WEBHOOK_SETUP.md +++ b/.github/scripts/pull-request-dashboard/WEBHOOK_SETUP.md @@ -345,8 +345,7 @@ Target input rules: These operations change production behavior and require operator approval. Do not promote a release or cancel unrelated runs as part of execution retirement. -Retirement preserves stable `v0.20.0` at -`cb9f45f0b1ec545091caca504fc3e9b073284325`. +Execution retirement does not change the stable release pin. It removes the direct-dispatch and return-to-legacy execution paths, not stored data compatibility. Existing GitHub comments, nudge episodes, delivery receipts, and accepted-state JSON remain intact. Schema 1 PR/head refresh records remain @@ -361,8 +360,7 @@ contract. In-flight owned workers can finish during deployment. The main-branch merge automatically deploys the bridge using the repository's execution mode. After deployment, remove obsolete `PR_DASHBOARD_QUEUE_MODE` -Netlify values. Keep `DATA_BRANCH_SNAPSHOTS=true` and its owned-worker environment -injection while stable processors remain pinned to v0.20.0. Keep existing queued +Netlify values. Keep existing queued items, request IDs, generations, control items, and completion receipts in their shards. No migration, deletion, release, or promotion is needed. @@ -416,8 +414,7 @@ There is no supported `legacy` mode after retirement. Recover execution problems while paused or roll forward. Any separate processor-code rollback must respect the accepted-state and delivery-version guards. Do not discard receipts or restore old Git history to make older code publish. Data storage remains -snapshot-only; keep `DATA_BRANCH_SNAPSHOTS=true` and its workflow environment -injection while pinned v0.20.0 processors remain. +permanently snapshot-only. ### Manual maintenance @@ -464,22 +461,17 @@ history appended after a snapshot, including in a fresh checkout. The collector fetches full history for heads without snapshot metadata so the writer can detect appended history even when its initial fetch was shallow. -### Pinned processor transition - -The current helper is unconditionally snapshot-only and does not read -`DATA_BRANCH_SNAPSHOTS`. Pinned v0.20.0 processors still use that variable to -select the snapshot protocol. Keep the repository variable `true` and keep -passing it into every workflow and processor that can run those older writers, -including both owned-drain lanes and author reminder sweeps. -Keeping the repository variable alone is not enough if environment injection -is removed. - -Remove this environment wiring only in a later change, after releasing and -promoting the unconditional helper and retiring older writers. Verify every -stable and canary processor ref and every remaining maintenance entry point -before removal. Do not rerun older workflow attempts that lack snapshot support. -This storage cleanup does not change stable/canary selection or release pins -and does not require another compaction or data migration. +### Retired rollout flag + +The unconditional snapshot helper is released and promoted, and older writers +have retired. Workflows and processors no longer require +`DATA_BRANCH_SNAPSHOTS`. After the workflow environment cleanup is merged, +the obsolete repository variable can be deleted without weakening snapshot +safety. Do not rerun older workflow attempts or roll back to processors that +require the flag. + +This cleanup does not change stable/canary selection or release pins. It needs +no pause, release, promotion, compaction, or data migration. ### Recovery and clone size diff --git a/.github/scripts/pull-request-dashboard/test_data_snapshots.py b/.github/scripts/pull-request-dashboard/test_data_snapshots.py index 31b8a3c12952..187868749261 100644 --- a/.github/scripts/pull-request-dashboard/test_data_snapshots.py +++ b/.github/scripts/pull-request-dashboard/test_data_snapshots.py @@ -280,8 +280,12 @@ def test_commit_rejects_history_appended_to_snapshot(self) -> None: def test_environment_variable_has_no_effect_on_writes_or_fetches(self) -> None: expected = self.legacy - for generation, value in enumerate(("", "false", "true", "yes"), start=1): - with self.subTest(value=value), patch.dict(os.environ, {"DATA_BRANCH_SNAPSHOTS": value}): + for generation, value in enumerate((None, "", "false", "true", "yes"), start=1): + with self.subTest(value=value), patch.dict(os.environ): + if value is None: + os.environ.pop("DATA_BRANCH_SNAPSHOTS", None) + else: + os.environ["DATA_BRANCH_SNAPSHOTS"] = value (self.worker / "jobs.json").write_text(f'{{"jobs":[{generation}]}}\n', encoding="utf-8") accepted = self.snapshot(self.worker, expected) self.assertEqual(generation, state_branch.snapshot_generation(accepted, self.worker)) diff --git a/.github/scripts/pull-request-dashboard/test_owned_execution.py b/.github/scripts/pull-request-dashboard/test_owned_execution.py index 7d07d56ef398..e76d3af34ff9 100644 --- a/.github/scripts/pull-request-dashboard/test_owned_execution.py +++ b/.github/scripts/pull-request-dashboard/test_owned_execution.py @@ -287,7 +287,7 @@ def test_stable_claims_are_processed_not_dispatched_and_use_current_config(self) {"itemKey": claim.item_key, "outcome": "success"}, ])) as process, mock.patch.object(drain_queue, "acknowledge_results"), - mock.patch.dict(os.environ, {"DATA_BRANCH_SNAPSHOTS": "true"}, clear=True), + mock.patch.dict(os.environ, {"TEST_PROCESSOR_ENV": "inherited"}, clear=True), ): drain_queue.process_claim_wave( [claim], result_path, client, 1, "worker", token_client, @@ -302,7 +302,7 @@ def test_stable_claims_are_processed_not_dispatched_and_use_current_config(self) # Omitting config_path deliberately uses the current worker's configuration. self.assertNotIn("config_path", process.call_args.kwargs) self.assertNotIn("PR_DASHBOARD_PRIVATE_KEY", process.call_args.kwargs["processor_env"]) - self.assertEqual(process.call_args.kwargs["processor_env"]["DATA_BRANCH_SNAPSHOTS"], "true") + self.assertEqual(process.call_args.kwargs["processor_env"]["TEST_PROCESSOR_ENV"], "inherited") def test_owned_wave_requires_an_isolated_checkout_before_processing(self) -> None: claim = Claim("example#pr:1", 1, "example", 1, "", 0) diff --git a/.github/scripts/pull-request-dashboard/test_rollout.py b/.github/scripts/pull-request-dashboard/test_rollout.py index 1f5d38bddffe..f159adffdd85 100644 --- a/.github/scripts/pull-request-dashboard/test_rollout.py +++ b/.github/scripts/pull-request-dashboard/test_rollout.py @@ -76,11 +76,11 @@ def test_owned_drain_keeps_lane_ownership_and_immutable_canary_source(self) -> N self.assertEqual(json.loads(canary.group(1)), ["opentelemetry-java-instrumentation", "shared-workflows"]) self.assertTrue(set(json.loads(canary.group(1))) <= configured) - def test_snapshot_environment_remains_available_to_pinned_processors(self) -> None: - for path in (DRAIN_WORKFLOW, SWEEP_WORKFLOW, WORKFLOWS / "github-actions-queue-collector.yml"): + def test_workflows_do_not_depend_on_retired_snapshot_flag(self) -> None: + for path in WORKFLOWS.glob("*.yml"): with self.subTest(workflow=path.name): - self.assertIn( - "DATA_BRANCH_SNAPSHOTS: ${{ vars.DATA_BRANCH_SNAPSHOTS }}", + self.assertNotIn( + "DATA_BRANCH_SNAPSHOTS", path.read_text(encoding="utf-8"), ) diff --git a/.github/workflows/github-actions-queue-collector.yml b/.github/workflows/github-actions-queue-collector.yml index a68d9d18b76b..443fe5622579 100644 --- a/.github/workflows/github-actions-queue-collector.yml +++ b/.github/workflows/github-actions-queue-collector.yml @@ -60,7 +60,6 @@ jobs: id: data env: DATA_BRANCH_README: .github/scripts/github-actions-queue/DATA_BRANCH_README.md - DATA_BRANCH_SNAPSHOTS: ${{ vars.DATA_BRANCH_SNAPSHOTS }} run: | set -euo pipefail data_dir="$RUNNER_TEMP/github-actions-queue-data" @@ -150,7 +149,6 @@ jobs: CURSOR: ${{ steps.collect.outputs.cursor }} DATA_DIRECTORY: ${{ steps.data.outputs.directory }} EXPECTED_SHA: ${{ steps.data.outputs.expected_sha }} - DATA_BRANCH_SNAPSHOTS: ${{ vars.DATA_BRANCH_SNAPSHOTS }} GITHUB_TOKEN: ${{ github.token }} run: | set -euo pipefail diff --git a/.github/workflows/pull-request-dashboard-drain.yml b/.github/workflows/pull-request-dashboard-drain.yml index a99289ff2884..52d439c90d1a 100644 --- a/.github/workflows/pull-request-dashboard-drain.yml +++ b/.github/workflows/pull-request-dashboard-drain.yml @@ -31,7 +31,6 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 50 env: - DATA_BRANCH_SNAPSHOTS: ${{ vars.DATA_BRANCH_SNAPSHOTS }} DISPATCHER_GENERATION: ${{ inputs.dispatcher_generation }} PR_DASHBOARD_QUEUE_LANE: ${{ inputs.queue_lane || 'live' }} PR_DASHBOARD_QUEUE_ENDPOINT: https://otel-pull-request-dashboard.netlify.app/.netlify/functions/dashboard-queue-worker diff --git a/.github/workflows/pull-request-dashboard-refresh-author-nudges.yml b/.github/workflows/pull-request-dashboard-refresh-author-nudges.yml index 05d7961025b6..5f2f2f82c265 100644 --- a/.github/workflows/pull-request-dashboard-refresh-author-nudges.yml +++ b/.github/workflows/pull-request-dashboard-refresh-author-nudges.yml @@ -21,7 +21,6 @@ on: permissions: {} env: - DATA_BRANCH_SNAPSHOTS: ${{ vars.DATA_BRANCH_SNAPSHOTS }} DASHBOARD_CONFIG: .github/scripts/pull-request-dashboard/repositories.json DASHBOARD_STATE_BRANCH_PREFIX: otelbot/pull-request-dashboard-state diff --git a/github-actions-queue/README.md b/github-actions-queue/README.md index c89162617b19..a9c69d79c5c6 100644 --- a/github-actions-queue/README.md +++ b/github-actions-queue/README.md @@ -10,10 +10,9 @@ Data writers always retain only the latest parentless Git snapshot of the data branch. All historical job measurements in the current files, collection checkpoints, and report inputs remain intact. -Keep `DATA_BRANCH_SNAPSHOTS=true` and its workflow environment injection for -pinned v0.20.0 dashboard processors until unconditional snapshot code is -released and promoted and older writers have retired. The current helper ignores -the variable. See the +The snapshot protocol is unconditional and no longer needs +`DATA_BRANCH_SNAPSHOTS`. The obsolete repository variable can be deleted after +the workflow environment cleanup is merged. See the [shared storage requirements](../.github/scripts/pull-request-dashboard/WEBHOOK_SETUP.md#7-data-branch-snapshots). The hourly collection and Pages deployment schedules do not change. diff --git a/pull-request-dashboard/README.md b/pull-request-dashboard/README.md index 5e6e9e9455cf..d691750d8711 100644 --- a/pull-request-dashboard/README.md +++ b/pull-request-dashboard/README.md @@ -20,9 +20,9 @@ containing its complete current files. The Actions queue collector uses the same snapshot protocol. The cutover preserved stored JSON and delivery receipts; it did not migrate their formats. -Keep `DATA_BRANCH_SNAPSHOTS=true` and its workflow environment injection while -pinned v0.20.0 processors still require it. The current helper ignores the -variable, but older processors do not. See the +The promoted stable processors and current canaries use unconditional snapshots. +`DATA_BRANCH_SNAPSHOTS` is no longer required, and the obsolete repository +variable can be deleted after the workflow environment cleanup is merged. See the [storage and release requirements](../.github/scripts/pull-request-dashboard/WEBHOOK_SETUP.md#7-data-branch-snapshots). Refresh schedules, notifications, and the stalled-run watchdog are unaffected.