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

Metrics (v1) revisions API is broken #42633

Closed
nemanjaglumac opened this issue May 14, 2024 · 0 comments · Fixed by #42634
Closed

Metrics (v1) revisions API is broken #42633

nemanjaglumac opened this issue May 14, 2024 · 0 comments · Fixed by #42634
Assignees
Labels
Administration/Metrics & Segments Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness .Regression/master Regression that is only present on master, or bug in new upcoming feature .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Milestone

Comments

@nemanjaglumac
Copy link
Member

Describe the bug

When trying to view revisions for a metric, the spinner keeps loading forever. The console warns that the endpoint doesn't exist.

image

To Reproduce

  1. Go to /admin/datamodel/metric/1/revisions
  2. See the loading spinner
  3. Check the console and notice 404 for the /api/metric/1/revisions

Expected behavior

One should be able to load metric revisions, just like it's currently possible for segments.

Logs

No response

Information about your Metabase installation

local dev, `master`, f52e02f, H2, Sample Database

Severity

P1

Additional context

This became broken when we renamed the legacy metrics in #39232.

The code is calling fetchRevisions action, which invokes RevisionsApi under the hood.
We missed this because /revisions wasn't a part of Metrics entity or the metrics api.

@nemanjaglumac nemanjaglumac added Type:Bug Product defects Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Administration/Metrics & Segments .Regression/master Regression that is only present on master, or bug in new upcoming feature labels May 14, 2024
@nemanjaglumac nemanjaglumac self-assigned this May 14, 2024
@nemanjaglumac nemanjaglumac added this to the 0.50 milestone May 14, 2024
nemanjaglumac added a commit that referenced this issue May 14, 2024
nemanjaglumac added a commit that referenced this issue May 14, 2024
nemanjaglumac added a commit that referenced this issue May 14, 2024
* Fix broken metric revision API call

Fixes #42633

* Add E2E repro for #42633

* Fix metrics revision history in the data reference

* Add repro for #42633 for the reference page

* Consolidate tests

* Do not use hard coded id

* Fix lint errors
johnswanson pushed a commit that referenced this issue May 14, 2024
* Fix broken metric revision API call

Fixes #42633

* Add E2E repro for #42633

* Fix metrics revision history in the data reference

* Add repro for #42633 for the reference page

* Consolidate tests

* Do not use hard coded id

* Fix lint errors
@nemanjaglumac nemanjaglumac added the .Reproduced Issues reproduced in test (usually Cypress) label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Administration/Metrics & Segments Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness .Regression/master Regression that is only present on master, or bug in new upcoming feature .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant