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-1331] Port post_ponr_set_efi_configuration() to Action framework #1256

Merged
merged 10 commits into from
Aug 15, 2024

Conversation

pr-watson
Copy link
Contributor

@pr-watson pr-watson commented Jun 5, 2024

This PR ports the post_ponr_set_efi_configuration function to the action framework. Changing any relevant logger crictical, warning and info messages to Error results and Warning and Info messages respectively.

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 Jun 5, 2024
@has-bot
Copy link
Member

has-bot commented Jun 5, 2024

/packit test --labels sanity


Comment generated by an automation.

@pr-watson pr-watson force-pushed the migrate-post-conversion-set-efi-config branch 2 times, most recently from eb501b7 to 0a90d52 Compare June 25, 2024 22:54
Copy link

codecov bot commented Jun 25, 2024

Codecov Report

Attention: Patch coverage is 98.98990% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.30%. Comparing base (9f2e407) to head (6fe3946).
Report is 10 commits behind head on main.

Files Patch % Lines
convert2rhel/actions/conversion/set_efi_config.py 98.97% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1256      +/-   ##
==========================================
+ Coverage   96.19%   96.30%   +0.11%     
==========================================
  Files          58       59       +1     
  Lines        4831     4872      +41     
  Branches      848      858      +10     
==========================================
+ Hits         4647     4692      +45     
+ Misses        106      103       -3     
+ Partials       78       77       -1     
Flag Coverage Δ
centos-linux-7 91.61% <98.98%> (+0.17%) ⬆️
centos-linux-8 92.52% <98.98%> (+0.14%) ⬆️
centos-linux-9 92.56% <98.98%> (+0.14%) ⬆️

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.

Some comments, otherwise, looks good.

convert2rhel/actions/conversion/set_efi_config.py Outdated Show resolved Hide resolved
convert2rhel/actions/conversion/set_efi_config.py Outdated Show resolved Hide resolved
convert2rhel/actions/conversion/set_efi_config.py Outdated Show resolved Hide resolved
convert2rhel/actions/conversion/set_efi_config.py Outdated Show resolved Hide resolved
@r0x0d r0x0d force-pushed the migrate-post-conversion-set-efi-config branch from 216487d to 773197a Compare July 16, 2024 18:58
@pr-watson pr-watson force-pushed the migrate-post-conversion-set-efi-config branch from 84b3f58 to 3599a04 Compare August 5, 2024 18:42
@r0x0d
Copy link
Member

r0x0d commented Aug 6, 2024

/packit test --labels sanity

@r0x0d
Copy link
Member

r0x0d commented Aug 6, 2024

@pr-watson, please squash the commits

@pr-watson pr-watson requested a review from a team as a code owner August 7, 2024 13:59
@r0x0d r0x0d force-pushed the migrate-post-conversion-set-efi-config branch from 8ad4537 to d0bd3df Compare August 7, 2024 16:23
@pr-watson pr-watson force-pushed the migrate-post-conversion-set-efi-config branch from d0bd3df to 1b10818 Compare August 7, 2024 17:55
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.

With the Message ID guidelines I setup in the docs, can you come up with something else for the message IDs? If it's difficult or you feel like there is a better way to do message IDs just suggest it in the chat or update the wiki (and let us know)
https://github.com/oamg/convert2rhel/wiki/Action-Framework#message-ids

I also didn't go through all the set_message() actions as I'm just wondering now what the audience for it is.

@oamg/convert2rhel-developers is the intention for the action messages that are displayed in Insights and others to be for readability where novice developer or sysadmins can easily know what to do without prior knowledge or something else? If that is the case we should really be improving the titles, messages, diagnosis, and remediations to be more readable

convert2rhel/actions/conversion/set_efi_config.py Outdated Show resolved Hide resolved
convert2rhel/actions/conversion/set_efi_config.py Outdated Show resolved Hide resolved
convert2rhel/actions/conversion/set_efi_config.py Outdated Show resolved Hide resolved
convert2rhel/actions/conversion/set_efi_config.py Outdated Show resolved Hide resolved
convert2rhel/actions/conversion/set_efi_config.py Outdated Show resolved Hide resolved
convert2rhel/actions/conversion/set_efi_config.py Outdated Show resolved Hide resolved
@pr-watson pr-watson force-pushed the migrate-post-conversion-set-efi-config branch from 974cf4b to d3a4d17 Compare August 8, 2024 20:30
r0x0d added a commit to r0x0d/convert2rhel that referenced this pull request Aug 15, 2024
Without this dependency, the action can run before the package
conversion in the system. Ideally, we want this to run after the
`KERNEL_PACKAGES_INSTALLATION`, as it is no use to have this run before the
package replacement.

Pointed out by @hosekadam in oamg#1256 (comment)
@r0x0d
Copy link
Member

r0x0d commented Aug 15, 2024

/packit build

@pr-watson pr-watson force-pushed the migrate-post-conversion-set-efi-config branch from 2eb0b7d to a6a001e Compare August 15, 2024 14:01
@pr-watson
Copy link
Contributor Author

/packit build

1 similar comment
@pr-watson
Copy link
Contributor Author

/packit build

@pr-watson pr-watson force-pushed the migrate-post-conversion-set-efi-config branch from a6a001e to 6b7b62c Compare August 15, 2024 14:14
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.

Tests look good from QE POV

logger.info("Moving '%s' to '%s'" % (src_file, dst_file))

try:
shutil.move(src_file, dst_file)
Copy link
Member

Choose a reason for hiding this comment

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

I'm thinking if we shouldn't go back to the copy2, since it doesn't make a big difference (the /boot/efi/EFI/centos won't be removed) and as we discussed here #1256 (comment) we can refactor this later and for now we should be closer to the original code.

If we decide to move, sorry Preston for an extra work you had with my ideas

Copy link
Member

Choose a reason for hiding this comment

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

I will move tihs back to copy2 and rebaes the PR. Don't worry @pr-watson

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we're sticking with move, it's a good addition

@pr-watson
Copy link
Contributor Author

/packit build

@r0x0d r0x0d force-pushed the migrate-post-conversion-set-efi-config branch 2 times, most recently from 32faa2d to ea8cd1e Compare August 15, 2024 14:44
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.

Let's merge after the required actions passes

@r0x0d r0x0d force-pushed the migrate-post-conversion-set-efi-config branch from ea8cd1e to 6fe3946 Compare August 15, 2024 15:41
@r0x0d
Copy link
Member

r0x0d commented Aug 15, 2024

rhel 7 rpm not being built is not a PR problem. It is happening in other PRs as well.

@hosekadam hosekadam merged commit 80333d9 into oamg:main Aug 15, 2024
17 of 18 checks passed
Venefilyn pushed a commit that referenced this pull request Aug 16, 2024
Without this dependency, the action can run before the package
conversion in the system. Ideally, we want this to run after the
`KERNEL_PACKAGES_INSTALLATION`, as it is no use to have this run before the
package replacement.

Pointed out by @hosekadam in #1256 (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 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.

8 participants