Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

volrep: Fix and simplify archived annotation functions #1774

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nirs
Copy link
Member

@nirs nirs commented Jan 27, 2025

Fix and simplify archived annotation value, and the way we check if PVC and PV are already archived.

Result of debugging this CI failure:
https://github.com/RamenDR/ramen/actions/runs/12978252037/job/36221844090

@nirs nirs force-pushed the volrep-archive-annotation branch from 9c63833 to 44801de Compare January 28, 2025 00:13
nirs added 2 commits January 28, 2025 03:19
We converted int64 to int, possibly truncating the value, and then
converted it to string and format the string into the result string.
Fixed by formatting int64 into the result string.

Signed-off-by: Nir Soffer <[email protected]>
The check is trivial, ensuring that both pvc and pv have the expected
annotation value. The code was too complicated, using complex way to
access map value, adding 5 temporary variables, and complex conditions.

Simplify to the simplest possible form that anyone will understand
quickly.

Signed-off-by: Nir Soffer <[email protected]>
@nirs nirs force-pushed the volrep-archive-annotation branch from 44801de to 91dc33c Compare January 28, 2025 01:19
@nirs nirs marked this pull request as ready for review January 28, 2025 16:25
@nirs nirs requested a review from ELENAGER January 28, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant