Mark 20260202172643 as obsolete

This migration marks the 20260202172643 BackfillUndetectedSinceInVulnerability Advanced search migration as obsolete.

Automated Changes

This MR includes automated changes made by AI to remove references to the obsolete migration:

  • Migration file: Updated to prepend ::Search::Elastic::MigrationObsolete
  • YAML documentation: Added obsolete: true and marked_obsolete_in_milestone
  • Spec file: Updated to use it_behaves_like 'a deprecated Advanced Search migration'
  • Code references: AI attempted to find and remove/simplify references to this migration throughout the codebase

Critical Pattern: migration_has_finished? Checks

When a migration is obsolete, ::Elastic::DataMigrationService.migration_has_finished?(:backfill_undetected_since_in_vulnerability) always returns true.

The AI has attempted to simplify conditionals and remove dead code branches:

  • if migration_has_finished?(:backfill_undetected_since_in_vulnerability) - kept the if branch, removed else branch
  • unless migration_has_finished?(:backfill_undetected_since_in_vulnerability) - removed entire block (never executes)
  • Combined conditions like feature_flag && migration_has_finished?(:backfill_undetected_since_in_vulnerability) - simplified to just feature_flag
  • Test stubs returning false - removed tests for scenarios that can no longer occur

Review Checklist

  • Verify all migration_has_finished?(:backfill_undetected_since_in_vulnerability) checks have been removed or simplified
  • Confirm that simplified logic maintains the same behavior (the "if finished" branch is now always taken)
  • Check for any remaining references to BackfillUndetectedSinceInVulnerability (class name) or backfill_undetected_since_in_vulnerability (snake_case)
  • Review test coverage to ensure meaningful tests remain after removing obsolete scenarios
  • Verify CI passes with all changes

Search for Remaining References

Additional Notes

At the moment, the gitlab-housekeeper AI integration is not always capable of removing all references, so you must check the diff and pipeline failures to confirm if there are any issues. It is the responsibility of the assignee to push those changes to this branch if needed.

Read more about the process for marking Advanced search migrations as obsolete.

All Advanced search migrations must have had at least one required stop to process the migration. Therefore we mark any Advanced search migrations added before the last required stop as obsolete.

This change was generated by gitlab-housekeeper in CI using the Keeps::MarkOldAdvancedSearchMigrationsAsObsolete keep.

To provide feedback on your experience with gitlab-housekeeper please create an issue with the label GitLab Housekeeper and consider pinging the author of this keep.

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading
Loading