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-1332] Port PkgManagerConf() to the Action framework #1321

Merged
merged 14 commits into from
Aug 15, 2024

Conversation

pr-watson
Copy link
Contributor

@pr-watson pr-watson commented Jul 24, 2024

This PR calls the PkgManagerConf class inside a new action called pkg_manager_config so it can be executed alongside the other actions in the conversion section. Relevant tests have been written.

Jira Issues:

Checklist

  • PR has been tested manually in a VM (either author or reviewer)
  • Jira issue has been made public if possible
  • [RHELC-] or [HMS-] 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 kind/feature New feature or request tests/sanity PR ready to run the sanity test suit. Equivalent to `/packit test --labels sanity`. labels Jul 24, 2024
@pr-watson pr-watson force-pushed the migrate-post-conversion-yum-conf branch from 345be37 to 0fd5623 Compare July 24, 2024 14:59
@has-bot
Copy link
Member

has-bot commented Jul 24, 2024

/packit test --labels sanity


Comment generated by an automation.

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.35%. Comparing base (80333d9) to head (c0b3908).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1321      +/-   ##
==========================================
+ Coverage   96.30%   96.35%   +0.05%     
==========================================
  Files          59       60       +1     
  Lines        4872     4884      +12     
  Branches      858      860       +2     
==========================================
+ Hits         4692     4706      +14     
+ Misses        103      101       -2     
  Partials       77       77              
Flag Coverage Δ
centos-linux-7 91.67% <100.00%> (+0.06%) ⬆️
centos-linux-8 92.58% <100.00%> (+0.06%) ⬆️
centos-linux-9 92.62% <100.00%> (+0.05%) ⬆️

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.

Copy link
Member

@r0x0d r0x0d 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 to me.

The only thing is that the action looks confusing right now, as the name of the class is almost the name of what we call underneath it. The only main difference in the naming is the ig at the name of the action class 🤔

Is there a way we can improve it somehow?

@pr-watson
Copy link
Contributor Author

pr-watson commented Aug 5, 2024

Looks good to me.

The only thing is that the action looks confusing right now, as the name of the class is almost the name of what we call underneath it. The only main difference in the naming is the ig at the name of the action class 🤔

Is there a way we can improve it somehow?

Looks good to me.

The only thing is that the action looks confusing right now, as the name of the class is almost the name of what we call underneath it. The only main difference in the naming is the ig at the name of the action class 🤔

Is there a way we can improve it somehow?

@r0x0d I could extend the name of the action class to PackageManagerConfiguration or maybe ConfigurePkgManager

convert2rhel/actions/conversion/pkg_manager_config.py Outdated Show resolved Hide resolved
convert2rhel/redhatrelease.py Outdated Show resolved Hide resolved
Copy link
Member

@Venefilyn Venefilyn left a comment

Choose a reason for hiding this comment

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

Some changes necessary

convert2rhel/redhatrelease.py Outdated Show resolved Hide resolved
@pr-watson pr-watson requested a review from a team as a code owner August 8, 2024 14:44
@pr-watson pr-watson force-pushed the migrate-post-conversion-yum-conf branch from ba6275b to 728a723 Compare August 12, 2024 15:34
@r0x0d
Copy link
Member

r0x0d commented Aug 13, 2024

/packit test --labels sanity

@r0x0d r0x0d force-pushed the migrate-post-conversion-yum-conf branch from eb03a7b to 2538ea6 Compare August 13, 2024 17:33
Copy link
Member

@r0x0d r0x0d 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!

@r0x0d
Copy link
Member

r0x0d commented Aug 14, 2024

/packit build

1 similar comment
@r0x0d
Copy link
Member

r0x0d commented Aug 14, 2024

/packit build

@r0x0d
Copy link
Member

r0x0d commented Aug 14, 2024

/packit test --labels sanity

@r0x0d
Copy link
Member

r0x0d commented Aug 14, 2024

/packit retest-failed

@pr-watson
Copy link
Contributor Author

Failing int tests are because we have updated the patch file that gets asserted to be yum/dnf based on the pkg manager. Before the patch file that got output was always yum.conf

@r0x0d r0x0d requested a review from a team as a code owner August 14, 2024 18:43
@r0x0d r0x0d requested a review from danmyway August 14, 2024 18:43
@r0x0d
Copy link
Member

r0x0d commented Aug 14, 2024

/packit test --labels sanity

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.

Just needs to be rebased

@r0x0d r0x0d dismissed Venefilyn’s stale review August 15, 2024 12:25

changes addressed

@pr-watson pr-watson force-pushed the migrate-post-conversion-yum-conf branch from ede4a52 to c0b3908 Compare August 15, 2024 15:55
@pr-watson pr-watson merged commit 7c12aa8 into oamg:main Aug 15, 2024
17 of 18 checks passed
@@ -9,6 +9,9 @@ def test_yum_conf_patch(convert2rhel, shell):
expanding the $releasever variable properly.
"""
shell("echo '#random text' >> /etc/yum.conf")
Copy link
Member

Choose a reason for hiding this comment

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

This shell command should be placed little down, once we know which config we want to edit (either the dnf or yum conf)

Copy link
Member

Choose a reason for hiding this comment

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

It doesn't need to since, /etc/yum.conf is either a config file or a symlink to /etc/dnf/dnf.conf
A comment would be nice though

Copy link
Member

Choose a reason for hiding this comment

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

I see, thanks for the info. I haven't realized this. And +1 for the comment

This was referenced Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request merge-after-tests-ok tests/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.

7 participants