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

[RHELC-1291, RHELC-1292] Skip versionlock file in backup system actions #1233

Merged
merged 4 commits into from
May 21, 2024

Conversation

bookwar
Copy link
Contributor

@bookwar bookwar commented May 21, 2024

Versionlock file has been backed up and cleared before we run the backup action via a prepare_system() call in main.py, thus we should exclude it, so that we do not overwrite it with empty data.

Jira Issues:

Checklist

  • PR has been tested manually in a VM (either author or reviewer)
  • Jira issue has been made public if possible
  • [RHELC-] is part of the PR title
  • GitHub label has been added to help with Release notes
  • PR title explains the change from the user's point of view
  • Code and tests are documented properly
  • The commits are squashed to as few commits as possible (without losing data)
  • When merged: Jira issue has been updated to Release Pending if relevant

Versionlock file has been backed up and cleared before we run the backup
action via a prepare_system() call in main.py, thus we should exclude
it, so that we do not overwrite it with empty data.
Copy link

codecov bot commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.42%. Comparing base (bd8abf9) to head (08c9bad).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1233   +/-   ##
=======================================
  Coverage   95.42%   95.42%           
=======================================
  Files          54       54           
  Lines        4702     4703    +1     
  Branches      830      830           
=======================================
+ Hits         4487     4488    +1     
  Misses        132      132           
  Partials       83       83           
Flag Coverage Δ
centos-linux-7 90.64% <100.00%> (+<0.01%) ⬆️
centos-linux-8 91.56% <100.00%> (+<0.01%) ⬆️
centos-linux-9 91.61% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* validate the versionlock is detected in a second subsequent run of
  convert2rhel
* validate the first run inhibits with returncode 2 for inhibitor, not 1
  for rollback failure

Signed-off-by: Daniel Diblik <ddiblik@redhat.com>
@bookwar bookwar added kind/bug-fix A bug has been fixed tests/tier1 Run (optional) tier1 test jobs. Equivalent to `/packit test --labels tier1`. labels May 21, 2024
@has-bot
Copy link
Member

has-bot commented May 21, 2024

/packit test --labels tier1


Comment generated by an automation.

@danmyway danmyway changed the title [RHELC-1291] Skip versionlock file in backup system actions [RHELC-1291, RHELC-1292] Skip versionlock file in backup system actions May 21, 2024
@danmyway
Copy link
Member

/packit test --labels tier1

Since the scope of the variable has now changed, we need to rename it,
so that it is not shown as private.
@bookwar bookwar requested a review from hosekadam May 21, 2024 09:32
@danmyway
Copy link
Member

/packit test --labels tier1

@hosekadam
Copy link
Member

Just if you want, you can add
("S.5....T. c /etc/yum/pluginconf.d/versionlock.list", "File {filepath} already backed up - not backing up again"),
as new test here: https://github.com/oamg/convert2rhel/blob/main/convert2rhel/unit_tests/actions/pre_ponr_changes/backup_system_test.py#L253 It might prevent us from accidentally removing it from the skip list

Copy link
Member

@hosekadam hosekadam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on if you want to add the unit test, I think it might be useful to have it. Otherwise, looks good.

@danmyway
Copy link
Member

Please run /packit test --labels tier1 whenever the PR is ready to be tested.

@bookwar
Copy link
Contributor Author

bookwar commented May 21, 2024

/packit test --labels tier1

Copy link
Member

@danmyway danmyway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I believe we can merge

@r0x0d r0x0d merged commit fd1c711 into oamg:main May 21, 2024
25 checks passed
@bookwar bookwar deleted the versionlock branch May 21, 2024 14:05
@hosekadam hosekadam mentioned this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix A bug has been fixed tests/tier1 Run (optional) tier1 test jobs. Equivalent to `/packit test --labels tier1`.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants