-
Notifications
You must be signed in to change notification settings - Fork 38
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
[TT-9420] Move status update out of CreateOrUpdate to prevent conflicts #642
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Burak Sekili <[email protected]>
Signed-off-by: Burak Sekili <[email protected]>
Signed-off-by: Burak Sekili <[email protected]>
Signed-off-by: Burak Sekili <[email protected]>
…s/tyk-operator into fix/TT-9420/apidef-errors
Signed-off-by: Burak Sekili <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
buraksekili
changed the title
Fetch the resource before updating it
[TT-9420] Move status update to out of CreateOrUpdate to prevent conflicts
Jul 13, 2023
buraksekili
changed the title
[TT-9420] Move status update to out of CreateOrUpdate to prevent conflicts
[TT-9420] Move status update out of CreateOrUpdate to prevent conflicts
Jul 13, 2023
komalsukhani
approved these changes
Jul 14, 2023
buger
pushed a commit
that referenced
this pull request
May 22, 2024
…ts (#642) * Fetch the resource before updating it Signed-off-by: Burak Sekili <[email protected]> * copy object onto new one Signed-off-by: Burak Sekili <[email protected]> * Use Patch instead of update requests Signed-off-by: Burak Sekili <[email protected]> * Bring Status check to back Signed-off-by: Burak Sekili <[email protected]> * Move status update out of CreateOrUpdate Signed-off-by: Burak Sekili <[email protected]> --------- Signed-off-by: Burak Sekili <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This PR moves Status updates in
r.create
method out of CreateOrUpdate function to prevent conflicts.Related Issue
https://tyktech.atlassian.net/browse/TT-9420
Motivation and Context
While creating an APIDefintiion for the first time, the operations are handled in CreateOrUpdate where the reconciled object will be saved or updated. If before finishing the execution of CreateOrUpdate, any status update operation updates
resourceVersion
which causes conflicts and retriggers reconciliation.Test Coverage For This Change
Screenshots (if appropriate)
Types of changes
Checklist
master
!master
branch (left side). Also, it would be best if you started your change off our latestmaster
.make manifests
make helm
gofmt -s -w .
go vet ./...
golangci-lint run