-
Notifications
You must be signed in to change notification settings - Fork 152
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 actor for mysql migration RHEL9->RHEL10 #1321
base: main
Are you sure you want to change the base?
Conversation
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.
Packit will automatically schedule regression tests for this PR's build and latest upstream leapp 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,
See other labels for particular jobs defined in the 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. |
/packit copr-build |
Added configuration checks, so the user is informed that current MySQL configuration won't be compatible with newer MySQL present in RHEL 10. When incompatible config is detected, severity is also raised to HIGH, as proceeding will result in |
@SlouchyButton hi \o thanks for the contribution! regarding the severity, if I understand it right, the worst scenario here is that mysqldb will not be launched on the new system - will not be working - until they fix the configuration. fro mthis point I do not think we should use high severity.
|
Hi @pirat89 I also have another question regarding tests. Are they required? There is a small sanity test similar to other our database components, which only tests the detection of the package on the system. Testing other parts of the actor feels a bit problematic to me, as it is starting new commands with subprocess, or reading files (for configuration). Is it mandatory to somehow test even this functionality, and if so what would be your proposed approach for this? Thank you! |
repos/system_upgrade/el9toel10/actors/mysqlcheck/libraries/mysqlcheck.py
Outdated
Show resolved
Hide resolved
@SlouchyButton I made just a short overview the last time, we will try to do proper review the next week. Regarding the subprocess, use the Of course, when some unit-tests are pretty tricky to write and their value would not be high, it is ok to mention it in a comment (in the test script file) for others and keep the testing on integration tests, etc. The full coverage is not required. Also, in such a case, you could still add files with example outputs under I will cover such tips into the guidelines/tutorials we are writting in these days. Update: but I would suggest anyway to postpone writing of another unit-tests until someone do a better review - so they will not need to be rewritten in case of bigger changes. |
Oh, I must have missed it in the docs, will change this.
That would be great, the documentation/guidelines are great, but they sometimes do feel like they miss some edge cases. Originally I was wanting to do multiple reports but eventually figured you can't do that from one actor and can't have more actors in one folder. I think this isn't explicitly mentioned so maybe some guidelines (best practices) how to report multiple things relating to one task (package upgrade) might help others.
Right that's a good point. |
It's possible we haven't mentioned that in guidelines earlier. I will make a note to ensure we will put it into the new guidelines we are working on. The reason for the requirement to use
well, you can create e.g. Also note, that inside the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need several changes. Also, checking the current solution, I think that it should be pretty simple to cover the complete functionality by unit-tests. let's sync about it yet. I skipped review of current unit-tests, due to number of changes that will be done in the code anyway.
repos/system_upgrade/el9toel10/actors/mysqlcheck/libraries/mysqlcheck.py
Outdated
Show resolved
Hide resolved
'\nWarning:\n' | ||
'It seems that some config options currently used for MySQL server' | ||
' will be removed in updated MySQL server.\n' | ||
'If you proceed with the update now, without addressing this issue,' | ||
' the MySQL server will fail to start until the config is fixed.\n' | ||
'Detected deprecated options:\n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using \n
in the text is not acturally so good as the formatting could look weird in various webUIs. Also the Warning line is not good I would omit it. Basically the hole report is kind of the warning. Now you need to just provide information:
- What is the problem in genera?
- What does it mean for readers? What do you want them to understand?
- What specifically we discovered that should concern the user? (the list of problematic entities)
In the remediation instructions:
- What should I do?
- Can resolve it before the upgrade?
- Do I have to do something after the upgrade?
- .....
Note that current summary could be confusing for the user as whatever they do, they will see this msg but remediation instructions says they have to deal with it after the upgrade (and the preupgrade part suggest only the backup of data - btw, do you mean actually dump the database?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, update
-> upgrade
base on RHEL docs:
- update RPMs using
dnf update
- staying on same RHEL X major version - upgrade -> upgrading to the next system major version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\n
resolved (removed where not necessary).
Wording might still be improved on.
repos/system_upgrade/el9toel10/actors/mysqlcheck/libraries/mysqlcheck.py
Outdated
Show resolved
Hide resolved
Split report functions so they are more coherent. Define list separator for standardized list look.
Add few more entries to `REMOVED_ARGS` list, as some have multiple ways of being logged in mysqld.
Most of the changes should be hopefully done. Missing more thorough description of actors and tests. |
Also fixes variable with article URL, despite being 'const', not being written in caps.
All tests should be present.
|
With this, all points from review should be hopefully resolved 🤞, so I think this is ready for a second round of review. |
Basic actor that just checks that the mysql-server package is installed and inform user if so.
There are incompatibilities, so there is an article attached describing the process (the article is WIP)