Open kamilmielnik opened 1 week ago
@kamilmielnik FYI I've fixed the underlying issue on the backend in https://github.com/metabase/metabase/pull/50049 and re-enabled the Cypress test in question. So I think this can be closed once that merges. Let me know if you have any concerns.
Describe the bug
See: https://github.com/metabase/metabase-enterprise/issues/520#issuecomment-772528159
We have this test: https://github.com/metabase/metabase/blob/86ff88a/e2e/test/scenarios/permissions/sandboxes.cy.spec.js#L591-L606 The "normal" variant is an actual repro for https://github.com/metabase/metabase-enterprise/issues/520. This test is currently
@quarantine
d because it fails. It fails becausecard.result_metadata
of related card isnull
. It'snull
because the question has never been run.There are 2 real-world use-cases where it can happen:
So it means the problem (https://github.com/metabase/metabase-enterprise/issues/520) is still there. Sandboxing won't work correctly if the card's
result_metadata
isnull
.Suggested solution: POST
/api/mt/gtap
should throw an exception when related card does not haveresult_metadata
. Thanks to this, in 2 aforementioned cases we'd just inform the user that they need to run the question first before sandboxing it.Once we do this, we should replace these tests. We'd probably need 2 new tests:
/api/mt/gtap
throws an error when question has not been run and that this error is shown to the userTo Reproduce
Information about your Metabase installation
master, 6bf6a5de38
Severity
P3