Skip to content
代码片段 群组 项目
提交 96bd6479 编辑于 作者: Michael Becker's avatar Michael Becker
浏览文件

Finalize `BackfillHasVulnerabilityResolution` migration

We added this batched background migration in a previous MR. [^1]

The [Batched Background Migration docs][0] say to finalize a migration
when two conditions are met:

1. The batched background migration is completed on GitLab.com
2. The batched background migration was added in or before the last
   required stop

* I verified with chatops that the migration is complete.[^2]
* The background migration is available in [`v17.5.0-ee`][1], which is
  a [required stop][2]

[^1]: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/166110
[^2]:https://gitlab.com/gitlab-org/gitlab/-/issues/486530#note_2128952648

[0]:https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#finalize-a-batched-background-migration
[1]:https://gitlab.com/gitlab-org/security/gitlab/-/tree/v17.5.0-ee
[2]:https://gitlab.com/gitlab-org/gitlab/-/blob/1842050872cc3a4062de067f9dbe6b86f1d9cd36/config/upgrade_path.yml#L77-79

---

related to: https://gitlab.com/gitlab-org/gitlab/-/issues/486530
resolves: https://gitlab.com/gitlab-org/gitlab/-/issues/496437
epic: https://gitlab.com/groups/gitlab-org/-/epics/15036
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/170521
Changelog: changed
上级 ddeb9f44
No related branches found
No related tags found
无相关合并请求
...@@ -10,4 +10,4 @@ feature_category: vulnerability_management ...@@ -10,4 +10,4 @@ feature_category: vulnerability_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/166110 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/166110
milestone: '17.5' milestone: '17.5'
queued_migration_version: 20240912184158 queued_migration_version: 20240912184158
finalized_by: # version of the migration that finalized this BBM finalized_by: 20241025010332
# frozen_string_literal: true
class FinalizeBackfillHasVulnerabilityResolution < Gitlab::Database::Migration[2.2]
MIGRATION = 'BackfillHasVulnerabilityResolution'
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
milestone '17.6'
def up
ensure_batched_background_migration_is_finished(
job_class_name: MIGRATION,
table_name: :vulnerability_reads,
column_name: :id,
job_arguments: [],
finalize: true
)
end
def down
# no op
end
end
219459af48a3bdd8be64ba0cb8386dc6c2285b3106bda3ee5a83581cafa60d49
\ No newline at end of file
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册