-
Notifications
You must be signed in to change notification settings - Fork 440
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
Rebase #3398 #3954
Rebase #3398 #3954
Conversation
Test results for e1296b4:debug build: 212 tests run: 202 passed, 0 failed, 10 (full report)release build: 212 tests run: 202 passed, 0 failed, 10 (full report) |
Note that PR changes tenant state to be serialized as snake case. Previously we've used snake case for metrics and Camel case for API. I followed the metrics reference because I'd like to keep compatibility with alerts. Can revert this change though and change alerts. |
f4d064b
to
a78be3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, wrote these while reviewing and now going to find myself an related issue to learn why we want the backtraces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm somewhat concerned about the state case change (Active
-> active
, etc.) which already had caused python e2e tests to fail.
Is console code and infra (periodic broken tenant checks at least?) good with this change?
I wonder, if we could somehow adjust the enum name representation via strum?
Otherwise looks better than I thought after seeing strum 🙂
I'm not aware of any external references to tenant state names besides metrics. I can revert this change, it feels controversial. In that case we'll need to change alerts to refer to Broken instead of broken for example |
3ce9f7d
to
6b65f1a
Compare
Moved to #3977 to clean up some things in tests first. |
76103c7
to
9b914cb
Compare
The problem is that we use different representations. Serde/http api uses Camel case, and metrics uses snake case that is handwritten. Strum supports global renaming, but to maintain compatibility we need two different ways. It can be done if needed (with a few extra allocations on metrics path). To the best of my knowledge there is only one dashboard that depends on names of tenant state reported via metrics, so I went ahead and changed metrics repr to use camel case as the rest of the places too. Will change a dashboard once the PR is merged. |
9b914cb
to
b2d7716
Compare
Getting this error from console e2e test that triggers migration:
I think it should be the only usage, so I think I'll just remove the state from response in the spec. It can be added back if needed. @SomeoneToIgnore wdyt? |
Backward compatibility with API is ensured by custom serialization with Display trait with strum Refactor TenantState usage to use Clone (#3001) Use reason in TenantState (#3001) Use strum dependency in pageserver (#3001) Add test for TenantInfo serde (#3001) Test debug formatting for TenantInfo (#3001)
2f501b2
to
a51d0b4
Compare
Rebased version of #3398, fixed surrounding code to use strum methods instead of our own as_str.