Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 14 additions & 22 deletions .github/scripts/pull-request-dashboard/WEBHOOK_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions .github/scripts/pull-request-dashboard/test_rollout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
)

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/github-actions-queue-collector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pull-request-dashboard-drain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 3 additions & 4 deletions github-actions-queue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions pull-request-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Loading