You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To solve #84494, we've settled on generating an RTK Query client and exposting that through @grafana/runtime. While this is relatively straight forward for 'legacy' APIs, new App Platform APIs may require more finesse to make them usable through code generation.
This POC should be timeboxed to 1-2 days to explore what the current state of OpenAPI -> RTK Query codegen is like for App Platform, and try to identify what more is needed to get it usable.
The content you are editing has changed. Please copy your edits and refresh the page.
Explored generating RTK Query clients from App Platform OpenAPI specs in #87545
It's a good start, but there's a bunch of usability issues with what's generated that we would like to address:
Clients are required to pass in namespace each time - we expect grafana to populate this automatically from config
We want to provide a higher-level api on top of some of the arguments, such as labelSelector / fieldSelector
‘Well known’ k8s annotations that have special meaning in grafana are typed too loosely (Record<string, string> instead of a specific interface)
Naming of endpoints and interfaces aren’t ideal. E.g. readNamespacedPlaylist instead of getPlaylist, or ComGithubGrafanaGrafanaPkgApisPlaylistV0Alpha1Playlist instead of Playlist
To solve #84494, we've settled on generating an RTK Query client and exposting that through
@grafana/runtime
. While this is relatively straight forward for 'legacy' APIs, new App Platform APIs may require more finesse to make them usable through code generation.This POC should be timeboxed to 1-2 days to explore what the current state of OpenAPI -> RTK Query codegen is like for App Platform, and try to identify what more is needed to get it usable.
Tasks
The text was updated successfully, but these errors were encountered: