-
Notifications
You must be signed in to change notification settings - Fork 71
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
Extend LEAPP with actor configuration #870
Conversation
3f26947
to
b1f67db
Compare
Adding quick note here so we won't forget. We will want to include the config information also in |
1f75fe5
to
bf68773
Compare
Hey @vinzenz , I don't know if you have time but I was wondering if you recall where in the code I need to add something to recognize directories inside of the actor as being a plugin? I'm trying to add a |
2c27e68
to
552cf0a
Compare
/packit build |
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.
I went through the code. It looks OK, but I cannot claim I am sure since the codebase is a bit hidden in "fog of war". @dkubek I will take care of the my own review suggestions. Can you comment on the comment where I tagged you explicitly?
844c330
to
f99aad0
Compare
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.
In general I think it's ok. I haven't found any serious problems in the code that would not be already covered and some stuff that I think we should still deliver is covered by TODOs which can definitely wait for a follow up PR. However, when I've been testing configs with the RHUI configuration in leapp-repository, I found several things that seems suspicious to me, but it's possibly unrelated to the framework and it's problem in the leapp-repository PR. I will continue in deeper investigation tomorrow with fresh mind, but I am considering it actually already good enough.
Before the merge:
- polish commits (squash lint fixes, etc.)
- fix the docstring "misinformation" noted by @matejmatuska
9e2446d
to
7d1e9f7
Compare
This commit introduces multiple improvements and fixes for actor configuration management in LEAPP, including configuration schema support, API updates, validation improvements, and compatibility fixes. - Actor Configuration: - Add actor configuration support - Introduce configuration schema attributes for LEAPP actors. - Create an API to load and validate actor configs against the schemas stored in actors. - Provide a function to retrieve actor-specified configurations. - Enable config directories at both repository-wide and actor-wide levels. - Add configs to `leapp.db`. - Configuration Schema Support: - Add `_is_config_sequence()` to validate sequences (lists, tuples) of configuration fields. - Add support for `StringMap` field types in `config_schemas`. - Testing and Linting: - Separate linting and unittests for better CI control. - Dependency Management: - Add `pyyaml` to requirements in `requirements.txt`, `setup.py`, and spec files. Some unit tests were also updated as they rely on `os.chdir` which is problematic as the patch tries to correctly reverse any os.chdir that is executed. Therefore, we mock `os.chdir` in the appropriate unit tests. JIRA: OAMG-8803
Ignore pylint's options: * too-many-lines * too-many-positional-arguments * use-yield-from Some of these options cannot be used (python2.7 compat) or configured. See: oamg/leapp-repository#1299
Increase the provided leapp-framework version to 6.0 (from 5.0). Similarly, framework_dependencies are bumped to 6.0. These changes are done as introducing actor configuration presents a major feature, and, therefore, any codebases using the framework might want to require leapp with config support. Bumping the version number, thus, allows to distinguish between leapp-framework versions that provide configs and those that do not.
7d1e9f7
to
7efbd20
Compare
ignore failed tests on RHEL 7.9. there are some hicupps due to yum and some special requirement to have a build from leapp-repository PR. it's ok |
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.
It's good to go!!!
manually tested on AWS for IPU 7 -> 8 and 8 -> 9 as well. work as expected. |
Provide a new unified solution to enable User-Configurable actors.
The point is to introduce mechanism how various parts of workflow could be configured, on level actors which should be able to easily access configuration related to them (e.g. via a framework API if designed in such a way). So users will not have to create their own custom actors for all possibilities we provide right now, but they could simply create/update configuration files to achieve what they want.
Issues:
glob.glob
has no kw argumentrecursive=True
JIRA: OAMG-8803