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

Add el9toel10 actor to handle symlink -> directory with ruby IRB. #1304

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

jackorp
Copy link
Contributor

@jackorp jackorp commented Nov 5, 2024

The /usr/share/ruby/irb path is a symlink in RHEL 9, but a regular directory in RHEL 10.

Simply remove the symlink to then let the RPM mechanism create the correct directory on update.

Users should not expect to ever retain anything in this directory.


Fix for OAMG-12187 .

instead of readlink present in el8->el9 actor, I just used test -L since here we only care if there is any symlink or not, contents or validity of where it is pointing is not important for the upgrade.

I left the rest as-is from a copy paste of the actor, I think naming and such still pretty much fits.

Copy link

github-actions bot commented Nov 5, 2024

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable.
If you want to request a review or rebuild a package in copr, you can use following commands as a comment:

  • review please @oamg/developers to notify leapp developers of the review request
  • /packit copr-build to submit a public copr build using packit

Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build.
However, here are additional useful commands for packit:

  • /packit test to re-run manually the default tests
  • /packit retest-failed to re-run failed tests manually
  • /packit test oamg/leapp#42 to run tests with leapp builds for the leapp PR#42 (default is latest upstream - main - build)

Note that first time contributors cannot run tests automatically - they need to be started by a reviewer.

It is possible to schedule specific on-demand tests as well. Currently 2 test sets are supported, beaker-minimal and kernel-rt, both can be used to be run on all upgrade paths or just a couple of specific ones.
To launch on-demand tests with packit:

  • /packit test --labels kernel-rt to schedule kernel-rt tests set for all upgrade paths
  • /packit test --labels beaker-minimal-8.10to9.4,kernel-rt-8.10to9.4 to schedule kernel-rt and beaker-minimal test sets for 8.10->9.4 upgrade path

See other labels for particular jobs defined in the .packit.yaml file.

Please open ticket in case you experience technical problem with the CI. (RH internal only)

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please contact leapp-infra.

@jackorp
Copy link
Contributor Author

jackorp commented Nov 5, 2024

review please @oamg/developers

Copy link
Member

@pirat89 pirat89 left a comment

Choose a reason for hiding this comment

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

@jackorp checking the solution, wouldn't be better to generalize it and put it to the common repo instead of have two almost same solution for 8 -> 9 & 9 -> 10?

@pirat89
Copy link
Member

pirat89 commented Nov 5, 2024

/packit copr-build

@jackorp
Copy link
Contributor Author

jackorp commented Nov 5, 2024

checking the solution, wouldn't be better to generalize it and put it to the common repo instead of have two almost same solution for 8 -> 9 & 9 -> 10?

That depends, are there other packages that stand to gain from such work? Is that a refactor you'd consider worthwhile endeavor?

From my view of a packager who fixes the upgrade for just this problematic part of the package, I prefer simpler copy paste for these 2 upgrade cases, but I don't know if this is now more common problem or still applies only to a package or few. Ruby is back in line with Fedora with this and hopefully that's the end of the broken symlink story for ruby WRT LEAPP...

I am also going off of the comment on bugzilla regarding not needing generic solution https://bugzilla.redhat.com/show_bug.cgi?id=2030627#c13 If the world around changed in the time being making that comment not accurate then we can figure something out.

@pirat89
Copy link
Member

pirat89 commented Nov 6, 2024

checking the solution, wouldn't be better to generalize it and put it to the common repo instead of have two almost same solution for 8 -> 9 & 9 -> 10?

That depends, are there other packages that stand to gain from such work? Is that a refactor you'd consider worthwhile endeavor?

From my view of a packager who fixes the upgrade for just this problematic part of the package, I prefer simpler copy paste for these 2 upgrade cases, but I don't know if this is now more common problem or still applies only to a package or few. Ruby is back in line with Fedora with this and hopefully that's the end of the broken symlink story for ruby WRT LEAPP...

I am also going off of the comment on bugzilla regarding not needing generic solution https://bugzilla.redhat.com/show_bug.cgi?id=2030627#c13 If the world around changed in the time being making that comment not accurate then we can figure something out.

I think that you are speaking about something different than me. The comment in BZ is not related anyhow to what I am suggesting :) I am speaking only about ruby all the time. I am not speaking about any other packages. Let's sync via call.

@pirat89
Copy link
Member

pirat89 commented Nov 6, 2024

Discussed on the call. We will keep the actors separate, as the reason for both IPUs is different for this handling, but docstring should be updated in both actors to make it clear.

@pirat89 pirat89 added this to the 8.10/9.6 milestone Nov 6, 2024
The `/usr/share/ruby/irb` path is a symlink in RHEL 9,
but a regular directory in RHEL 10.
This puts us back in line with RHEL 8 and Fedora in terms of the
path's file type regarding the rubygem-irb package.

Since this was not handled on RPM level, handle it as actor again.
This was copied and adjusted from same-named el8->el9 actor.

We do not care about the validity or target of the symlink, we just
remove it to allow DNF create the correct directory on upgrade.

Without this workaround, the upgrade will fail in transaction test with
reports of file conflicts on the directory path.

Users should not expect to ever retain anything in this directory.
In RHEL 10, the directory is a regular directory again.

The 2 actors are separate over creating a common solution for both.
Expand in the docstring on the reason for the el8->el9 actor to
differentiate them apart.
@jackorp
Copy link
Contributor Author

jackorp commented Nov 6, 2024

@pirat89 updated the docstrings.I did the docstring update for el8->el9 in separate commit as I don't see it as something hide-able in the el9toel10 commit. And squashing is easier than splitting imo...

@pirat89
Copy link
Member

pirat89 commented Nov 7, 2024

/packit copr-build

@pirat89 pirat89 merged commit 81a3297 into oamg:main Nov 13, 2024
26 checks passed
@pirat89
Copy link
Member

pirat89 commented Nov 13, 2024

@jackorp merged! thanks for the contribution!!

@pirat89 pirat89 added the changelog-checked The merger/reviewer checked the changelog draft document and updated it when relevant label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-checked The merger/reviewer checked the changelog draft document and updated it when relevant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants