-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
DashboardScene: Skip panel repeats when values are the same #87788
Conversation
This PR must be merged before a backport PR will be created. |
1 similar comment
This PR must be merged before a backport PR will be created. |
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.
@torkelo this works good in the following scenarios:
- Edit dashboard / go to settings / go back to dashboard - no query
- Edit dashboard / go to panel edit / go back to dashboard - no query
However I've observed awkward behavior when you go to panel edit, modify the multi value variable, and go back to the dashboard. Queries are not re-executed, and all repeated panels have the same data set. See the video:
Screen.Recording.2024-05-14.at.10.33.50.mov
@dprokop That should be fixed after merging, #87539 the upgrade to scenes lib has this fix: grafana/scenes#727 will test after merge and check |
…kip-when-value-same
@dprokop yes, after merging in main (after that row repeat PR) that issue is now fixed. |
…kip-when-value-same
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-87788-to-v11.0.x origin/v11.0.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 699c5bfe792adfa4a9030559e249af4938859dbc When the conflicts are resolved, stage and commit the changes:
If you have the GitHub CLI installed: # Push the branch to GitHub:
git push --set-upstream origin backport-87788-to-v11.0.x
# Create the PR body template
PR_BODY=$(gh pr view 87788 --json body --template 'Backport 699c5bfe792adfa4a9030559e249af4938859dbc from #87788{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v11.0.x] DashboardScene: Skip panel repeats when values are the same" --body-file - --label "type/bug" --label "area/frontend" --label "add to changelog" --label "backport" --base v11.0.x --milestone 11.0.x --web Or, if you don't have the GitHub CLI installed (we recommend you install it!): # Push the branch to GitHub:
git push --set-upstream origin backport-87788-to-v11.0.x
# Create a pull request where the `base` branch is `v11.0.x` and the `compare`/`head` branch is `backport-87788-to-v11.0.x`.
# Remove the local backport branch
git switch main
git branch -D backport-87788-to-v11.0.x |
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com> (cherry picked from commit 699c5bf)
Fixes panels being re-repeated (and new queries issued) when coming back from dashboard settings or panel edit (or view panel)