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-1540] Fix bug with duplicate packages check when running with Satellite offline #1219

Merged
merged 4 commits into from
May 21, 2024

Conversation

pr-watson
Copy link
Contributor

@pr-watson pr-watson commented May 13, 2024

This PR adds handlers for errors raised when running the DUPLICATE_PACKAGES check with Satellite on an offline system. On EL7 systems for this particular error case the return code is 0 and the output is [Errno -2] Name or service not known. while on EL8 the return code is 1 and the output is Failed to download metadata for repo [example repo]: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried.
For EL7 we check for that specific output and for EL8 we check the return code. Both cases raise a WARNING DUPLICATE_PACKAGE_CHECK_FAILED and inform the user we couldn't perform the check and recommend they ensure they can access all repos enabled on their system and re-run convert2rhel or check for duplicate packages themselves. This way we don't hinder the conversion for offline systems on satellite while informing them how to remediate the failure.

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

@pr-watson pr-watson added enhancement New feature or request tests-run-tier0 PR ready to run the essential test suit. Equivalent to `/packit test --labels tier0`. labels May 13, 2024
@has-bot
Copy link
Member

has-bot commented May 13, 2024

/packit test --labels tier0


Comment generated by an automation.

Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.42%. Comparing base (6972848) to head (4a49abb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1219      +/-   ##
==========================================
- Coverage   95.44%   95.42%   -0.03%     
==========================================
  Files          54       54              
  Lines        4723     4700      -23     
  Branches      834      831       -3     
==========================================
- Hits         4508     4485      -23     
- Misses        132      133       +1     
+ Partials       83       82       -1     
Flag Coverage Δ
centos-linux-7 90.61% <100.00%> (+0.01%) ⬆️
centos-linux-8 91.55% <100.00%> (+0.01%) ⬆️
centos-linux-9 ?

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.

@pr-watson pr-watson force-pushed the duplicate-packages-satellite-bug branch from 0e0df6f to 6cb4bae Compare May 15, 2024 13:30
@pr-watson
Copy link
Contributor Author

/packit test --labels tier0

@pr-watson pr-watson added tests-run-sanity PR ready to run the sanity test suit. Equivalent to `/packit test --labels sanity`. and removed tests-run-tier0 PR ready to run the essential test suit. Equivalent to `/packit test --labels tier0`. labels May 15, 2024
@has-bot
Copy link
Member

has-bot commented May 15, 2024

/packit test --labels sanity


Comment generated by an automation.

@pr-watson pr-watson force-pushed the duplicate-packages-satellite-bug branch from 49947de to 3ed3f49 Compare May 15, 2024 18:45
@pr-watson pr-watson requested a review from r0x0d May 20, 2024 14:15
@pr-watson pr-watson force-pushed the duplicate-packages-satellite-bug branch from 3ed3f49 to 5b154c6 Compare May 20, 2024 14:18
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.

Looks good

@pr-watson pr-watson force-pushed the duplicate-packages-satellite-bug branch from 3d1db1a to 4a49abb Compare May 21, 2024 13:13
@pr-watson pr-watson merged commit 9da391f into oamg:main May 21, 2024
15 of 17 checks passed
@hosekadam hosekadam mentioned this pull request May 27, 2024
@hosekadam hosekadam added bug-fix A bug has been fixed and removed enhancement New feature or request labels May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix A bug has been fixed tests-run-sanity PR ready to run the sanity test suit. Equivalent to `/packit test --labels sanity`.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants