-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 --status flag #1030
base: main
Are you sure you want to change the base?
Add --status flag #1030
Conversation
Hi! 👋 I'm looking at this issue in the context of Hacktoberfest 2021. If you think this PR has a meaningful change, and it might not be merged/approved before the end of the month, could you please label it with Thank you! |
📝 I've just noticed I did not do any sort of error handling/input check on the --status flag. I'll handle that as well, although it would be great if I could get some feedback before that, to ensure I'm on the right track. 🙏 |
Codecov Report
@@ Coverage Diff @@
## main #1030 +/- ##
==========================================
+ Coverage 63.56% 63.75% +0.18%
==========================================
Files 14 14
Lines 1905 1948 +43
==========================================
+ Hits 1211 1242 +31
- Misses 633 645 +12
Partials 61 61
Continue to review full report at Codecov.
|
Thanks for contributing, First I will check about the hacktoberfest. |
Hi @yoavrotems ! 👋 I'm not sure I understood what you meant with your comment on what the output should be, so I'll try to clarify it. 🙏 Do you mean that:
Thanks for the clarification! |
To make this more explicit and hopefully easier to communicate, here is the current output I get from integration tests when I modify them to pass As you can see, the whole output is only about the checks that Is this not what we want? |
Hey you were right in the first part
About the second part all of the output manipulation flags --noremediations --nosummary --noresults effects the stdout only and not the json. I saw the output you shared status wise it seems good, but I would skip printing remediation for not printed tests like you have with 3.1.1 3.2.1 3.2.2 those tests all are WARN so it not printed but the remediation do. If someone wanted to see all fails tests the it remediation I guess that WARN tests remediation is not relevant here. if so you should run --status="FAIL,WARN" wdyt? |
@yoavrotems Got it, that makes sense! I'll give it a look. 👌 |
Added a Summary.Results method to make it possible to get a specific State result.
Hello @yoavrotems 👋 How is this looking now? https://gist.github.com/mtpereira/12e0acb97a209b2ae72389d3a640ca28/revisions 📝 The code needs some refactoring, it is still not ready, but tests are 🟢 . |
Hey looks better the output that not including remediation when its not printing the test is great! |
Hi! 👋 Oh this might be tricky to handle! 😅 How do you suggest we go about this? Shall we merge one PR first and then proceed with the other? I'm fine either way. 👍 |
Let me check it and return to you on how we are going to accept the other PR because we might take as a flag to not break old behaviors |
Hey @mtpereira We would accept the #1035 PR but we will do it as a flag for now, the default will be using all of the statuses, but with flag I think that we can do in one of the two ways,
I think that the first option is the best but open to suggestions. |
Hello @yoavrotems ! 👋 Option 1 seems better to me as well! I'll give it a look once I have some spare time. 🙇 |
Fixes #918
This change adds the
--status
flag as described on the referenced issue, so thatkube-bench
will only log tests results with acheck.State
contained in the--status
flag. If the flag is not passed, all messages are logged.This does not affect the summary output.