Skip to content
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

Don't complain about missing revision for multiple targets #149

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

timebertt
Copy link
Owner

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:

    [err] error: no revisions found for daemonset.apps/pause

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.

@timebertt timebertt added the bug Something isn't working label Jan 17, 2025
@timebertt timebertt merged commit 32f2837 into main Jan 17, 2025
3 checks passed
@timebertt timebertt deleted the deflake-e2e-all-namespaces branch January 17, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant