test(scorecard): log workload conditions/events upon failure #560
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.
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit -S -m "YOUR_COMMIT_MESSAGE"
Fixes: #559
Description of the change:
If an expected deployment doesn't become available within the time limit (10m), log the conditions and warning events of the deployment, its replica sets and pods.
I also increased the timeout for the scorecard tests since we use timeouts for blocking operations inside the tests themselves and I've found that if the Scorecard timeout occurs then we lose logs.
Motivation for the change:
If Scorecard tests are run on a cluster where we don't have access to logs, it would be helpful to include as much output as possible for why the tests failed.
How to manually test:
I built a test bundle and scorecard image from this PR. I also set the
CORE_IMG
toquay.io/ebaron/cryostat:does-not-exist
in order to cause an error during the test.make test-scorecard BUNDLE_IMG=quay.io/ebaron/cryostat-operator-bundle:replica-failure-03
Here's a sample of the output upon deployment failure: