Update gitlab-rake geo:status to add sections for info
What does this MR do and why?
I'm making a few changes to the gitlab-rake geo:status
task to make it easier to find the info you want at-a-glance:
- Add a header and separator for replication status
- Add a header and separator for verification status
- "Moved"
Name
andURL
into a section called "Node Information" - Aligned
Name
andURL
with other elements - Added a new section header and separator called "Replication Information"
- Updated the
GEO_STATUS_COLUMN_WIDTH
variable to accommodate longer strings - Adjusted the divider length to match the
GEO_STATUS_COLUMN_WIDTH
because I think it looks tidier - Align section headers to
GEO_STATUS_COLUMN_WIDTH
, again because I think it looks tidier - Move Replication Information to follow Node Information, so that "info" and "status" sections are together
I would also like help fixing a few things:
-
You can see in my example that the width for very long items, like "Dependency Proxy Manifests Verified", breaks the vertical alignment. I think we can probably fix this.I didn't realizeGEO_STATUS_COLUMN_WIDTH
is a magic number, so I updated it to 42 () since that corresponds to the longest string we use. -
I'd like to alignI can do that, but it didn't work as expected. I followed the example ofName
andURL
to use the GEO_STATUS_COLUMN_WIDTH but I don't know if I can just slap.rjust(GEO_STATUS_COLUMN_WIDTH)
on the end.print_gitlab_version
and did aprint
for the string followed by aputs
for the value. There might be a better way of doing this, but boring solution and all that.
References
Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Since this is text output, here's what it will look like. Note that some sections are colored, which is not reflected here.
current
Name: latte
URL: gitlab.example.com
-----------------------------------------------------
GitLab Version: 17.4.2-ee
Geo Role: Secondary
Health Status: Healthy
Lfs Objects: succeeded 2 / total 2 (100%)
Merge Request Diffs: succeeded 0 / total 0 (0%)
Package Files: succeeded 0 / total 0 (0%)
Terraform State Versions: succeeded 0 / total 0 (0%)
Snippet Repositories: succeeded 0 / total 0 (0%)
Group Wiki Repositories: succeeded 0 / total 0 (0%)
Pipeline Artifacts: succeeded 0 / total 0 (0%)
Pages Deployments: succeeded 0 / total 0 (0%)
Uploads: succeeded 2 / total 2 (100%)
Job Artifacts: succeeded 0 / total 0 (0%)
Ci Secure Files: succeeded 0 / total 0 (0%)
Dependency Proxy Blobs: succeeded 0 / total 0 (0%)
Dependency Proxy Manifests: succeeded 0 / total 0 (0%)
Project Wiki Repositories: succeeded 2 / total 2 (100%)
Design Management Repositories: succeeded 1 / total 1 (100%)
Project Repositories: succeeded 2 / total 2 (100%)
Lfs Objects Verified: succeeded 2 / total 2 (100%)
Merge Request Diffs Verified: succeeded 0 / total 0 (0%)
Package Files Verified: succeeded 0 / total 0 (0%)
Terraform State Versions Verified: succeeded 0 / total 0 (0%)
Snippet Repositories Verified: succeeded 0 / total 0 (0%)
Group Wiki Repositories Verified: succeeded 0 / total 0 (0%)
Pipeline Artifacts Verified: succeeded 0 / total 0 (0%)
Pages Deployments Verified: succeeded 0 / total 0 (0%)
Uploads Verified: succeeded 2 / total 2 (100%)
Job Artifacts Verified: succeeded 0 / total 0 (0%)
Ci Secure Files Verified: succeeded 0 / total 0 (0%)
Dependency Proxy Blobs Verified: succeeded 0 / total 0 (0%)
Dependency Proxy Manifests Verified: succeeded 0 / total 0 (0%)
Project Wiki Repositories Verified: succeeded 2 / total 2 (100%)
Design Management Repositories Verified: succeeded 1 / total 1 (100%)
Project Repositories Verified: succeeded 2 / total 2 (100%)
Sync Settings: Full
Database replication lag: 0 seconds
Last event ID seen from primary: 53 (6 days ago)
Last event ID processed: 53 (6 days ago)
Last status report was: 2 minutes ago
proposed
Node Information
------------------------------------------
Name: latte
URL: https://gitlab.example.com
GitLab Version: 17.4.2-ee
Geo Role: Secondary
Health Status: Healthy
Replication Information
------------------------------------------
Sync Settings: Full
Database replication lag: 0 seconds
Last event ID seen from primary: 53 (6 days ago)
Last event ID processed: 53 (6 days ago)
Last status report was: 1 minute ago
Replication Status
------------------------------------------
Lfs Objects: succeeded 2 / total 2 (100%)
Merge Request Diffs: succeeded 0 / total 0 (0%)
Package Files: succeeded 0 / total 0 (0%)
Terraform State Versions: succeeded 0 / total 0 (0%)
Snippet Repositories: succeeded 0 / total 0 (0%)
Group Wiki Repositories: succeeded 0 / total 0 (0%)
Pipeline Artifacts: succeeded 0 / total 0 (0%)
Pages Deployments: succeeded 0 / total 0 (0%)
Uploads: succeeded 2 / total 2 (100%)
Job Artifacts: succeeded 0 / total 0 (0%)
Ci Secure Files: succeeded 0 / total 0 (0%)
Dependency Proxy Blobs: succeeded 0 / total 0 (0%)
Dependency Proxy Manifests: succeeded 0 / total 0 (0%)
Project Wiki Repositories: succeeded 2 / total 2 (100%)
Design Management Repositories: succeeded 1 / total 1 (100%)
Project Repositories: succeeded 2 / total 2 (100%)
Verification Status
------------------------------------------
Lfs Objects Verified: succeeded 2 / total 2 (100%)
Merge Request Diffs Verified: succeeded 0 / total 0 (0%)
Package Files Verified: succeeded 0 / total 0 (0%)
Terraform State Versions Verified: succeeded 0 / total 0 (0%)
Snippet Repositories Verified: succeeded 0 / total 0 (0%)
Group Wiki Repositories Verified: succeeded 0 / total 0 (0%)
Pipeline Artifacts Verified: succeeded 0 / total 0 (0%)
Pages Deployments Verified: succeeded 0 / total 0 (0%)
Uploads Verified: succeeded 2 / total 2 (100%)
Job Artifacts Verified: succeeded 0 / total 0 (0%)
Ci Secure Files Verified: succeeded 0 / total 0 (0%)
Dependency Proxy Blobs Verified: succeeded 0 / total 0 (0%)
Dependency Proxy Manifests Verified: succeeded 0 / total 0 (0%)
Project Wiki Repositories Verified: succeeded 2 / total 2 (100%)
Design Management Repositories Verified: succeeded 1 / total 1 (100%)
Project Repositories Verified: succeeded 2 / total 2 (100%)
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Edited by Keelan Lang