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

Display plugin health score details on individual pages #1431

Merged
merged 30 commits into from
Oct 24, 2023

Conversation

alecharp
Copy link
Contributor

@alecharp alecharp commented Jun 21, 2023

Description

Resolves #1329.

This offers a new page for each plugin to display its score from plugin-health.jenkins.io.

Here is what the proposed page looks like:

Screenshot 2023-10-20 at 13-05-46 Mailer

@alecharp
Copy link
Contributor Author

For the moment, I'm struggling to get the health score fetched from the application in order to be able to display them. cc @halkeye if you have any tips / guidance I'd very much appreciate it

@hervelemeur
Copy link

Reiterating a previous suggestion/question, should plugin health score data be pulled from a static export instead of being retrieved every time from plugin health score API?

@alecharp
Copy link
Contributor Author

The data are fetched when the site is built as far I understand it (

fetchPluginHealthScore({createNode, createNodeField, createContentDigest, createNodeId, createRemoteFileNode, reporter}),
)

...JenkinsPluginFragment
}

healthScore: allJenkinsPluginHealthScore(filter: {name: {eq: $name}}) {
Copy link
Member

Choose a reason for hiding this comment

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

all prefix returns an array. I think you just want jenkinsPluginHealthScore(name: {eq: $name})

Copy link
Member

Choose a reason for hiding this comment

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

also if you goto localhost:3000/__graphql you get the full graphql explorer.

Copy link
Member

Choose a reason for hiding this comment

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

actually, jenkinsPlugin actually links them
https://github.com/jenkins-infra/plugin-site/blob/master/plugins/gatsby-source-jenkinsplugins/gatsby-node.js#L41

        jenkinsPlugin(name: {eq: $name}) {
            ...JenkinsPluginFragment
            healthScore: {
            }
        }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you! This is what I didn't understand!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I didn't structure the data in the API correctly because I would need to describe all the graphql for any new details when this should be easily extensible. I need to change the object structure for an array so that we can easily create a table.

Copy link
Member

Choose a reason for hiding this comment

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

the source plugin can also do some data mashing for you, and graphql can do some joins. So like if you want to do one dataset for detail definitions, and one dataset for the actual results, we can do a join.

i'm just not sure if you have a question or not. Feel free to ping me again.

@halkeye
Copy link
Member

halkeye commented Jun 22, 2023

https://deploy-preview-1431--jenkins-plugin-site-pr.netlify.app/google-kubernetes-engine/health-score/
right now the data seems empty, is that intentional?

I kinda don't think its worth merging with a json blog, i'd rather see an iframe, or leave it alone until something a bit more presentable happens. At least a table

@alecharp
Copy link
Contributor Author

right now the data seems empty, is that intentional?

kind off, as I didn't know where the data were. I'll be improving that now.

alecharp and others added 2 commits June 22, 2023 10:42
Thanks @halkeye

Co-authored-by: Gavin Mogan <[email protected]>
Thanks @halkeye

Co-authored-by: Gavin Mogan <[email protected]>
@alecharp
Copy link
Contributor Author

With last commit, here is the display of the page.

Screenshot 2023-06-29 at 15-07-40 Mailer

Of course, this is still in progress, it's ugly and not easy to read.

@halkeye
Copy link
Member

halkeye commented Jun 29, 2023

Of course, this is still in progress, it's ugly and not easy to read.

@zbynek might have some suggestions on that front.

@alecharp alecharp marked this pull request as ready for review October 19, 2023 14:50
@alecharp alecharp requested a review from a team as a code owner October 19, 2023 14:50
Copy link
Contributor

@zbynek zbynek left a comment

Choose a reason for hiding this comment

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

Nice! I'd like to see the headings improved, my other comment about the percentages is just for consideration.

I was also surprised to see

No commit in the last 4 years. 0/100

for the Git plugin which has a lot of commits, but that's independent of this PR.

plugins/plugin-site/src/components/PluginHealthScore.jsx Outdated Show resolved Hide resolved
plugins/plugin-site/src/components/PluginHealthScore.jsx Outdated Show resolved Hide resolved
alecharp and others added 2 commits October 20, 2023 10:32
Thanks @zbynek.

Co-Authored-By: Zbynek Konecny <[email protected]>
@alecharp
Copy link
Contributor Author

I was also surprised to see

No commit in the last 4 years. 0/100

for the Git plugin which has a lot of commits, but that's independent of this PR.

Yes, I have a problem there that I must fix on the application itself.

Copy link
Contributor

@zbynek zbynek left a comment

Choose a reason for hiding this comment

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

Looks good. One non-blocking suggestion: the health indicator on the search page should link to the health tab on the plugin site instead of https://plugin-health.jenkins.io/ and maybe the health tab could have a link to https://plugin-health.jenkins.io/ labeled "Show scoring details" or something.

@alecharp
Copy link
Contributor Author

the health indicator on the search page should link to the health tab on the plugin site instead of https://plugin-health.jenkins.io/

good idea. Let me do that.

maybe the health tab could have a link to https://plugin-health.jenkins.io/ labeled "Show scoring details" or something.

To be fair, the visualization of the health score on plugin-health.jenkins.io was not initially planned and I'm not sure we should be the two. The plugin-site should stay the source of information for plugins imo.

@zbynek
Copy link
Contributor

zbynek commented Oct 23, 2023

I'd like to merge this if there are no objections raised in the next 24 hours. @daniel-beck @halkeye looped

@daniel-beck
Copy link
Contributor

Presentation is nice 👍 It's a bit awkward that I have to click to see even the summary score, but that can always be improved later.

I suggest hiding the entry "The plugin appears in the update-center." (plus its category if otherwise empty), because that one is always 100%. Suspended plugins don't have this page, so its kinda redundant/automatic. I would keep it though is a formula or other way to see how the overall score is computed is provided in the future, where it being missing would be noticeable.

@alecharp
Copy link
Contributor Author

It's a bit awkward that I have to click to see even the summary score

could you elaborate? There is no "hidden" section in the deployed preview so there is nothing to click on to show more details.

I suggest hiding the entry "The plugin appears in the update-center." (plus its category if otherwise empty), because that one is always 100%.

This is coming from the fact that, some plugin were at some point in the update-center and were removed (here). The PHS application detects that and score the plugin based on that information (here).
I understand that a plugin (like whitesource right now) doesn't have a page on the plugin-site but it still exists.

The categories we see on this pull request are the representation of the scoring.

I would keep it though is a formula or other way to see how the overall score is computed is provided in the future, where it being missing would be noticeable.

Sorry, I'm not sure I understand what you mean @daniel-beck. Could you elaborate?

@alecharp
Copy link
Contributor Author

It's a bit awkward that I have to click to see even the summary score

is it that you'd like to see the global score somewhere in the right column of the plugin page?

@daniel-beck
Copy link
Contributor

daniel-beck commented Oct 24, 2023

I understand that a plugin (like whitesource right now) doesn't have a page on the plugin-site but it still exists.

I do not criticize the existence of the health check in this conversation (feedback on health checks is out of scope IMO), just it being shown here. It will never show anything other than 100% here, as otherwise there's no "here". So I suggest it be hidden.

is it that you'd like to see the global score somewhere in the right column of the plugin page?

That, or possibly in the section header/link title. Basically, show me the summary on other pages.

Neither of these is blocking, they both can always be done later.

@alecharp
Copy link
Contributor Author

I do not criticize the existence of the health check in this conversation (feedback on health checks is out of scope IMO), just it being shown here. It will never show anything other than 100% here, as otherwise there's no "here". So I suggest it be hidden.

I understand. I just mentioned the process because I tried not to put to much "cleverness" here, when I think it should be in the Plugin Health Scoring project. So I could hide that category from the API. As the plugin-site is the only "consumer" of that API. Would that make sense?
However, the score is using that category, and, at this moment, it has a heavy weight.

That, or possibly in the section header/link title. Basically, show me the summary on other pages.

I'm looking to see if I can make it happen in this pull request shortly (in the next 4hrs).

@daniel-beck
Copy link
Contributor

I tried not to put to much "cleverness" here, when I think it should be in the Plugin Health Scoring project.

Good enough reason to continue showing it until users show up who are confused 👍

I'm looking to see if I can make it happen in this pull request shortly (in the next 4hrs).

Perhaps better as followup PR to prevent implementation choices there from blocking this? You could consider opening a second PR on top of these changes to let us already review, test, discuss that change while not blocking this one.

@alecharp
Copy link
Contributor Author

Good point. Thank you @daniel-beck for your feedback.
Let's see if it's good enough for @halkeye as well.

@zbynek zbynek merged commit ca86de5 into jenkins-infra:master Oct 24, 2023
@alecharp alecharp deleted the feature/plugin-health-score branch October 25, 2023 08:08
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.

Plugin health scores not shown on individual plugin pages
5 participants