-
Notifications
You must be signed in to change notification settings - Fork 162
reportportal schema should not require project key #4445
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
Closed
tcornell-bus
wants to merge
2
commits into
main
from
tcornell-reportportal-schema-no-req-project-key
Closed
reportportal schema should not require project key #4445
tcornell-bus
wants to merge
2
commits into
main
from
tcornell-reportportal-schema-no-req-project-key
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin schema since it can be specified in TMT_PLUGIN_REPORT_REPORTPORTAL_PROJECT environment var or on the commandline. The reportportal plugin code appears to alredy handle when the project key is not specified in any of the allowed forms. It throws an exception. The added test requires reportportal access and can be run locally.
back to the default test_tmt
Contributor
|
From the discussion at hacking meeting turn the missing required key a warning in tmt lint and keep the key as required. File a new issue to track a proper fix which would ignore the schema and use the step data of the plugin for validation of the required keys and drop the required keys from the schema. |
Collaborator
Author
|
Closing in favor of #4481 |
This was referenced Jan 13, 2026
happz
pushed a commit
that referenced
this pull request
Jan 18, 2026
The original intention was to implement what is said in this [comment](#4445 (comment)). The issue I ran into is that when I have `tmt lint` emit a schema (pass or warn) if the only error is the `detect_missing_required_properties`, then it still fails because almost always this check `detect_enum_violations` also fails when a required key is missing. `detect_enum_violations` is triggered when `how` is used and the required key is missing because it cycles through all of the values and tells you when the first 9/10 did not match. Cursor analysis of why this occurs (better explanation than mine): > Explaining why enum violations only appear when the required property is missing: > The schema uses `oneOf` for the report step, which requires exactly one schema to match. Here's what happens: > When the `project` key (required property) is present: > The `reportportal` schema matches (`how: reportportal` and `project` are present) > Since `oneOf` requires exactly one match and reportportal matches, validation succeeds > No enum violations occur because the validator doesn't try other schemas > When the `project` key (required property) is missing: > The `reportportal` schema fails (missing required `project`) > Since `oneOf` requires exactly one match and `reportportal` failed, the validator tries other schemas (display, html, junit, polarion) > Each alternative fails because `how: reportportal` doesn't match their enum values (they expect how: display, how: html, etc.) > These enum violations are reported as the validator tries each alternative So, it's not simple to turn _only_ the missing required key into a warning in `tmt lint` since even if that error is not counted, another error still occurs, still resulting in an overall `tmt lint` failure. After some discussion with @LecrisUT, @happz, and @thrix, reverting the FAIL to a WARN would unblock the CI failures for #4178, while we work on a better overall solution where #3618 can be reimplemented, and #4178 is still resolved. The ticket for the better solution is #4483 This PR reverts the tmt lint schema failure implemented to fix issue #3618. Fixes: #4178
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
code | schema
Schema used for validating config files
plugin | reportportal
The reportportal report plugin
status | discuss
Needs more discussion before closing
step | report
Stuff related to the report step
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do not require the project key in reportportal plugin schema since it can be specified in TMT_PLUGIN_REPORT_REPORTPORTAL_PROJECT environment var or on the command line.
The reportportal plugin code appears to already handle when the project key is not specified in any of the allowed forms. It throws an exception.
The added test requires reportportal access and can be run locally. Since I do not have access to
test_tmtreportportal project, I used my personal project for testing.I went down a rabbit hole of trying to fix the tests in
tests/report/reportportal/data/test.fmf, but it was taking a considerable amount of time. I am about halfway through fixing them, so I may follow up with a PR to fix those.Fixes: #4178
Pull Request Checklist