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

Add revision number to VMClarity objects and support for If-Match header #269

Merged
2 commits merged into from
Jun 1, 2023

Conversation

ghost
Copy link

@ghost ghost commented Apr 24, 2023

Description

This adds a revision number to every VMClarity API object, this number can be used as an eTag in the API through the If-Match header to ensure that we avoid "lost update" issues while reconciling objects.

Type of Change

[ ] Bug Fix
[X] New Feature
[ ] Breaking Change
[ ] Refactor
[ ] Documentation
[ ] Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@ghost ghost force-pushed the etags branch 2 times, most recently from f901996 to 6cdc8cb Compare April 25, 2023 10:20
@ghost ghost marked this pull request as ready for review April 25, 2023 10:20
@ghost ghost self-requested a review as a code owner April 25, 2023 10:20
akpsgit
akpsgit previously approved these changes May 17, 2023
backend/pkg/database/gorm/scan.go Outdated Show resolved Hide resolved
backend/pkg/database/gorm/scan.go Outdated Show resolved Hide resolved
backend/pkg/database/types/database.go Outdated Show resolved Hide resolved
shared/pkg/backendclient/client.go Show resolved Hide resolved
FrimIdan
FrimIdan previously approved these changes May 18, 2023
FrimIdan
FrimIdan previously approved these changes May 22, 2023
@ghost ghost added this pull request to the merge queue May 24, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch May 24, 2023
This adds a revision number to every VMClarity API object, this number
can be used as an eTag in the API through the If-Match header to ensure
that we avoid "lost update" issues while reconciling objects.
Adds new helper functions which handle checking the revision against
IfMatch and also bumps the revision or sets the initial value if its not
set.
@ghost ghost added this pull request to the merge queue Jun 1, 2023
Merged via the queue into main with commit ff1de62 Jun 1, 2023
5 checks passed
@ghost ghost deleted the etags branch June 1, 2023 14:12
This pull request was closed.
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.

None yet

3 participants