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

fix(dashboards): Make sure loading dashboard items does not POST /query/ #24808

Merged
merged 6 commits into from
Sep 9, 2024

Conversation

Twixes
Copy link
Member

@Twixes Twixes commented Sep 5, 2024

Problem

Shared dashboard items without previously cached results have not been loading correctly since we switched to async loading on shared dashboards. See this report: ZEN-17258.
We have a test which should have caught this long ago, but for some reason it was basically disabled in #21187.

Changes

This re-enables the test (it fails as expected on master), and adds a pollOnly flag to executeQuery, which allows us to use all the existing loading logic, the only change being that when we know the in-progress query ID (as is the case with GETting loading saved insights/dashboards), we don't POST /query/ needlessly – we only poll that known query ID.

How did you test this code?

E2E test.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

Size Change: +44 B (0%)

Total Size: 1.12 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.12 MB +44 B (0%)

compressed-size-action

@Twixes Twixes force-pushed the shared-dashboard-poll-only branch from db59695 to 66ed13a Compare September 5, 2024 14:07
@Twixes Twixes requested a review from a team September 5, 2024 15:57
@@ -29,7 +36,6 @@ export function queryExportContext<N extends DataNode>(
const SYNC_ONLY_QUERY_KINDS = [
'HogQuery',
'HogQLMetadata',
'EventsQuery',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was surprised that EventsQuery (aka activity view/data table) is sync-only! Please QA that async is good here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything works well. I tested various nodes of EventsQuery.

@Twixes Twixes merged commit 2d89685 into master Sep 9, 2024
93 checks passed
@Twixes Twixes deleted the shared-dashboard-poll-only branch September 9, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants