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

Plugins: Hide version information when plugin is managed #88065

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

wbrowne
Copy link
Member

@wbrowne wbrowne commented May 20, 2024

What this PR does / why we need it:
Adds the ability to mark a plugin as managed (dictated by backend interface) so that the plugin version cannot be modified by the user (as it is managed by Grafana). Currently Grafana Enterprise is what will control this logic (see PR here).

The UI is updated as demonstrated below.

Plugins list:

Old

Screenshot 2024-05-20 at 13 41 21

New

Screenshot 2024-05-20 at 13 43 36

Plugin details (not installed):

Old

Screenshot 2024-05-30 at 13 27 16

New

Screenshot 2024-05-30 at 13 26 42

Plugin details (update available):

Old

Screenshot 2024-05-20 at 13 41 41

New

Screenshot 2024-05-20 at 13 43 12

Version history:

Unchanged

image

Special notes for your reviewer:
https://github.com/grafana/grafana-enterprise/pull/6657

@wbrowne wbrowne added area/plugins no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels May 20, 2024
@wbrowne wbrowne added this to the 11.1.x milestone May 20, 2024
@wbrowne wbrowne self-assigned this May 20, 2024
@wbrowne wbrowne marked this pull request as ready for review May 20, 2024 16:52
@wbrowne wbrowne requested review from a team as code owners May 20, 2024 16:52
@wbrowne wbrowne requested review from Ukochka, marefr, andresmgot and xnyo and removed request for a team May 20, 2024 16:52
@sympatheticmoose sympatheticmoose self-requested a review May 20, 2024 17:01
Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

I'd assume we need to add something in the UI to indicate that the plugin is running in "managed" mode. @sympatheticmoose can confirm

pkg/api/dtos/plugins.go Outdated Show resolved Hide resolved
Copy link
Member

@xnyo xnyo left a comment

Choose a reason for hiding this comment

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

LGTM! Awesome work 🚀

Copy link
Member

@marefr marefr left a comment

Choose a reason for hiding this comment

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

Backend LGTM. Just a nit.

Something for later perhaps, should we skip managed plugins in pkg/services/updatechecker/plugins.go?

pkg/api/plugins.go Outdated Show resolved Hide resolved
Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

Code-wise LGTM, if you check that the UX is good then go ahead

Comment on lines +29 to +33
if (plugin.isManaged) {
info.push({
label: 'Version',
value: 'Managed by Grafana',
});
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is perfectly fine to iterate with. I would still recommend bringing to a UX feedback session before we go beyond dev.

A simple alternate would be 'Managed by Grafana' -> 'Latest'

I would almost expect something more like the signature shield where we could have the display value as Latest and then tooltip text of "The version of this plugin is managed by Grafana Labs"

Copy link
Contributor

Choose a reason for hiding this comment

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

I would almost expect something more like the signature shield where we could have the display value as Latest and then tooltip text of "The version of this plugin is managed by Grafana Labs"

💯 this is perfect. It's actually an advantage for us to manage the plugin 🏆

Copy link
Member Author

Choose a reason for hiding this comment

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

Would you folks prefer I roll with "Latest" as a first go in that case? I'll see if I can fiddle with some badge if you think that's worthwhile too.

I would like to get something in place first and then take to UX as you suggested @sympatheticmoose 👍 There's feature toggles in place to prevent us from turning this on automatically anyway so we'll be controlling this manually on a per instance basis to test with first.

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO I would do "Managed by Grafana Labs" + badge > Latest.

@wbrowne wbrowne requested a review from a team as a code owner May 30, 2024 10:49
@wbrowne wbrowne requested review from joshhunt and L-M-K-B and removed request for a team May 30, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend area/frontend area/plugins no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes
Projects
Status: 🔬 In review
Development

Successfully merging this pull request may close these issues.

None yet

6 participants