[Feature:System] Verify migration datestamps#12474
Conversation
|
Thanks @JManion32 for correcting my PR title. I hope now it complies with the rules and regulations. |
|
Hi @williamschen23, could you please approve the workflows for this PR when you have a moment so the CI checks can initiate? That would be great. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12474 +/- ##
=========================================
Coverage 21.48% 21.48%
Complexity 9842 9842
=========================================
Files 268 268
Lines 36851 36851
Branches 495 495
=========================================
Hits 7919 7919
Misses 28441 28441
Partials 491 491
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@jndlansh Please see failing CI. |
|
hey @williamjallen |
|
@jndlansh Please see failing CI. You can test your changes on your own fork for faster iteration with our CI checks. |
I am not able to run CI checks on my fork, it shows no workflow runs, could you please guide me on how to do that @williamjallen ? Newer : Now I have passed the CI tests on my VM, it that alright or i need to check in my fork? |
|
Hey @williamjallen ! Could you please approve the workflows, I have passed the CI checks.
|
|
hey @williamjallen could you please review my PR? |
JManion32
left a comment
There was a problem hiding this comment.
Code changes seem reasonable, but I have a few changes to request before I test everything more thoroughly. The big change is adding the new job to ci.yml.
|
Hey @JManion32, I have reverted all the unnecessary changes and moved the Could you please review the changes made. |
dandrecollins07-ctrl
left a comment
There was a problem hiding this comment.
Fixed ci.yml lint issue, also with one small requested change. Tested locally and the functionality works. Approving.
GarvitKhandelwal31
left a comment
There was a problem hiding this comment.
Looks good to me as well.

Why is this Change Important & Necessary?
Closes #12446
Migration files are executed in chronological order based on their datestamp. If a pull request containing a migration remains open for an extended period before merging, its datestamp may become stale. When merged later, this can cause the migration to execute out of order on systems updating from older versions, potentially leading to dependency failures.
This change introduces a CI check to prevent stale migration files from being merged.
What is the New Behavior?
A new GitHub Action runs on pull requests that modify files under:
migration/migrator/migrations/**The workflow:
The maximum allowed age can be configured via the MAX_MIGRATION_AGE_DAYS environment variable.
What steps should a reviewer take to reproduce or test the bug or new feature?
To verify the passing case:
Unit tests for the verification script can be run locally using:
pytest migration/tests/test_verify_migration_datestamp.pyAutomated Testing & Documentation
Unit tests have been added for:
All tests pass locally.
Other information