Skip to content

Commit 1e7a880

Browse files
authored
Remove completed queue-record migration (#465)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a86c6ad-177f-4cc3-a518-62e99a74dedb
1 parent f678cd1 commit 1e7a880

4 files changed

Lines changed: 3 additions & 336 deletions

File tree

‎.github/scripts/github-actions-queue/migrate_queue_records.py‎

Lines changed: 0 additions & 110 deletions
This file was deleted.

‎.github/scripts/github-actions-queue/test_migrate_queue_records.py‎

Lines changed: 0 additions & 178 deletions
This file was deleted.

‎.github/workflows/github-actions-queue-collector.yml‎

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -87,41 +87,11 @@ jobs:
8787
echo "directory=$data_dir" >> "$GITHUB_OUTPUT"
8888
echo "expected_sha=$expected_sha" >> "$GITHUB_OUTPUT"
8989
90-
- name: Remove records without measurable queue time
91-
id: migration
92-
env:
93-
DATA_DIRECTORY: ${{ steps.data.outputs.directory }}
94-
run: |
95-
set -euo pipefail
96-
marker="$DATA_DIRECTORY/migrations/remove-unmeasurable-jobs-v1.json"
97-
performed=false
98-
if [[ -f "$marker" ]]; then
99-
summary='{"files_changed":0,"files_scanned":0,"negative_queue_records_removed":0,"records_removed":0,"records_scanned":0,"runnerless_records_removed":0}'
100-
else
101-
summary=$(
102-
python3 .github/scripts/github-actions-queue/migrate_queue_records.py \
103-
--jobs-dir "$DATA_DIRECTORY/jobs"
104-
)
105-
mkdir -p "$(dirname "$marker")"
106-
jq . <<< "$summary" > "$marker"
107-
performed=true
108-
fi
109-
echo "$summary" | jq .
110-
{
111-
echo "### Queue record migration"
112-
echo
113-
echo '```json'
114-
echo "$summary" | jq .
115-
echo '```'
116-
} >> "$GITHUB_STEP_SUMMARY"
117-
echo "performed=$performed" >> "$GITHUB_OUTPUT"
118-
11990
- name: Collect completed jobs
12091
id: collect
12192
env:
12293
GH_TOKEN: ${{ steps.collector-token.outputs.token }}
12394
DATA_DIRECTORY: ${{ steps.data.outputs.directory }}
124-
MIGRATION_PERFORMED: ${{ steps.migration.outputs.performed }}
12595
MAX_WINDOWS: ${{ inputs.max_windows }}
12696
run: |
12797
set -euo pipefail
@@ -130,10 +100,6 @@ jobs:
130100
echo "::error::max_windows must be between 1 and 20"
131101
exit 1
132102
fi
133-
max_runtime_seconds=2400
134-
if [[ "$MIGRATION_PERFORMED" == "true" ]]; then
135-
max_runtime_seconds=1800
136-
fi
137103
summary=$(
138104
python3 .github/scripts/github-actions-queue/collect.py \
139105
--state "$DATA_DIRECTORY/state.json" \
@@ -145,7 +111,7 @@ jobs:
145111
--max-windows "$max_windows" \
146112
--max-workers 4 \
147113
--max-requests 12000 \
148-
--max-runtime-seconds "$max_runtime_seconds"
114+
--max-runtime-seconds 2400
149115
)
150116
echo "$summary" | jq .
151117
{
@@ -163,13 +129,8 @@ jobs:
163129
- name: Build queue report
164130
env:
165131
DATA_DIRECTORY: ${{ steps.data.outputs.directory }}
166-
MIGRATION_PERFORMED: ${{ steps.migration.outputs.performed }}
167132
run: |
168133
set -euo pipefail
169-
if [[ "$MIGRATION_PERFORMED" == "true" ]]; then
170-
rm -f "$DATA_DIRECTORY/report-state.json.gz"
171-
rm -rf "$DATA_DIRECTORY/report-data"
172-
fi
173134
summary=$(
174135
python3 .github/scripts/github-actions-queue/report.py \
175136
--jobs-dir "$DATA_DIRECTORY/jobs" \

‎github-actions-queue/README.md‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,6 @@ These limits leave room below the App's 15,000-request hourly quota and the
114114
workflow's 50-minute timeout. A stopped run commits its records and checkpoints
115115
before the next schedule resumes it.
116116

117-
When a run performs the one-time migration, collection has a 30-minute limit
118-
to leave time for the migration, full report rebuild, and data-branch push
119-
within the workflow timeout. Later runs use the normal 40-minute limit.
120-
121117
Runs that have not reached a terminal state are saved in `state.json`. Later
122118
collections revisit them and emit their jobs only after every returned job is
123119
terminal. Job listing uses `filter=all`, so actual executions from every
@@ -127,10 +123,8 @@ created by partial reruns are not stored.
127123
The collector tracks the installation's REST quota. If it exhausts the quota,
128124
it commits the partial checkpoint and resumes during the next scheduled run.
129125

130-
The one-time data migration streams collection files and validates them before
131-
removing runnerless and negative-queue records. It retains job IDs and
132-
per-file counts during validation, then records completion under
133-
`migrations/` on the data branch.
126+
The completed runnerless and negative-queue cleanup is recorded in
127+
`migrations/remove-unmeasurable-jobs-v1.json` on the data branch.
134128

135129
GitHub limits a filtered workflow-run search to 1,000 results. The collector
136130
splits busy one-hour windows into smaller ranges until each result can be

0 commit comments

Comments
 (0)