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

Save metadata to filesystem #41

Closed
jonesbusy opened this issue Jun 23, 2024 · 6 comments
Closed

Save metadata to filesystem #41

jonesbusy opened this issue Jun 23, 2024 · 6 comments
Assignees
Labels
enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted

Comments

@jonesbusy
Copy link
Collaborator

jonesbusy commented Jun 23, 2024

What feature do you want to see added?

Right now the metadata is only loaded into memory. A singleton instance is used which also prevent executing recipes concurrently or will erase the content on next plugin (it can also lead to errors)

We should be able to save to a some file(s) in order to perform caching and reporting like it's done on https://docs.google.com/spreadsheets/d/1MRKPY_RDi8pvuDRmO3-nmxm4P3cy9Y-5zPKZ_8CJfzQ/edit?usp=sharing

We could support several format (CSV is useful for google docs) or JSON is useful to get ingested by other tools (Plugin Health score)

Upstream changes

No but the metadata is limited for now (Only from the pom). We don't know for a plugin if a Jenkinsfile exists for example

We should use https://github.com/openrewrite/rewrite/blob/main/rewrite-core/src/main/java/org/openrewrite/FindSourceFiles.java and check for the marker existence

Are you interested in contributing this feature?

No response

@jonesbusy jonesbusy added the enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Jun 23, 2024
@gounthar
Copy link
Collaborator

Great suggestion! 👍

@gounthar
Copy link
Collaborator

Where should we store the result?

The most obvious answer might be "in this repository" or "in a dedicated repository," but some members of our community have reservations about this approach.

So, what are our options? We could consider:

  1. Running it on ci.jenkins.io and storing the result as an artifact
  2. Using an API to create a Google Doc dynamically
  3. Hosting it on a static website
  4. Utilizing GitHub Pages
  5. Exploring other alternatives

What do you think would work best for our needs and community preferences?

@jonesbusy
Copy link
Collaborator Author

On my side I didn't though a lot yet about storage, but my initial idea was to have some filesystem cache for the plugin metadata. So when you run the CLI several time in a row for the same plugin you can skip the extraction of metadata (until at some point the cache expire).

On 5) what about the plugin health score system ? Despite the score it also used a database and have some API

Also form what I remember there are some probe wanted that can be difficult to implement with static parsing and can only be achieved using OpenRewrite (because we need to build the LST).

What if we can give this data to PHS (push model) via some API ?

@jonesbusy
Copy link
Collaborator Author

From what I found many reports are hosted on https://reports.jenkins.io/

Those report like the PHS : https://reports.jenkins.io/plugin-health-scoring/scores.json are used when the Jenkins plugin side is rebuild

This look a good candidate to me

Some details can be found on https://groups.google.com/g/jenkinsci-dev/c/7OyVRnLvplg

@lemeurherve
Copy link
Member

lemeurherve commented Jun 28, 2024

(Optional) suggestion: open an helpdesk or a thread on jenkinsci-dev mailing list to gather feedbacks and alternatives?

@jonesbusy
Copy link
Collaborator Author

This is fixed by #197. Let's open a new issue for other archiving solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
Development

No branches or pull requests

4 participants