-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Runtime error during question save after cloning a dashboard #32022
Conversation
Current Cypress Test Results Summary✅ 179 Passing - ❌ 1 Failing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 07/03/2023 02:01:40pm UTC) Run DetailsRunning Workflow E2E Tests on Github Actions Commit: e9ecd05eb7ca19ee90ae800e2abadf836e06dec4 Started: 07/03/2023 01:30:25pm UTC ❌ Failures📄 e2e/test/scenarios/dashboard/dashboard-back-navigation.cy.spec.js • 1 FailureTest Case Results
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
scenarios > x-rays "X-RAY" should work on a nested question made from base native question (#15655)
Retry 1 • Initial Attempt |
0% (0)0 / 396 runsfailed over last 7 days |
3.03% (12)12 / 396 runsflaked over last 7 days |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #32022 +/- ##
=======================================
Coverage 74.23% 74.23%
=======================================
Files 2911 2911
Lines 103556 103566 +10
Branches 12867 12868 +1
=======================================
+ Hits 76874 76883 +9
+ Misses 20851 20850 -1
- Partials 5831 5833 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
@@ -227,6 +228,25 @@ describe("dashboard reducers", () => { | |||
}, | |||
}); | |||
}); | |||
|
|||
it('should not generate runtime error for missing update data in "metabase/entities/questions/UPDATE" action payload', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like we're fixing a symptom, not the problem.
I think we should go deeper and find out why the update data is missing and fix that.
When I follow reproduction steps from the issue (cloning this particular dashboard) I get JS errors in the console.
Looks like some data may not be reaching the store because of this. Have you tried investigating these?
fetchDashboardCardMetadata
crashing ⬅️
- screenshot
- notice that
await dispatch(loadMetadataForDashboard(cards));
is never reached - perhaps this is the reason? - looks related to permissions - we're cloning charts that we don't have writable access to? just guessing
Selector crashing
- screenshot
- probably unrelated, but worth noticing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @kamilmielnik , we should investigate it further
25bb772
to
824acbf
Compare
@kamilmielnik, @ranquild, thanks for your comments. I added fixes for issues that Kamil reported and also added a unit test to check this. I tried editing cards right after dashboard duplication, when it seems we might miss metadata, but this also didn't help to reproduce the initial issue. Also, based on what I saw in the code, a situation when requests metadata for a question fail due to lack of permissions is normal. In such case we should not have possibility to edit this question, which seems to be not an issue for Max. I would suggest continue with this fix and then check if it helped Max. This would allow us to pin-point the issue and then untangle it to realize why card object could be null in this reducer. WDYT? |
I also couldn't reproduce the issue.
👍 awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment from @kamilmielnik doesn't seem to be addressed
Hey @ranquild. It is true that I haven't reproduced the initial issue reported by Max, but this this will allow to pin-point it. I think we should proceed with this PR and re-check its effect with Max. |
Can you please explain how?
Did you try reproducing it with Max? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In we cannot reproduce the issue, I'd better not make any workarounds like this. We should probably just add .Difficulty: Hard
label and postpone the issue for now.
I tried different scenarios, but no luck reproducing described issues on local setup. So, for now I will close this PR. |
Potentially closes #31766
Description
This is a follow-up for #31822, adding a fix for the issue found based on provided logs.
How to verify
Still haven't managed to reproduce initial issue. So, it is a blind fix.
Checklist