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

Dashboard: Fix library panels in collapsed rows not getting updated #66643

Merged
merged 1 commit into from
May 16, 2023
Merged

Dashboard: Fix library panels in collapsed rows not getting updated #66643

merged 1 commit into from
May 16, 2023

Conversation

VictorColomb
Copy link
Contributor

What is this feature?

This PR unifies the way that library panels are saved in a dashboard JSON, whether the library panel is in a collapsed row or not.

In practice, this PR modifies the way that a library panel inside a collapsed row gets saved.

{
    "gridPod": {...},
    "id": 123,
    "libraryPanel": {
        "uid": "z9imSuIVz",
        "name": "LIBRARY_PANEL_NAME"
    },
    "title": "PANEL_TITLE"
}

Why do we need this feature?

Library panels in collapsed rows are currently not being cleaned into the format just above and are therefore being saved with their model hardcoded. This means that they are not updated when the library panel has a new version (see attached issue below).

Who is this feature for?

Everyone!

Which issue(s) does this PR fix?:

Fixes #66640

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@VictorColomb VictorColomb requested a review from a team as a code owner April 16, 2023 19:42
@VictorColomb VictorColomb requested review from juanicabanas and evictorero and removed request for a team April 16, 2023 19:42
@grafanabot grafanabot added area/frontend pr/external This PR is from external contributor labels Apr 16, 2023
@VictorColomb
Copy link
Contributor Author

Ping @juanicabanas @evictorero

@VictorColomb
Copy link
Contributor Author

Hi @juanicabanas @evictorero (maybe @torkelo as well)!

Is there a hold up on this PR?

This is a pretty damaging bug for anyone who uses library panels and rows at the same time.
Could this therefore be backported to v10.0.0 since the release branch has already been created?

@torkelo
Copy link
Member

torkelo commented May 10, 2023

yes, I think this should be backported

@evictorero evictorero requested a review from a team May 10, 2023 21:45
@evictorero evictorero added type/bug no-changelog Skip including change in changelog/release notes backport v10.0.x labels May 10, 2023
@evictorero evictorero added this to the 10.0.0 milestone May 10, 2023
@evictorero
Copy link
Contributor

Hi @VictorColomb! I tested and it is working as expected. I'm not sure about backporting it though, I will ask the team for another look at this change because I don't have enough context about the side effect that this change could have.

@VictorColomb
Copy link
Contributor Author

I know it does in no way guarantee correct behavior, but to add some context, I forked main before the v10.0.x branch was created.

@dprokop dprokop requested a review from kaydelaney May 11, 2023 13:15
@kaydelaney kaydelaney added backport v9.5.x Bot will automatically open backport PR backport v9.4.x Mark PR for automatic backport to v9.4.x labels May 16, 2023
@grafanabot
Copy link
Contributor

The backport to v9.5.x failed:

Server Error

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-66643-to-v9.5.x origin/v9.5.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x f478504bc9f8cdf84cb53f0cfd8d521b398aa7e7
# Push it to GitHub
git push --set-upstream origin backport-66643-to-v9.5.x
git switch main
# Remove the local backport branch
git branch -D backport-66643-to-v9.5.x

Then, create a pull request where the base branch is v9.5.x and the compare/head branch is backport-66643-to-v9.5.x.

@grafanabot grafanabot added the backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. label May 16, 2023
grafanabot pushed a commit that referenced this pull request May 16, 2023
kaydelaney pushed a commit that referenced this pull request May 16, 2023
… updated (#68537)

Dashboard: Fix library panels in collapsed rows not getting updated (#66643)

(cherry picked from commit f478504)

Co-authored-by: Victor Colomb <51762123+VictorColomb@users.noreply.github.com>
kaydelaney pushed a commit that referenced this pull request May 16, 2023
…updated (#68536)

Dashboard: Fix library panels in collapsed rows not getting updated (#66643)

(cherry picked from commit f478504)

Co-authored-by: Victor Colomb <51762123+VictorColomb@users.noreply.github.com>
@zerok zerok modified the milestones: 10.0.0, 10.0.0-preview, 10.1.x May 31, 2023
kaydelaney pushed a commit that referenced this pull request Jun 1, 2023
…updated (#68535)

Dashboard: Fix library panels in collapsed rows not getting updated (#66643)

(cherry picked from commit f478504)

Co-authored-by: Victor Colomb <51762123+VictorColomb@users.noreply.github.com>
dsotirakis pushed a commit that referenced this pull request Jul 11, 2023
…updated (#68536)

Dashboard: Fix library panels in collapsed rows not getting updated (#66643)

(cherry picked from commit f478504)

Co-authored-by: Victor Colomb <51762123+VictorColomb@users.noreply.github.com>
(cherry picked from commit 5e25595)
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend backport v9.4.x Mark PR for automatic backport to v9.4.x backport v9.5.x Bot will automatically open backport PR backport v10.0.x backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. no-changelog Skip including change in changelog/release notes pr/external This PR is from external contributor type/bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

LibraryPanel: panels in a collapsed row do not update
7 participants