-
Notifications
You must be signed in to change notification settings - Fork 70
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 a stable report identifier #669
Conversation
Can one of the admins verify this patch? |
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the If you want to re-run tests or request review, you can use following commands as a comment:
Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra. |
c4f5257
to
d532a49
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.
Just a few comments
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.
Just some replies
@fernflower I am not sure whether I get it, but if you plan to provide keys for reports from leapp-repository via a file in leapp, it's no go. |
@fernflower btw, remember to bump leapp-framework in the PR (and if another following PR is in leapp-repository, the leapp-framework requested values should be bumped there as well). See this doc for more info: https://leapp.readthedocs.io/en/latest/compatibility-with-leapp-repository.html |
@fernflower Hi Inna, will you add a test case when the key wasn't provided inside the report? |
Already there in all flavors I could think of https://github.com/oamg/leapp/pull/669/files#diff-298ab46eb87d51b2b477ad88e9730c63ea0885d7f797933de81e9a246b96c8f1 Did I miss some testcase? |
@fernflower already discussed that on IRC. Thx |
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.
Adding a question which might affect the implementation gradually
/cc @fernflower @pirat89
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 think we're mostly good to go, however what is not really clear to me is how do I set an ID for a dialog? i.e. add key
field to the DialogModel
? https://github.com/oamg/leapp/blob/master/leapp/models/__init__.py#L153 so that verifydialogs
in leapp-repository
can either forward what is in the model or fallback to autogeneration.
Great point, yeah, adding a key into the Dialog class and DialogModel should do this. To be honest now I am questioning if we need special "Dialog key auto generation" introduced in the commit cc727f0? Maybe it is cleaner to go with "by default all dialogs missing answers will have the same key generated by default" and then in the parallel leapp-repository patch specifically use a dialog.key in the create_report https://github.com/oamg/leapp-repository/blob/master/repos/system_upgrade/el7toel8/actors/verifydialogs/libraries/verifydialogs.py#L23? I am really not in favor of this "autogenerate the dialog stable report key in the framework by utilizing the implementation details of RelatedResource(sectionX) being present among the report entries" approach I had to use :( |
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.
Looks really good to me!
For test_create_report_stable_key I would go with the pytest.parametrize, as the current impl seems a bit bulky, but this is really a matter of taste.
+1 that the current tight coupling between leapp and leapp-repository via
This way we still retain the flexibility that workflows can decide when to collect+verify reports by flagging the particular phase with the Same ID for all dialog-based reports makes me really nervous, I can see people automating based on IDs and waiving more dialogs than they expect. |
No-no, I meant temporary (the "stable report key" is a feature that is not used anyway yet) until a parallel patch lands into leapp-repository for verifydialogs actor, smth like
|
A 'key' field will be added to each report entry. Same report entries on different machines should have the same 'key' value. From the user/contributor perspective the interface doesn't change, the framework will take care of stable identifiers' dynamic generation if the user doesn't set it.
296765e
to
ce2ae08
Compare
@AloisMahdal That's a fantastic example of the importance of cross-repo testing - the failure you discovered with the leapp-repository patch is actually caused by the leapp bug. By the way the upgrade was never continued, it broke pretty bad but didn't run without the filled-in answerfile. |
Fixed: as of
the upgrade is inhibited properly:
Thanks! |
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.
Lgtm and it seems it works as expected.
@fernflower you can do it in separate PR, but pls update the doc abou tthe reporting to reflect the possibility to add Key - including how people should generate the key. |
latest murphy-ci/* failures are caused by internal bug (my bad -- sorry) which is fixed now; re-running |
murphy-ci/integration - I have confirmed that the fail can be waived safely. i.e.: from QE POV, this PR is good to go. |
leapp-ci build |
2 similar comments
leapp-ci build |
leapp-ci build |
This final touch to stable id generation will make reports from the same actor but with different dialogs have different ids. Depends-On: oamg/leapp#669
just for info, current implementation includes the severity field when the default key is generated, but in case of the |
leapp-ci build |
e2e tests |
1 similar comment
e2e tests |
This final touch to stable id generation will make reports from the same actor but with different dialogs have different ids. Depends-On: oamg/leapp#669
This final touch to stable id generation will make reports from the same actor but with different dialogs have different ids. Depends-On: oamg/leapp#669
This final touch to stable id generation will make reports from the same actor but with different dialogs have different ids. Depends-On: oamg/leapp#669
## Packaging - Bump leapp-framework capability to 1.4 ## Framework ### Fixes - Replace functools.wraps with six.wraps (oamg#674) ### Enhancements - Add a stable report identifier (oamg#669) - Add a way to override default python version through environment variables (oamg#675) - Add a possibility to overwrite virtualenv name through environment variables (oamg#675) Related leapp-repository release: https://github.com/oamg/leapp-repository/releases/tag/v0.13.0
## Packaging - Bump leapp-framework capability to 1.4 ## Framework ### Fixes - Replace functools.wraps with six.wraps (oamg#674) ### Enhancements - Add a stable report identifier (oamg#669) - Add a way to override default python version through environment variables (oamg#675) - Add a possibility to overwrite virtualenv name through environment variables (oamg#675) Related leapp-repository release: https://github.com/oamg/leapp-repository/releases/tag/v0.13.0 # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Tue Feb 2 15:57:58 2021 +0100 # # On branch release/202102 # Your branch is up to date with 'drehak/release/202102'. # # No changes
## Packaging - Add JSON schema of leapp reports for validation (oamg#681) - Bump leapp-framework capability to 1.4 (oamg#684) ## Framework ### Fixes - Fix Py2/Py3 issues for unit-tests relying on __wrapped__ for decorators (oamg#674) ### Enhancements - Add a stable report identifier for each generated report (oamg#669) ## Additional changes interesting for devels - Add a possibility to overwrite virtualenv name for testing `$VENVNAME` (oamg#675) - Add a way to override default python version using `$PYTHON_VENV` (oamg#675) Related leapp-repository release: https://github.com/oamg/leapp-repository/releases/tag/v0.13.0
## Packaging - Add JSON schema of leapp reports for validation (oamg#681) - Bump leapp-framework capability to 1.4 (oamg#684) ## Framework ### Fixes - Fix Py2/Py3 issues for unit-tests relying on __wrapped__ for decorators (oamg#674) ### Enhancements - Add a stable report identifier for each generated report (oamg#669) ## Additional changes interesting for devels - Add a possibility to overwrite virtualenv name for testing `$VENVNAME` (oamg#675) - Add a way to override default python version using `$PYTHON_VENV` (oamg#675) Related leapp-repository release: https://github.com/oamg/leapp-repository/releases/tag/v0.13.0
## Packaging - Add JSON schema of leapp reports for validation (#681) - Bump leapp-framework capability to 1.4 (#684) ## Framework ### Fixes - Fix Py2/Py3 issues for unit-tests relying on __wrapped__ for decorators (#674) ### Enhancements - Add a stable report identifier for each generated report (#669) ## Additional changes interesting for devels - Add a possibility to overwrite virtualenv name for testing `$VENVNAME` (#675) - Add a way to override default python version using `$PYTHON_VENV` (#675) Related leapp-repository release: https://github.com/oamg/leapp-repository/releases/tag/v0.13.0
A 'key' field will be added to each report entry. Same report entries on different machines should have the same 'key' value.
From the user/contributor perspective the interface doesn't change, if the Key with the unique report key is not defined in the report entries passed to the create_report command, the framework will take care of stable identifiers by generating one from the required report fields or will raise a ValueError in case LEAPP_DEVEL_FIXED_REPORT_KEY environment
variable is defined.
This fallback behavior will be the last resort once all actors in the leapp-repository are updated.