Skip to content

Conversation

@ederign
Copy link
Member

@ederign ederign commented Jan 6, 2026

Add proper conflict detection and HTTP 409 response for concurrent updates to catalog source configs using Kubernetes resourceVersion.

Changes:

  • Add concurrency test verifying resourceVersion is preserved through read-modify-write cycle
  • Add ErrCatalogSourceConflict sentinel error in repositories
  • Wrap K8s conflict errors in Create/Update/Delete operations
  • Add conflictResponse helper returning HTTP 409
  • Handle conflict errors in all catalog source config handlers

This ensures concurrent updates receive proper conflict errors instead of silently overwriting each other or returning 500 errors.

How Has This Been Tested?

make build

Merge criteria:

  • All the commits have been signed-off (To pass the DCO check)
  • The commits have meaningful messages
  • Automated tests are provided as part of the PR for major new functionalities; testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work.
  • Code changes follow the kubeflow contribution guidelines.

Add proper conflict detection and HTTP 409 response for concurrent
updates to catalog source configs using Kubernetes resourceVersion.

Changes:
- Add concurrency test verifying resourceVersion is preserved through read-modify-write cycle
- Add ErrCatalogSourceConflict sentinel error in repositories
- Wrap K8s conflict errors in Create/Update/Delete operations
- Add conflictResponse helper returning HTTP 409
- Handle conflict errors in all catalog source config handlers

This ensures concurrent updates receive proper conflict errors instead
of silently overwriting each other or returning 500 errors.

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
@ederign ederign requested a review from ppadti January 6, 2026 17:43
@ppadti
Copy link
Contributor

ppadti commented Jan 7, 2026

/lgtm

Copy link
Contributor

@lucferbux lucferbux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@lucferbux
Copy link
Contributor

/approve

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lucferbux

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 9430849 into kubeflow:main Jan 7, 2026
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants