Skip to content

Clean up user project callout feature name = 3

Arturo Herrero requested to merge clean-up-project-callout-three into master

Description

This is a follow-up from this discussion !129703 (comment 1521016773). It cleans up the project callout feature_name = 3. Related to https://gitlab.com/gitlab-org/gitlab/-/issues/369526.

1. How many records are expected to be deleted from GitLab.com?

This merge request deletes 189720 rows from user_project_callouts (283575 rows total)

2. Is it expected for self-managed to have a similar number of records?

This only affects Gitlab.com records because this user project callout was under a feature flag #371690 (closed) default_enabled was false. It was used to show a banner #371690 (comment 1518340212).

3. In case of an incident, is there a way to recover this data? (e.g. Would it be possible to re-build based on other records?)

We don't need to recover this data because it only showed a no longer relevant banner to the user. The functionality for this banner was removed !129703 (merged).

4. Is there a user experience impacted by this data?

This is no longer used and there is no code dependency. No user impact as they cannot see the banner anymore.

Migration

$ rake db:migrate
main: == [advisory_lock_connection] object_id: 225320, pg_backend_pid: 50271
main: == 20230822104028 DeleteProjectCalloutThree: migrating ========================
main: -- transaction_open?()
main:    -> 0.0000s
main: == 20230822104028 DeleteProjectCalloutThree: migrated (0.0262s) ===============

main: == [advisory_lock_connection] object_id: 225320, pg_backend_pid: 50271
ci: == [advisory_lock_connection] object_id: 225540, pg_backend_pid: 50273
ci: == 20230822104028 DeleteProjectCalloutThree: migrating ========================
ci: -- The migration is skipped since it modifies the schemas: [:gitlab_main].
ci: -- This database can only apply migrations in one of the following schemas: [:gitlab_ci, :gitlab_internal, :gitlab_shared].
ci: == 20230822104028 DeleteProjectCalloutThree: migrated (0.0073s) ===============

ci: == [advisory_lock_connection] object_id: 225540, pg_backend_pid: 50273
$ rake db:migrate:down:main VERSION=20230822104028
main: == [advisory_lock_connection] object_id: 224880, pg_backend_pid: 52743
main: == 20230822104028 DeleteProjectCalloutThree: reverting ========================
main: == 20230822104028 DeleteProjectCalloutThree: reverted (0.0034s) ===============

main: == [advisory_lock_connection] object_id: 224880, pg_backend_pid: 52743

Reference: https://docs.gitlab.com/ee/development/migration_style_guide.html#modifying-existing-data

Related to #371690 (closed)

Edited by Arturo Herrero

Merge request reports

Loading