-
Notifications
You must be signed in to change notification settings - Fork 75
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
Display plugin health score details on individual pages #1431
Conversation
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 |
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? |
The data are fetched when the site is built as far I understand it (
|
...JenkinsPluginFragment | ||
} | ||
|
||
healthScore: allJenkinsPluginHealthScore(filter: {name: {eq: $name}}) { |
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.
all prefix returns an array. I think you just want jenkinsPluginHealthScore(name: {eq: $name})
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.
also if you goto localhost:3000/__graphql you get the full graphql explorer.
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.
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: {
}
}
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.
thank you! This is what I didn't understand!
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.
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.
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.
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.
https://deploy-preview-1431--jenkins-plugin-site-pr.netlify.app/google-kubernetes-engine/health-score/ 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 |
kind off, as I didn't know where the data were. I'll be improving that now. |
Thanks @halkeye Co-authored-by: Gavin Mogan <[email protected]>
Thanks @halkeye Co-authored-by: Gavin Mogan <[email protected]>
@zbynek might have some suggestions on that front. |
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.
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.
Thanks @zbynek. Co-Authored-By: Zbynek Konecny <[email protected]>
Thanks @zbynek. Co-Authored-By: Zbynek Konecny <[email protected]>
Yes, I have a problem there that I must fix on the application itself. |
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.
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.
good idea. Let me do that.
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. |
Thanks @zbynek. Co-Authored-By: Zbynek Konecny <[email protected]>
Similar to commit 12148ca.
I'd like to merge this if there are no objections raised in the next 24 hours. @daniel-beck @halkeye looped |
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. |
could you elaborate? There is no "hidden" section in the deployed preview so there is nothing to click on to show more details.
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). The categories we see on this pull request are the representation of the
Sorry, I'm not sure I understand what you mean @daniel-beck. Could you elaborate? |
is it that you'd like to see the global score somewhere in the right column of the plugin page? |
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.
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. |
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?
I'm looking to see if I can make it happen in this pull request shortly (in the next 4hrs). |
Good enough reason to continue showing it until users show up who are confused 👍
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. |
Good point. Thank you @daniel-beck for your feedback. |
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: