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

Upsert target is not an upsert #12987

Open
1 task done
Sharparam opened this issue May 6, 2024 · 4 comments
Open
1 task done

Upsert target is not an upsert #12987

Sharparam opened this issue May 6, 2024 · 4 comments
Assignees

Comments

@Sharparam
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Kong version ($ kong version)

Kong 3.6.1

Current Behavior

Calling PUT /upstreams/{upstreamName}/targets/{target} returns 404 even though documentation says it is an upsert operation.

Expected Behavior

Calling the PUT endpoint should create the target if it does not exist.

(Creating a target with a POST request and then updating it with PUT works.)

Steps To Reproduce

  1. Create an upstream.
  2. Use the PUT API to upsert a target to it.

Anything else?

No response

@bungle
Copy link
Member

bungle commented May 7, 2024

Looks to be same as update:
https://github.com/Kong/kong/blob/master/kong/api/routes/upstreams.lua#L216-L221

Not sure, but this may be because of historical purposes. But doc seems be then wrong. One of them is wrong.

@bungle
Copy link
Member

bungle commented May 9, 2024

I discussed this with @locao, and it looks like it is a bug (in code).

@chronolaw
Copy link
Contributor

@bungle , do we have a ticket to track it?

@samugi samugi added the bug label May 13, 2024
@ADD-SP ADD-SP assigned chobits and unassigned chobits May 13, 2024
@samugi
Copy link
Contributor

samugi commented May 13, 2024

--> KAG-4475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants