Do not trim deployment filename in geo secondary
What does this MR do and why?
Do not trim deployment filename in geo secondary. The issue was introduced in this MR.
Below scenarios are handled in this fix:
Scenario 1:
- Both primary and secondary are on the old codebase. Geo sync has completed and files are stored in both primary and secondary S3.
- After upgrading to the newer codebase with trim logic, both primary and secondary have old pages deployments.
- When I try to reverify the Geo pages deployment from the UI, it performs a resync (not sure why) and the verification doesn't fail but gets stuck at pending.
Scenario 2:
- Both primary and secondary are on the old codebase. Geo sync is pending and files are stored only on primary S3.
- After upgrading to the newer codebase with trim logic, the primary has a longer filename.
- When geo sync occurs, the secondary has a trimmed filename. Therefore, verification fails with the error:
Verification failed with: Error during verification: File is not checksummable
References
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
Tests are added.
To test end to end:
- Configure Geo
- Configure both GDKs to use Object Storage.
- Stop both GDKs
- On the primary GDK:
- Revert the changes in !192088 (merged)
- Start *only* the primary GDK
- Create a GitLab Pages website from a project template, preferred Plain HTML.
- Run CI pipeline to create a new Page Deployment.
- Start the secondary GDK
- Visit the Geo admin page at http://127.0.0.1:3000/admin/geo/sites, and navigate to
Secondary site
>Pages Deployments
- A new entry will be added and it should be verified successfully (this may take few minutes). You can check this via step 8 as well.
- On the Rails console session in the secondary GDK, check the page deployment registry attributes:
Geo::PagesDeploymentRegistry.last.attributes
. Theverification_state
should be2
.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Naman Jagdish Gala