You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original intention was to implement what is said in this
[comment](teemtee#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 teemtee#4178, while we work on
a better overall solution where teemtee#3618 can be reimplemented, and teemtee#4178 is
still resolved. The ticket for the better solution is teemtee#4483
This PR reverts the tmt lint schema failure implemented to fix issue
teemtee#3618.
Fixes: teemtee#4178
0 commit comments