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

Migrate metrics_view to explore resources (breaking) #5722

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

begelundmuller
Copy link
Contributor

@begelundmuller begelundmuller commented Sep 18, 2024

NOTE: This PR is finished but awaiting frontend refactors.

This PR contains migrations and breaking API changes for the separation of metrics_view and explore resources. It should not be merged until the frontend has transitioned to consuming explore resources. It also requires the frontend to be adapted for the changed API signatures.

While this PR would break the current frontend, it does not contain any changes that are incompatible with previous CLI versions. So it is safe to merge once the frontend has been adapted for its changes.

Changes:

  • Adds version: 1 to the metrics view YAML generator.
  • Migrates all bookmarks with kind="rill.runtime.v1.MetricsView" to have kind="rill.runtime.v1.Explore".
  • Changes the magic auth token RPCs to have generic resource_type and resource_name properties instead of metrics_view. Specifically, the changes are:
    • resource_type: new field (set to rill.runtime.v1.Explore for existing rows)
    • resource_name: renamed from metrics_view
    • filter: renamed from metrics_view_filter
    • fields: renamed from metrics_view_fields
  • Also removes the metrics_view_ prefix for the filter and fields properties. The changes
  • Migrates existing magic auth tokens to have resource_type="rill.runtime.v1.MetricsView".
  • Changes the GetIFrame RPC to use a type parameter instead of kind since we prefer "type" in user-facing fields.
  • Changes the GetIFrame RPC to default to type="rill.runtime.v1.Explore" instead of type="rill.runtime.v1.MetricsView".

Frontend integration notes:

  • Create and consume bookmarks as pointing to explore resources instead of metrics view resources
  • Update the magic auth token RPC invocations to reflect the changed property names
  • Create and consume magic auth tokens as pointing to explore resources instead of metrics view resources
  • Update the embed page to accept explore resources instead of metrics views
  • When creating a metrics view YAML file, also create an explore YAML file (not sure where or what it should contain)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants