-
Notifications
You must be signed in to change notification settings - Fork 123
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
Make the result of an empty plan configurable #3042
Comments
@fhrdina1, @kkaarreell, @lukaszachy, @thrix, @happz, @Athwale, @psklenar, here's summary from our discussion. Please have a look. |
That is slightly inaccurate, I'd say: This is mostly fine in TF, where tmt run is created for each discovered non-empty plan, and then "all results" are suddenly "plan results". So here a flag would work seamlessly. But then runs with multiple plans arrive on the scene. How about turning the piece of code that decided the exit code ( results = [
result
for plan in self.plans
for result in plan.execute.results()]
...
raise SystemExit(tmt.result.results_to_exit_code(results))
# could become:
exit_codes = [
tmt.result.results_to_exit_code(plan.execute.results())
for plan in self.plans]
...
raise SystemExit(max(exit_codes)) And then we can change the loop and start involving the plan's flag to override that plan's evaluation of its results. This would materialize "plan result", in the sense of "an exit code a plan would produce if there were no other plans that might make the result even worse".
All in all, both approaches, a flag to turn "empty" into "success" or a flag to turn "empty" into a given exit code, seem fine to me. What happens when there are two plans in a run, one empty and one with failing tests - the usual "the worst wins" approach? |
I can also see this fitting in the For reference, |
I meant that currently we even do not define any final
Yes, "counting" the final exit code for each plan makes sense. On the other hand, I'm thinking, whether it would not be more natural for user to state the expected empty plan result as
If we provide overal
Interesting thought, storing the empty-plan-result flag in the |
I can see it go either way:
|
+1. It would follow the approach used by
Yep, that's the fun part :) We have 1 exit code and N plans, so eventually, we will need to reduce them somehow into a single number. Maybe both 3 and 4 have the same level of "badness", who knows... |
This issue has been escalated as part of TFT-2065. Not blocking the gating efforts as for them missing test coverage should not be ignored but still useful for some use cases like tier testing. Proposing as a |
When there is no test discovered (and executed) in any of the enabled plans which
tmt run
detects, it reports3
as the exit code. This is then handled as an error when executed in Testing Farm. Some users would like to make it configurable how the empty plan scenario is handled.The way proposed during the last discussion was to introduce a new option under the
plan
. It could look like this:Possibly the new
empty-plan-result
key could be stored under some of the steps, perhapsexecute
?The thing is that actually we don't have any plan result implemented. There are only
results.yaml
and based on them the appropriate exit code is reported. So should it be rather something like:Another approach could be that the
execute
step would create a dummy result with the provided value. This would also suggest that the new option should belong under theexecute
step. Thoughts?Related issue: https://issues.redhat.com/browse/TFT-2065
The text was updated successfully, but these errors were encountered: