fix #4081 #4082: correcting/removing versionable, also improving informOnCondition #4083
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.
Description
Fix #4081
Fix #4082
For #4081 we don't want waitable under versionable - waitable requires a list, which has "no older than" not exact resourceVersion semantics.
With kubernetes 1.19+ there is support for resourceVersionMatch, which includes resourceVersionMatch=Exact, but that should probably be supported with another method - withResourceVersion(version, match) that would return something listable / informable / waitable.
The condition logic in BaseOperation was also changed to check each item, rather than assume a single to support collection contexts.
@manusa noted a related issue that is appears at least projects do not support a fieldSelector of metadata.name, which is how we implement withName when watching/informing. This will need another issue to capture this in documentation and/or add a check for multiple items when only 1 is expected.
For #4082 the BaseOperation logic will perform / test the result of a list operation, then use that as the informer initial state - that ensures that initial add events won't be processed individually.
Type of change
test, version modification, documentation, etc.)
Checklist