-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
api/etcdhttp: change /health type back to string for backwards compatibility #9143
Conversation
cc @gyuho |
5a67f39
to
f77e54e
Compare
if we are going to revert this, we need to revert the newly added reason fields. I do not want to evolve the broken health endpoint if we do not want to fix it. But before doing anything, I want to understand why it is hard for application to adopt this change. |
That doesn't follow. A well-behaved, forwards-compatible json client ignores unknown fields, so adding the error details is far safer than changing the type of an existing field.
I'd actually ask the opposite question... I want to understand why it is hard for etcd to maintain compatibility here. Unless there's a compelling reason, etcd updates shouldn't require clients to rewrite their checks, or add check-bool-then-fallback-to-string logic. |
I do not want to evolve an API with a broken field that can never be fixed. The health API is not versioned from the beginning. |
If you have a way to fix this broken field while keep this exact http path and does not introduce any compatibility issue, I would like to hear. |
Then it seems like the right approach would be to live with the current state of the existing fields and only make changes in an additive way. |
Again,
If you do not help me to understand the above two questions, we will simply go circles here. |
That is unknowable. It affects any client that wrote a health check following the documented API. Don't assume all of those uses are published and public.
I don't see a strong case for breaking the existing API. The string can express everything the boolean can.
You can only add new fields, and as you do, indicate they are optional. For such a simple API as this, that takes you a long way. |
I fully understand how to keep a json API backward and forward compatible.
As I said, I would like to keep it as simple as possible if the API is unversioned and we 100% do not want to break it. So I told you to revert the other newly added fields, which make this API complicated. If we want a complicated healthy API, let us do it correctly if nothing can be changed. |
My only concern was fixing the compatibility break before 3.3.0 is released, which this PR does. I'll let @gyuho handle a complete revert of #8312 if that is what is desired instead. I will point out that @heyitsanthony had the same opinion on changing this field when you asked |
Codecov Report
@@ Coverage Diff @@
## master #9143 +/- ##
=========================================
Coverage ? 76.06%
=========================================
Files ? 359
Lines ? 30006
Branches ? 0
=========================================
Hits ? 22825
Misses ? 5599
Partials ? 1582
Continue to review full report at Codecov.
|
Talked with @xiang90. We think it's best to not break backward compatibility in this case. |
Fixes #9144
Fixes breaking change in /health API response prior to 3.3.0 release
Needs picking to release-3.3
Example impact of compatibility break is at kubernetes/kubernetes#58240