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

fix #4888: narrowing where the 0 resourceVersion is used #4944

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

shawkins
Copy link
Contributor

@shawkins shawkins commented Mar 2, 2023

Description

Fix #4888

Narrowing the usage of 0 initial resourceVersion. We don't want to do this if:

  • there's a limit specified as it will be ignored by the api server.
  • there's initialState specified, since we don't know what the initial resourceVersion is. While things will be eventually consistent, it's best not to have any misleading events
  • we're doing some version of a wait or informOnCondition - as we saw with a couple integration tests that needed their conditions adjusted after this change, it can be unexpected that you are testing state from before the call is made - that is you create an resource, then make a waitOnCondition call and initially it appears that the resource doesn't exists.

This will mean that only direct usage of an informer will default to the 0/cached initial listing.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@sonarcloud
Copy link

sonarcloud bot commented Mar 9, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

64.7% 64.7% Coverage
0.0% 0.0% Duplication

@manusa manusa merged commit 5490ec1 into fabric8io:master Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Initial resourceVersion if initialState is used
3 participants