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(konnect): handle KongRoute conflict on creation #752

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Oct 17, 2024

What this PR does / why we need it:

Follow up on #749 for KongRoute.

@pmalek pmalek added this to the KGO v1.4.x milestone Oct 17, 2024
@pmalek pmalek self-assigned this Oct 17, 2024
@pmalek pmalek requested a review from a team as a code owner October 17, 2024 18:22
@pmalek pmalek force-pushed the konnect-uid-adoption-routes branch from 1741f27 to 2b6fbdb Compare October 17, 2024 18:22
@pmalek pmalek force-pushed the konnect-uid-adoption-routes branch from 2b6fbdb to c87d1dd Compare October 17, 2024 19:01
Copy link
Contributor

@randmonkey randmonkey left a comment

Choose a reason for hiding this comment

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

Generally LGTM, some minor comments remaining.

GetID() *string
}

func fromSliceToSlice[T any](
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we some comments and give it a clearer name? fromSliceToSlice is really hard to understand.

@@ -126,7 +126,7 @@ func Create[

switch {
case errors.As(err, &errConflict) ||
// Service API returns 400 for conflicts
// ControlPlane resource APIs return 400 for conflicts
errSdkBody.Code == 3 && errSdkBody.Message == "data constraint error":
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we define some function or constant to eliminate the magic number and string here?

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.

2 participants