Skip to content

Improve migration integrity tests #16577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 24, 2025

Conversation

adrinr
Copy link
Collaborator

@adrinr adrinr commented Jul 17, 2025

Description

Updating the way we run the migration integrity tests to use the migrationProcessor. As the logic in there changed, with migrations and app syncs, we want to replicate the same flow.

Along the way, I realised that we are updating the createdAt/updatedAt wrongly on user sync. Fixed it and added some tests for it

@adrinr adrinr requested a review from a team as a code owner July 17, 2025 14:44
@adrinr adrinr requested review from samwho and removed request for a team July 17, 2025 14:44
Copy link

qa-wolf bot commented Jul 17, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@adrinr adrinr requested review from mike12345567 and removed request for samwho July 17, 2025 14:44
@github-actions github-actions bot added firestorm Data/Infra/Revenue Team size/m labels Jul 17, 2025
@adrinr adrinr requested a review from samwho July 17, 2025 15:27
Comment on lines 62 to 63
expect(latestDevDocs).toEqual(devDocs)
expect(latestProdDocs).toEqual(prodDocs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these valid assertions? Aren't migrations by definition going to change some documents?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what this test is testing. Each migration should be idempotent, and you should be able to run it multiple times. If it succeeded once, subsequent runs should not change anything (as everything is migrated already). I renamed the variables to make it more verbose

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh I totally misunderstood, the rename is much better. Thank you 🙏

@adrinr adrinr requested a review from samwho July 24, 2025 08:18
@adrinr adrinr merged commit 4a22ce8 into master Jul 24, 2025
31 checks passed
@adrinr adrinr deleted the chore/improve-migration-integrity-tests branch July 24, 2025 08:53
@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
firestorm Data/Infra/Revenue Team size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants