Fail pipeline on stale migration timestamps

Following up !175958 (merged)

What does this MR do and why?

This MR makes MigrationTimestampChecker fail the pipeline when a newly added migration has a timestamp older than three weeks, as the migration style guide recommends.

The checker already rejected future timestamps; it now rejects stale ones too.

The limit only applies to migrations added on the branch so pre-existing migrations are left untouched.

The error points to scripts/refresh-migrations-timestamps as the fix.

The check runs from scripts/validate_migration_timestamps, which already runs both in the db:check-migrations job (reusing its existing target-branch fetch) and locally as a pre-push lefthook hook, so a stale timestamp is caught before push and in CI.

https://docs.gitlab.com/development/migration_style_guide/#migration-timestamp-age

Edited by Max Orefice

Merge request reports

Loading
Loading