Skip to content

Fix invalid deploy tokens on staging

What does this MR do and why?

Fix invalid deploy tokens on staging

Re-executes the project deploy token update from the BackfillDeployTokensShardingKey background migration, to fix a small number of invalid records that were created after the migration ran.

Staging has a total of a few hundred deploy tokens, with four to be fixed by this migration.

I originally attempted to fix these records in !202543 (merged), however this didn't work because the migration was accidentally skipped in staging (Gitlab.com? returns true in staging 🤦). To avoid creating another incident this MR will only fix the invalid records, and I'll add the constraint separately once I've confirmed there are no invalid records remaining.

The migration is skipped in the testing pipeline, but the query and indicative timings can be found in !163122 (comment 2058937897) (see the Background Migration: BackfillDeployTokensShardingKey section), which is the testing pipeline for the background migration this query was taken from (previously there was a temporary index in place to support the batching query, however we shouldn't need one this time as the table has such a small total number of records).

References

#477395 (closed)

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Tiger Watson

Merge request reports

Loading