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

Failed delete must return a ResponseRange instead #147

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

neoaggelos
Copy link
Contributor

Summary

Follow-up PR for #145 to account for delete operations that do not succeed.

For more context see:

@brandond Apologies for the initial PR being incomplete, I'm testing this as I go as well :) With this change I don't see anything blowing up, so things should be fine now.

Signed-off-by: Angelos Kolaitis <neoaggelos@gmail.com>
@brandond
Copy link
Member

Right, this would probably be harder to get wrong if we actually looked at the transaction operation that the apiserver is trying to do, instead of assuming it and hardcoding the responses. Unfortunately, making assumptions is a lot easier than implementing the full transaction syntax.

This says "if the revision is equal, then delete, otherwise get": https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go#L326-L332

@brandond brandond merged commit aade545 into k3s-io:master Nov 21, 2022
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.

2 participants