-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fixing copy_dashboard for Metabase hosted in Heroku #38
base: master
Are you sure you want to change the base?
Conversation
This error happens when res returns false, with a 503 error, when using an Heroku instance. It will depend on the number and size of Heroku dynos. In my case this issue happened if the Dashboard contained more than 24 cards/questions. However the dashboard was created. We just need to pick the new dashboard id.
copy_dashboard function variable dup_dashboard_id
Hi @CesarVigario, thanks for the contribution. I'll review it soon. |
I believe the root cause of the issue needs to be explored further. Maybe there is a simpler and more general solution to the issue.
Have you found a threshold that if the number of cards is more than that threshold then the dashboard copy task fails? I need to reproduce the issue first. |
Hello @vvaezian , I agree that a simpler solution can be found. Regarding the threshold, in my case, it is 24 cards. However, I'm using a hosted Metabase in Heroku, and therefore this threshold may change, depending on the number of dynos. Remembering that, despite of the empty response when doing a post, the dashboard was in fact created. That's why I could pick the dashboard id and do a deep copy. I think this issue is caused by the Metabase API itself, not by your code. |
This PR is stale because it has been open for 30 days with no activity. |
This PR was closed because it has been inactive for 14 days since being marked as stale. |
Keeping this open. |
When the dashboard contains too many cards/questions, the function copy_dashboard fails.
What happens is: the variable "res" does not return a json and therefore the variable "dup_dashboard_id" raises a TypeError.
Despite of "res" returns false, the dashboard was indeed created in Metabase.
Therefore, if we could obtain the "dup_dashboard_id", we could move on inside the function and do a deep_copy.
The solution I found was to get all dashboards and pick the last one we created and select the id.