Story #2609 :: Task: Run the achievement backfill from the weekly release pipeline - #2613
Open
herzog0 wants to merge 2 commits into
Open
Story #2609 :: Task: Run the achievement backfill from the weekly release pipeline#2613herzog0 wants to merge 2 commits into
herzog0 wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
9 tasks
herzog0
force-pushed
the
teo/2541-release-pipeline-backfill
branch
from
August 13, 2026 14:44
c078f65 to
7a33de9
Compare
herzog0
force-pushed
the
teo/2541-release-pipeline-backfill
branch
from
August 14, 2026 15:26
7a33de9 to
6b42a49
Compare
herzog0
force-pushed
the
teo/2541-release-pipeline-backfill
branch
from
August 14, 2026 19:57
6b42a49 to
a4ecd9c
Compare
herzog0
force-pushed
the
teo/2541-release-pipeline-backfill
branch
3 times, most recently
from
August 17, 2026 17:22
eed9dd2 to
efc6942
Compare
herzog0
force-pushed
the
teo/2541-release-pipeline-backfill
branch
from
August 17, 2026 20:21
efc6942 to
19bcbea
Compare
herzog0
force-pushed
the
teo/2541-release-pipeline-backfill
branch
2 times, most recently
from
August 18, 2026 14:28
b5c189f to
bce0901
Compare
herzog0
force-pushed
the
teo/2541-release-pipeline-backfill
branch
from
August 21, 2026 14:48
bce0901 to
ed9c3ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #2609
teo/2541-source-library-reviewSummary & Context
Lets the achievement backfill run unattended. This is deliberately the last step of the ingestion
half: by now every source is wired and reviewed, and the previous eight PRs can all be exercised
by hand first.
Changes
release_tasks: aBackfilling achievementsaction, last in the list, so every source itreads has already been refreshed by the steps above it.
update_authors_and_maintainers: backfills only the three sources whose upstream data thattask just changed (
library-authoring,library-maintenance,library-versioning). A blanketbackfill would also sweep the commit and review tables it never touches.
update_commits: a comment recording why there is deliberately no backfill call there - itruns as a step of
release_tasks, which sweeps everything once at the end, so calling it heretoo would walk the whole
Committable twice per release.libraries/tests/test_tasks.py: three tests asserting the wiring, which was previously threeuntested
call_commandlines.Everything it runs is additive -
backfill_achievementsissync_sourcewithremove=Falseand cannot delete a grant or revoke a badge - so the failure mode is over-granting, not
data loss.
set. It must be settled before this runs for real, because backfill
awards badges against whatever thresholds are live at that moment, and lowering a threshold
afterwards is easy while raising one is not (retiring and replacing a tier keeps the members who
already met the old number). Tracked by the threshold-confirmation ticket.
a few seconds against a full copy of the Boost data.
going rather than failing the release job. Only an explicitly named missing source is fatal.
Screenshots
n/a - no UI.
Peer-review testing steps
This PR adds no UI of its own; what it changes is what three existing admin buttons do afterwards, and
the sync run log is where you see it. Setup:
just load_production_data,just migrate,docker compose up, and note the current last row id on/admin/badges/achievementsyncrun/so you cantell new rows from old ones.
/admin/libraries/library/-> Update Authors & Maintainers. When theworker finishes,
/admin/badges/achievementsyncrun/has exactly three new rows -library-authoring,library-maintenance,library-versioning- and nocode-commitsorlibrary-reviewrow. That absence is the review: this task only touches library authorship, so ablanket backfill would walk the commit and review tables for nothing.
commandwith no actor, because the libraries changelist buttons are the eightlegacy GET views that were deliberately left unconverted. Worth knowing when reading the log; not
something this PR changes.
/admin/libraries/commit/-> Update Commits. No new sync run rowappears. That is intentional and commented in the code: this task also runs as a step of
release_tasks, which sweeps everything once at the end, so backfilling here too would walk thewhole
Committable twice per release./admin/libraries/releasereport/-> Get Release Report Data, which is therelease_tasksentry point. Only against a scratch database with GitHub credentials configured: itimports versions, libraries, commits, issues, Slack and mailing-list data first, and its own tooltip
warns it can take hours. When it lands, the log has one row per source with trigger pipeline, all
timestamped after the import steps. Ordering matters - a backfill that ran before the imports would
grant against yesterday's data, which is why it is the last action in the list.
changed only ever counts additions. Then filter
/admin/badges/userbadge/to Revoked andconfirm nothing was revoked while the pipeline ran.
backfill_achievementsissync_sourcewithremove=False, so the failure mode here is over-granting, never data loss./admin/badges/badge/- the ladder column then reads No tiers - awards nothing - and runUpdate Authors & Maintainers again. Grants are still recorded, no badge is awarded, and the
other sources complete normally. (The stronger case, a source whose
Achievementrow is missingentirely, is not reachable from the admin on purpose: achievement deletion is refused. It is covered
in tests, and the behaviour is stderr-and-continue so a taxonomy mistake cannot kill the release job.)
/admin/badges/badge/andconfirm each one is the number the client intends. The sweep awards against whatever is live at that
moment, and lowering a threshold later is easy while raising one is not.