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

[Logs UI] Version the logs-related HTTP routes #157324

Closed
weltenwort opened this issue May 10, 2023 · 3 comments · Fixed by #158710
Closed

[Logs UI] Version the logs-related HTTP routes #157324

weltenwort opened this issue May 10, 2023 · 3 comments · Fixed by #158710
Assignees
Labels
Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services

Comments

@weltenwort
Copy link
Member

📓 Summary

Now that #153858 and #150705 have been merged we can proceed in converting the HTTP APIs registered for the Logs UI to use the versioned router.

✔️ Acceptance criteria

  • All logs-related HTTP routes registered by the infra plugin are migrated to use the versioned router as described in the guidelines.
  • Since all the logs-related APIs are internal they are initialized with a version of 1.

💡 Notes

  • The HTTP API runtime types and interfaces derived from them could be moved to v1 files already. But in order to keep the task small that could also happen on-demand when the first version increment becomes necessary.
@weltenwort weltenwort added Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels May 10, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@tonyghiani tonyghiani self-assigned this May 31, 2023
@tonyghiani
Copy link
Contributor

@weltenwort just to clarify the scope of this issue, we want to apply the new versioning to the following routes groups:

Is the above selection correct or there's anything extra/missing?

@weltenwort
Copy link
Member Author

yes, that list looks about right to me 👍

tonyghiani added a commit that referenced this issue Jun 8, 2023
## 📓  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](https://docs.elastic.dev/kibana-dev-docs/versioning-http-apis#4-adhere-to-the-http-versioning-specification).

The converted APIs are the following, where each endpoint now is set to
version `1`:
-
[log_views](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/server/routes/log_views)
-
[log_entries](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/server/routes/log_entries)
-
[log_analysis](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/server/routes/log_analysis)
-
[log_alerts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/infra/server/routes/log_alerts)

The PR also includes moving the interfaces and runtime types relatives
to each endpoint's group into the recommended practices for [versioning
interfaces](https://docs.elastic.dev/kibana-dev-docs/versioning-interfaces).

## 🧪 Testing

- Navigate to the Logs UI settings page and verify the log view is
correctly retrieved and can be successfully updated.
- Navigate to the Logs stream page and verify the stream entries are
retrieved and rendered.
- Navigate to the Anomalies and Categories pages page and verify the
anomalies entries are retrieved and rendered correctly.
- Create a Log threshold alert and verify the chart preview data are
correctly retrieved and shown.

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants