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

feat: add method for `janus-cli package metadata` ; generate updates to package.json for all plugins listed in plugins/plugin-metadata.json

Open nickboldt opened this issue 1 year ago • 9 comments

What does this PR do?

feat: add method for janus-cli package metadata RHIDP-1502 ; generate updates to package.json for all plugins listed in plugins/plugin-metadata.json

Signed-off-by: Nick Boldt [email protected]

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

N/A (or see commit message above for issue number)

How to test this PR?

  • check out PR
  • run stuff like thiis:
./packages/cli/bin/janus-cli package metadata --help
./packages/cli/bin/janus-cli package metadata --dir plugins/acr --keywords "lifecycle:foo,support:baz,feature:stuff"
cd plugins/argocd; ../../packages/cli/bin/janus-cli package metadata --author foo --license bar --homepage http://bazbar --bugs https://woot

Or use the script wrapper to run against a list of plugins:

cat ./plugins/plugin-metadata.json
./plugins/plugin-metadata.sh

Followup tasks would be to contribute this script / app to upstream community-plugins repo, so we can run it against existing/future plugins and incorporate it into lifecycle automation.

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

nickboldt avatar May 09 '24 12:05 nickboldt

/lgtm

coreydaley avatar May 09 '24 13:05 coreydaley

New changes are detected. LGTM label has been removed.

openshift-ci[bot] avatar May 09 '24 14:05 openshift-ci[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: coreydaley

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar May 09 '24 14:05 openshift-ci[bot]

Wrote >300 lines of code:

git diff --shortstat 59276dfb 11f3b5a2 -- . ':!*yarn.lock'
 8 files changed, 335 insertions(+), 6 deletions(-)

... to generate 268 lines of changed code (434-166) ...

$➔ git diff --shortstat 11f3b5a2 9e6dfc6a  -- . ':!*yarn.lock'
 43 files changed, 434 insertions(+), 166 deletions(-)

Yeah that seems efficient :lolsob:

nickboldt avatar May 10 '24 18:05 nickboldt

Not sure if I need this to help resolve the git configlocal module:

$➔ gd .
diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json
index 1119aafd..a9471368 100644
--- a/packages/cli/tsconfig.json
+++ b/packages/cli/tsconfig.json
@@ -1,10 +1,14 @@
 {
   "extends": "@backstage/cli/config/tsconfig.json",
-  "include": ["src"],
+  "include": ["src", "types.d.ts"],
   "exclude": ["node_modules", "templates"],
   "compilerOptions": {
     "outDir": "../../dist-types/packages/cli",
     "rootDir": ".",
-    "useUnknownInCatchVariables": false
+    "useUnknownInCatchVariables": false,
+    "moduleResolution": "node",
+    "module": "commonjs",
+    "resolveJsonModule": true,
+    "isolatedModules": true
   }
 }

nickboldt avatar May 10 '24 22:05 nickboldt

@caponetto @jkilzi @batzionb please take a look

pkliczewski avatar May 15 '24 04:05 pkliczewski

Per David's suggestion, I'll move the plugin-metadta.json and .sh to a new repo https://github.com/redhat-developer/rhdh-plugin-registry/pull/1/files as it's more useful in the context of a registry container for verifying the plugin metadata matches the expected support lifecycle values; in this repo it's just a one-time setup script.

nickboldt avatar May 15 '24 12:05 nickboldt

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

openshift-merge-robot avatar May 17 '24 00:05 openshift-merge-robot

Quality Gate Failed Quality Gate failed

Failed conditions
19 Security Hotspots
38.7% Duplication on New Code (required ≤ 3%)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

sonarqubecloud[bot] avatar May 30 '24 20:05 sonarqubecloud[bot]

replaced by #1753

nickboldt avatar May 30 '24 21:05 nickboldt