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.
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
Bumped dependencies #1420
Bumped dependencies #1420
Changes from 9 commits
7f3273a
0fa5990
485ad50
ba051a3
fa8fda2
040243e
cd8b917
0b88fc2
06fafe0
7c90c51
17fe27a
87e198c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was failing without explicitly using namespace
default
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NewFakeClient
method is deprecatedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another case where a test started to fail without an explicit
default
namespace.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I feel like this behavior as tested is wrong. It should only be setting the namespace if it isn't set. Do you know what changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, for anybody who is interested: after some researching and debugging, I believe it was this change in go-client testing fixture that made this test fail. The commit description says it all.
As for the default client, this is also explicitly forbidden. Another mystery solved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did something in the CRD API change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my comment below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have one more condition now:
and with that, the test became flaky. I'm not sure if it takes a while for the transition to happen or smth. else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so I've got to the bottom of it (which in the hindsight wasn't very deep): with three conditions, they sometimes simply come out of order and test-harness expects the same order of elements when comparing slices in the IsSubset method. A quick test confirms:
However, it turns out we can not omit the conditions here:
but the second create-step (not the assert one) occasionally fails with
the server could not find the requested resource
because the CRD hasn't gone through all transitions yet.I'd suggest fixing
IsSubset
comparing slices but I'm not sure about all the implications. /cc @justinbarrickThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, right now it is order dependent, I need to evaluate existing tests to see if order is often important. IIRC @alenkacz and I discussed this a while back but I don't remember where we landed on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so I avoided the problem for this bump by changing the CRD name/group to
prowjobs.prow.example.com
(instead of*.k8s.io
) which doesn't require the annotation and so we only have the same two conditions as before (these two do not come out of order).However, the bigger question stays: I'm not sure if k8s guarantee array elements order in all places. We might want to relax the current subset comparison to be order independent or give the user the choice to use both (some sort of annotation maybe?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the PR in the annotation for more details on why this is needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here