Don't complain about missing revision for multiple targets #149
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.
kubectl revisions get -A -l ...
frequently fails in the e2e test case[It] should list revisions of label-selected resources in all namespaces
with the following output on stderr:The test case itself doesn't even create a workload object called
pause
, so it can only be a left-over from a previous test in another namespace.When a test case finishes, the namespace is deleted and cleaned up asynchronously. Hence, the first list call for the workload object (e.g.,
DaemonSet
) might still contain an object from a previous test, but the second list call for the revisions object (e.g.,ControllerRevision
) might not have a matching object for the workload object.Generally, we can assume that this only happens in racy test environments and almost never in real scenarios.
Even if it happened in the real world, failing because of a half-terminated object doesn't seem correct.
Hence, this PR changes the logic of the
get
command to not complain about missing revisions for a single workload object when targeting multiple objects.If the
get
command can't find any revisions for all targeted workload objects, it still complains.There is also a second commit that improves the deflaking workflow.