-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Logs UI] Versioning for Logs related APIs #158710
[Logs UI] Versioning for Logs related APIs #158710
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
…ni/kibana into 157324-version-logs-http-routes
…ni/kibana into 157324-version-logs-http-routes
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
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.
note: I'm not sure why GH see this as a file rename and changed, they were completely different files.
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! Clean work 🚀
Just out of curiosity, if we wanted to upgrade a route version now. What steps do we need to take?
Add a new version folder for the set of interfaces and expose them, then add a new version to the registered route? or something is missing
@@ -60,11 +60,11 @@ export const getLogEntryExamplesSuccessReponsePayloadRT = rt.intersection([ | |||
]); | |||
|
|||
export type GetLogEntryExamplesSuccessReponsePayload = rt.TypeOf< | |||
typeof getLogEntryExamplesSuccessReponsePayloadRT | |||
typeof getLogEntryExamplesSuccessResponsePayloadRT |
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.
Good Catch :)
Hey there, the documentation for the Kibana versioned router and versioning interfaces explain step-by-step what the process of versioning a new API looks like, but basically it reduces to:
export * from './v1';
export type MyType = string N.B. the documentation speaks about a single file for the version definition, but since we could have more endpoints under the same group and we could version them together, using a folder applies in the same way.
|
…ni/kibana into 157324-version-logs-http-routes
…ni/kibana into 157324-version-logs-http-routes
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
📓 Summary
Closes #157324
Closes #159275
Closes #159303
This work converts the APIs related to the Logs UI feature into versioned APIs using the new Kibana versioned router.
The converted APIs are the following, where each endpoint now is set to version
1
:The PR also includes moving the interfaces and runtime types relatives to each endpoint's group into the recommended practices for versioning interfaces.
🧪 Testing