-
Notifications
You must be signed in to change notification settings - Fork 68
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
Displaying of plugin health score in Search Page #1320
Displaying of plugin health score in Search Page #1320
Conversation
Happy to see progress on this, looks nice! Thanks for preparing the preview site, you didn't have to do that, there is a Netlify preview for each PR on this repo. Before we merge this, there should be some way to find out why did each plugin get that score value, ideally embeded into the plugin page. Agreed with @halkeye on the technical points. Also please fix the lint error mentioned here: https://ci.jenkins.io/blue/organizations/jenkins/Infra%2Fplugin-site/detail/PR-1320/2/pipeline -- it's useful to run |
Sure I'm gonna work more on the mentioned technical part |
27a3701
to
b423bbb
Compare
Thank you @Harsh3341 to try to implement this even outside of the GSoC context! I think (and it was my idea for the GSoC project) that it would be more efficient to have an API on Plugin Health Scoring which would provide the score of all plugins into one single file. I'm starting to work on something that could be reused for this. So, for now, you can use the API you are using, but I think the API I'm working on while help you with your implementation. |
Thanks for your efforts, even if this idea has been withdrawn from GSoC '23. This PR is a great start, and hopefully, one of a few, to display health scores. |
Thanks, @alecharp it will be great if you starting to build an API that provides overall data even probes that ran on the plugin to obtain the score, It will be helpful to present a detailed explanation on the plugin's health score page. I raised this PR so that building of frontend UI of this idea can be started with the current data we have, further with the new API we can make those changes |
…arsh3341/plugin-site into displaying-plugin-health-score
@Harsh3341 it's not adding healthScore to Algolia index, the other improvements look good. |
I thought of Algolia , is it necessary to add helathScore to algolia index? currently searching is done through algolia , I think which is not required for healthScore right now. Looking forward while adding filtering based on healthScore which will be done while solving issue #632 there might we need to add healthScore to algolia index🤔 |
It might seem inefficient to send the score to Algolia and back even if search does not use it, but since the site is staticaly generated it makes sense. Though it's not a big difference (1 number for ~2000 plugins is just a few kilobytes), loading the data from GraphQL means you have to load the score of all plugins each time you display the search page, even if the search result has just a few results. |
Thanks @zbynek I got it, and I will consider it this change may lead to better performance |
…into displaying-plugin-health-score
@zbynek @halkeye I have added healthScore to the Algolia index but with these keys, I'm getting the error "Index PluginsHealthScore does not exist" but in my local development, I have used my keys in the why is this happening? |
Is there any reference I should take to write a test? It's totally new for me to write test cases. |
oh wow the current tests have grown large. https://github.com/jenkins-infra/plugin-site/blob/master/plugins/gatsby-source-jenkinsplugins/utils.test.js#L44 would be an example though. nock() the external call (mock a network call, nock), then call your function. |
…into displaying-plugin-health-score
lgtm lets ship it! |
🚀 |
@Harsh3341 when you are in a happy state (if you want to do any followup PRs and stuff). I recommend posting to https://community.jenkins.io/c/using-jenkins/showing-off/9 |
@zbynek @halkeye can't we revert this merge as it's not a good idea to display healthScore without its explanation. After completing the next implementations we can merge them. |
I think it is much better to show the score than to not show the score. A lower score may persuade users to avoid an outdated plugin or a plugin with known security issues. |
Reverting is not needed, simply file a follow-up PR with further adjustments. We don't mind delivering things in parts :) |
Having a PR up with the changes proposed is the best way to gain feedback for it. |
Thank you all for this work! I have an updated API which I will likely merge soon and release. See jenkins-infra/plugin-health-scoring#286. With this, we would have details about the score (what contributed to the score). I can include more details (let me know in the PR). We can also use the |
I think that sounds good. It should be easier to iterate now that the data is there and in algolia |
As "Displaying of Plugin Health Score" project idea has been withdrawn from the GSoC 2023.
So as said by @MarkEWaite we can still open a PR for a review of the implementation.
Though the project idea has been withdrawn its implementation can be useful to the developers using plugins and contributors have already researched and worked on some implementation of this idea, so together we can work on this idea.
Here is a small implementation of Displaying the Plugin Health Score on the Search Page for every plugin.
I have fetched the plugin health score data in link and added a separate component for Plugin Health Score in link
Here is the deployed website - https://deluxe-pixie-154589.netlify.app/
@halkeye @zbynek can you plz review it