Skip to content

[FEATURE] Add plugin versioning support + dashboard lock mode - #243

Open
Gladorme wants to merge 11 commits into
perses:mainfrom
Gladorme:versioning-lock
Open

[FEATURE] Add plugin versioning support + dashboard lock mode#243
Gladorme wants to merge 11 commits into
perses:mainfrom
Gladorme:versioning-lock

Conversation

@Gladorme

@Gladorme Gladorme commented Aug 20, 2026

Copy link
Copy Markdown
Member

Description

The goal of this PR is to improve the handling of plugin versioning in dashboard:

  • show plugin version in panel type selector if there is more than one version available
  • "lock" dashboard feature

What is doing the lock mode?
Lock will enforce versioning on all plugins. It will use latest version installed. When a new version is available, it will show a button to update, with a nice diff based on the first panel using the plugin (only for panel plugin). If the plugin version pinned is no longer available, it will show a error.

Blocked, need spec release v0.3.0-beta.4 fixed (token expired, need @Nexucis back :p) and need perses/plugins#773 too

Screenshots

image image

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.
  • E2E tests are stable and unlikely to be flaky.
    See e2e docs for more details. Common issues include:
    • Is the data inconsistent? You need to mock API requests.
    • Does the time change? You need to use consistent time values or mock time utilities.
    • Does it have loading states? You need to wait for loading to complete.

@Gladorme Gladorme changed the title Versioning lock [FEATURE] Add plugin versioning + dashboard lock mode Aug 20, 2026
@Gladorme Gladorme changed the title [FEATURE] Add plugin versioning + dashboard lock mode [FEATURE] Add plugin versioning support + dashboard lock mode Aug 20, 2026
@shahrokni
shahrokni self-requested a review August 21, 2026 10:52
@shahrokni

Copy link
Copy Markdown
Contributor

I see this PR is still in draft mode. Are you still working on this?

@Gladorme

Copy link
Copy Markdown
Member Author

I see this PR is still in draft mode. Are you still working on this?

No, the PR is ready, but it's depending on other PRs, so can't be merged

Comment thread dashboards/src/components/GridLayout/GridItemContent.tsx Outdated
Comment thread dashboards/src/components/GridLayout/GridItemContent.tsx Outdated
Comment thread plugin-system/src/runtime/plugin-registry.ts Outdated
Comment thread plugin-system/src/runtime/plugin-registry.ts Outdated
Comment thread plugin-system/src/runtime/plugin-registry.ts
Comment thread plugin-system/src/runtime/profile-queries.ts Outdated
Comment thread plugin-system/src/runtime/time-series-queries.ts Outdated
Gladorme and others added 9 commits August 29, 2026 01:35
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <gladorme@gmail.com>
@Gladorme
Gladorme marked this pull request as ready for review August 29, 2026 00:29
@Gladorme
Gladorme requested a review from a team as a code owner August 29, 2026 00:29
{isLinksEnabled && <EditDashboardLinksButton />}
<AddPanelButton />
<AddGroupButton />
<UpdatePluginsButton />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems this button also locks the version to the latest one. Should the update options allow to "unset" the version so always the latest is used?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well to set "unset", the best would be to use "Unlock" button. But it make me think it's better to enable this button/feature only if lock mode is available.

{isLinksEnabled && <EditDashboardLinksButton />}
<AddPanelButton />
<AddGroupButton />
<UpdatePluginsButton />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Admins might want to prevent unintended updates, I think we should add configuration so this can be disabled/hidden

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Like in previous comment, I will make this feature only available if lock mode is available. If admin don't want to allow user to upgrade version, it will need a change in back, because user can easily change version json directly

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In embedded usage, people can enable or disable the button separately (I added a new condition)

Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
return optionValue;
}
// The definition is not pinned (or is pinned to something we don't list): fall back to the first entry of that
// plugin kind, which is the one that will actually be used, so the Select has a matching value.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The first option in the dropdown might not be the latest version installed, which is the one it should fallback if there is no version installed. I wonder if we should flag the current latest inside the dropdown, I see a problem when you want to create a dashboard that uses the latest plugin version. If we just allow pinned versions from the dropdown this wont be possible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My main concern is that you pin a plugin version in your dashboard, then update perses and then the dropdown will select that version, but your dashboard still continues to be pinned to the older version.

Comment on lines +45 to +50
/**
* When true, offers the button that locks/unlocks the dashboard, i.e. pins every plugin it uses to an exact version.
* It only makes the action available: whether the dashboard is actually locked is derived from its plugin
* definitions. Not available by default. Plugin versioning itself is always on: the button that updates
* already-pinned plugins is shown regardless of this flag.
*/

@jgbernalp jgbernalp Sep 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I got lost on this comment, it says a lot of things but it seems contradictory in the button that updates already-pinned plugins is shown regardless of this flag. as the button is gated behind the isUpdateButtonAvailable.

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.

3 participants