-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Reporting] Saved POST URLs for dashboard are not migration-capable #103561
Comments
Pinging @elastic/kibana-app-services (Team:AppServices) |
Pinging @elastic/kibana-app (Team:KibanaApp) |
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
This seems like an issue with how dashboard is integrating with the share plugin - how can the Kibana app help here? |
@joe most likely we'll resolve this internally. Once new URL service gets introduced reporting will no longer store the URL but |
@flash1293 as Peter mentioned, we have already-planned work to add a new export type that does not store the URL but will use a versioned state object that can be converted into a deep-link URL at runtime. We planned on doing this as a solution towards not requiring the dashboard to be saved before creating a report. It turns out to be a convenient answer to preventing issues like this one with non-versioned Lens state being in the URLs. To really close this issue, we need to observe the impact of this bug. If it gives no clear reason for a report failing other than "time out" then we need to fix that so the user sees information that guides them towards fixing the POST URL they have saved for automation and set up in an older version. |
@tsullivan I just tested and this is how it fails: We could add a generic try catch in the right place, rewrite the error to say something generic like |
@flash1293 could the app tell based on the URL having unversioned state that rendering will be a problem? If the app can detect an upcoming failure, it could signal that to Reporting by adding error text in an agreed-upon data attribute in a DOM element. Data attributes in the app have always been used to "talk" to Reporting.
Reporting will select for elements that have the |
I looked into the code and it seems like a panel can be turned into a proper "ErrorEmbeddable" by emitting an error in the output observable of the embeddable instance. The Lens embeddable could catch the error happening and do exactly that - the dashboard should handle it from there.
@ThomThomson Does this sound like a good approach? If yes I can open an issue for that, it's something that would be good to have even unrelated to this specific bug. Edit: Actually I'm not sure whether the dashboard will set |
another thing to note: if dashboard would be doing client side migrations this wouldn't be an issue cc @ThomThomson |
@flash1293, the more errors that are caught correctly the better, and I can look into implementing @ppisljar, I agree that once we figure out persistable URLs - whether the solution is clientside migrations or not - this issue will disappear. In the meantime, better error reporting seems like a good direction to take this. |
@ThomThomson and I met to chat about this issue. Here are some of the important points from our discussion:
Given all of the above I think the following steps could be taken:
Please keep honest about any of the above @ThomThomson and @tsullivan |
Some clarification for potential task #5: There is already a user-facing copy generation step which should be happening when the embeddables surface errors. |
Related issue: #97904 Reporting fails the report if there is a missing saved object referenced in a dashboard panel. I think our conversation going on in this issue about |
removing vis editors label as the embeddable error reporting part is split out in a separate issue. |
After merging:
We should be in a good position to help users out when their Reports are not generating as they expect, for whatever reason. The primary purpose of this issue was to explore how to deal with un-migratable state in reporting URLs which is something we addressed moving forward by adding a locator which should migrate state (#108553). For old URLs that may be running into this issue, users should now get a message from reporting stating that, for e.g., 3/4 visualizations are not rendering. There is follow up work in Lens to provide better messaging (see #104395) where old state can be called out. Anyone please feel free to re-open if they feel differently! |
Kibana version: This affects migrations:
It's possible to create a scheduled report (using a POST URL in Watcher or a shell script) using Kibana 7.13 and get a bug after upgrading to Kibana 7.14 or above. This is because the POST URL string stores dashboard state that might only work in 7.13.
Steps:
test_post_url.sh
, runchmod a+x test_post_url.sh
, then run:The job will fail due to a TypeError on the page when the report job executes.
Notes:
ShareContext.shareableUrl
which includes the state of the dashboard: it is not just a link to the dashboard by ID. This is also referred to as a "snapshot URL"jobParams
data in the POST URL by decoding the URI-encoded characters, and converting the string of RISON data into JSONcc @stacey-gammon @ThomThomson @jloleysens @streamich @ppisljar
cc @elastic/kibana-reporting-services
[Petr] Testing sync of bug label....
The text was updated successfully, but these errors were encountered: