backstage-plugins icon indicating copy to clipboard operation
backstage-plugins copied to clipboard

Question in regards to JFROG Plugin 🐸

Open Parsifal-M opened this issue 1 year ago • 8 comments

Hey Team! 👋

Apologies if I use the wrong issue type but I couldn't really find anything that matches what I wanted to ask 😅

I stumbled across the JFROG Plugin you have and tried it but it did not work for me I kept getting 404 errors when trying to get what I wanted out of Jfrog (a docker image).

So I forked the project and went to work on the plugin, I was just wondering if this is something you'd like me to push back here or not as I made a fair amount of changes across the whole plugin and didn't want to just submit a big PR and expect it to be merged with little context 😆

The key changes I made:

  • Changed the annotation to 'jfrog-artifactory/artifact-name' reason for this is that I didn't want it to just be for Docker images but for any artifact really.
  • Added some Winston logging to the api so we can handle some errors
  • Changed the name of the api/index.ts to artifactoryApiClient.ts extracted the types and put them in a ./types.ts
  • Changed the Graphql query to return this data 'query ($filter: PackageFilter!, $orderBy: PackageOrder) { packages (filter: $filter, orderBy: $orderBy) { edges { node { name, description, created, versions { name, size, package { packageType } vulnerabilities { high, medium, low, info, unknown, skipped } stats { downloadCount } } } } } }', as that is what I was more interested in.
  • Changed the tableHeading.tsx to accommodate the new fields from the query
  • Added tests for JfrogArtifactoryDashboardPage.tsx and for JfrogArtifactoryRepository.tsx
  • Of course, changes here and there to accommodate the above stuff

There are still some additional changes I think need to be done, I am not sure the config.d.ts is needed as you would almost always use the proxy as well but I have not got to that part yet.

So the question is, would these changes be something you'd like me to try and merge? I will not be offended if not of course 😄

Please LMK what you think!

Parsifal-M avatar Jun 03 '23 09:06 Parsifal-M