-
Couldn't load subscription status.
- Fork 8.5k
[OpenAPI][SLO] Add discriminator to timeslice metrics types #227400
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
[OpenAPI][SLO] Add discriminator to timeslice metrics types #227400
Conversation
Signed-off-by: lloydmeta <[email protected]>
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
|
💚 CLA has been signed |
Signed-off-by: lloydmeta <[email protected]>
|
Thanks for this contribution! To help with the review process and make this change easier for other contributors to understand, could you add a bit more context to the PR description? It would be helpful to know "What problem this this PR solves or the issues you are running into?" This additional context will make it much easier for reviewers to understand the motivation and impact of the change. Thanks! |
Done. Also note that there is some urgency here in the last point I added to the description
|
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.
Docs change LGTM
💚 Build Succeeded
Metrics [docs]
History
|
|
@elastic/obs-ux-management-team @elastic/core-docs your review is needed to get this merged (kind reminder there is some urgency) 🙏🏼 |
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.
LGTM !!
…227400) ## Summary Adds a discriminator to the SLO timeslice metric type in OpenAPI. Signed-off-by: lloydmeta <[email protected]> Signed-off-by: lloydmeta <[email protected]>
…227400) ## Summary Adds a discriminator to the SLO timeslice metric type in OpenAPI. Signed-off-by: lloydmeta <[email protected]> Signed-off-by: lloydmeta <[email protected]>
Summary
This PR adds a discriminator to the SLO timeslice metric types in the OpenAPI specification. The discriminator is introduced to address a critical issue encountered with client generation and data marshalling; specifically, when handling polymorphic metric types like
percentile, which is a superset of the basic field metric type. Without a discriminator, clients (such as the Terraform provider) will incorrectly unmarshal data, defaulting fields likepercentileto zero due to ambiguous type resolution.Why is this needed?
metricsintended to be of thepercentiletype are instead parsed as the basic field metric type, losing the percentile field (see discussion). This leads to incorrect default values and change detection issues in downstream systems.Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.Identify risks
n/na
Related
elasticstack_kibana_slo(supporting percentile aggregations) terraform-provider-elasticstack#814