Geo: Remove Redownload
What does this MR do and why?
Describe in detail what your merge request does and why.
- Removes the "Redownload" button from projects which are in a failed state on
/admin/geo/replication/projects
- Stops using "redownload" codepath
Both items above are revertable by disabling the feature flag with Feature.disable(:geo_deprecate_redownload)
.
Part of #388868 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Confirm that the "Redownload" button is removed:
- Set up Geo
- Have a project with a repository
- Put a project in a failed replication state with 2+ retries. A shortcut: On the primary in Rails console:
Geo::ProjectRegistry.last.update(resync_repository: true, force_to_redownload_repository: false, repository_retry_count: 2, repository_retry_at: 1.day.from_now)
- Visit the secondary site in your browser. Your requests must be routed to the secondary site in order to visit the projects replication details page.
- Click to Admin > Geo > Sites
- In the card for the secondary site, under Replication Details, in the Component column, click Repositories
- Click the All projects dropdown and choose Failed
- On master branch, observe that Redownload button exists next to the Resync button
- On this MR's branch, observe that Redownload button does not exist
✅
Confirm that the button can be brought back by disabling the feature flag:
- On this MR's branch, disable the feature flag in Rails console with
Feature.disable(:geo_deprecate_redownload)
and confirm the change on the secondary site:Feature.enabled?(:geo_deprecate_redownload)
(I think the cache invalidation is not working so the effect may be delayed by a couple minutes?) - Observe that the Redownload button exists.
✅ - Side note-- clicking Redownload merely flags the record to use redownload logic at the already-scheduled next retry time.
Confirm that redownload works:
- Make a project redownload now. In Rails console on the secondary site:
r = Geo::ProjectRegistry.last; r.update(resync_repository: true, force_to_redownload_repository: true, repository_retry_count: 2, repository_retry_at: 1.day.ago)
- Wait a minute or two for the background jobs to run
- The registry should become "synced": In Rails console on the secondary site:
r.reload
, observeresync_repository: false
✅
Confirm that resync without redownload works:
- Enable the feature flag in Rails console on the primary site:
Feature.enable(:geo_deprecate_redownload)
and confirm the change on the secondary site:Feature.enabled?(:geo_deprecate_redownload)
- Make a project resync now. In Rails console on the secondary site:
r = Geo::ProjectRegistry.last; r.update(resync_repository: true, repository_retry_count: 2, repository_retry_at: 1.day.ago)
(Note that it shouldn't make a difference if you try to "force redownload") - Wait a minute or two for the background jobs to run
- The registry should become "synced": In Rails console on the secondary site:
r.reload
, observeresync_repository: false
✅
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Michael Kozono