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

feat: add dynamic-plugins-info backend plugin #638

Merged
merged 16 commits into from
Nov 3, 2023

Conversation

Zaperex
Copy link
Member

@Zaperex Zaperex commented Oct 20, 2023

Description

Adds the dynamic-plugins-info backend plugin that provides the currently installed dynamic plugins in the backstage instance.

Which issue(s) does this PR fix

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

Please let me know if there's a better name for this plugin, the dynamic-plugins-info is just a placeholder name for now.

@Zaperex Zaperex requested a review from a team as a code owner October 20, 2023 17:18
@changeset-bot
Copy link

changeset-bot bot commented Oct 20, 2023

🦋 Changeset detected

Latest commit: fae9646

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@internal/plugin-dynamic-plugins-info-backend Patch
backend Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

The image is available at: quay.io/janus-idp/backstage-showcase:pr-638!

@github-actions
Copy link
Contributor

The image is available at: quay.io/janus-idp/backstage-showcase:pr-638!

@davidfestal
Copy link
Member

@Zaperex Do you think something can be done to reduce the code duplication raised by SonarCloud ?

@Zaperex
Copy link
Member Author

Zaperex commented Oct 23, 2023

Hmm it's flagging the mock data and mock result which are very similar. I guess I can try to get sonarcloud to ignore those files?

@github-actions
Copy link
Contributor

The image is available at: quay.io/janus-idp/backstage-showcase:pr-638!

@github-actions
Copy link
Contributor

The image is available at: quay.io/janus-idp/backstage-showcase:pr-638!

@kadel
Copy link
Member

kadel commented Nov 2, 2023

@Zaperex can you please rebase resolve conflicts so we can merge it?

@Zaperex
Copy link
Member Author

Zaperex commented Nov 2, 2023

Currently having issues creating a merge commit due to lint-staged failing due to it trying to lint everything including the dynamic plugins wrappers, then starts complaining about missing tsconfig.json files? When I try excluding the e2e-tests/** and dynamic-plugins/wrappers/** directories, it then complains about the packages/backend missing a tsconfig.json

Abridged Error Logs
> yarn lint-staged
yarn run v1.22.19
$ lint-staged
✔ Preparing lint-staged...
⚠ Running tasks for staged files...
  ❯ package.json — 167 files
    ❯ * — 167 files
      ✖ turbo run prettier:fix -- [KILLED]
    ❯ *.{jsx,ts,tsx,mjs,cjs} — 56 files
      ✖ turbo run lint --concurrency=1 -- --fix [KILLED]
    ❯ !(.eslintrc).js — 1 file
      ✖ turbo run lint --concurrency=1 -- --fix [FAILED]
↓ Skipped because of errors from tasks.
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...

✖ turbo run lint --concurrency=1 -- --fix:
roadiehq-backstage-plugin-argo-cd-backend:lint: ERROR: command finished with error: command (/home/frkong/coding/janus-idp/backstage-showcase/dynamic-plugins/wrappers/roadiehq-backstage-plugin-argo-cd-backend-dynamic) yarn run lint --fix /home/frkong/coding/janus-idp/backstage-showcase/e2e-test/cypress/plugins/index.js exited (1)
roadiehq-backstage-plugin-argo-cd-backend#lint: command (/home/frkong/coding/janus-idp/backstage-showcase/dynamic-plugins/wrappers/roadiehq-backstage-plugin-argo-cd-backend-dynamic) yarn run lint --fix /home/frkong/coding/janus-idp/backstage-showcase/e2e-test/cypress/plugins/index.js exited (1)
 ERROR  run failed: command  exited (1)
• Packages in scope: @internal/plugin-dynamic-plugins-info-backend, @internal/plugin-scalprum-backend, app, backend, backstage-plugin-azure-devops-backend, backstage-plugin-catalog-backend-module-github, backstage-plugin-catalog-backend-module-github-org, backstage-plugin-catalog-backend-module-gitlab, backstage-plugin-jenkins-backend, backstage-plugin-kubernetes-backend, backstage-plugin-scaffolder-backend-module-gitlab, backstage-plugin-sonarqube-backend, backstage-plugin-techdocs-backend, dynamic-plugins-imports, dynamic-plugins-utils, immobiliarelabs-backstage-plugin-gitlab-backend, janus-idp-backstage-plugin-aap-backend, janus-idp-backstage-plugin-keycloak-backend, janus-idp-backstage-plugin-ocm-backend, roadiehq-backstage-plugin-argo-cd-backend, roadiehq-scaffolder-backend-argocd, roadiehq-scaffolder-backend-module-utils
• Running lint in 22 packages
• Remote caching disabled
roadiehq-backstage-plugin-argo-cd-backend:lint: cache miss, executing dfb189c16ec31382
$ backstage-cli package lint --fix /home/frkong/coding/janus-idp/backstage-showcase/e2e-test/cypress/plugins/index.js
roadiehq-backstage-plugin-argo-cd-backend:lint: 
roadiehq-backstage-plugin-argo-cd-backend:lint: 
roadiehq-backstage-plugin-argo-cd-backend:lint:   ✘  http://eslint.org/docs/rules/
roadiehq-backstage-plugin-argo-cd-backend:lint: 
roadiehq-backstage-plugin-argo-cd-backend:lint:      Parsing error: Cannot read file '/home/frkong/coding/janus-idp/backstage-showcase/dynamic-plugins/wrappers/roadiehq-backstage-plugin-argo-cd-backend-dynamic/tsconfig.json'
roadiehq-backstage-plugin-argo-cd-backend:lint: 
roadiehq-backstage-plugin-argo-cd-backend:lint: 
roadiehq-backstage-plugin-argo-cd-backend:lint:      e2e-test/cypress/plugins/index.js:0:0
roadiehq-backstage-plugin-argo-cd-backend:lint: 
roadiehq-backstage-plugin-argo-cd-backend:lint: ✘ 1 problem (1 error, 0 warnings)
roadiehq-backstage-plugin-argo-cd-backend:lint: 
roadiehq-backstage-plugin-argo-cd-backend:lint: 
roadiehq-backstage-plugin-argo-cd-backend:lint: Errors:
roadiehq-backstage-plugin-argo-cd-backend:lint:   1  http://eslint.org/docs/rules/null
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I will resolve the conflicts in the github web UI for now.

@Zaperex
Copy link
Member Author

Zaperex commented Nov 2, 2023

For the sonarcloud code analysis, should I just remove the test data?

Copy link
Contributor

github-actions bot commented Nov 2, 2023

The image is available at: quay.io/janus-idp/backstage-showcase:pr-638!

Copy link

janus-idp bot commented Nov 2, 2023

backstage-showcase Tests on commit 7068c7b finished successfully.
View test log

Copy link
Contributor

github-actions bot commented Nov 3, 2023

The image is available at: quay.io/janus-idp/backstage-showcase:pr-638!

Copy link
Contributor

github-actions bot commented Nov 3, 2023

The image is available at: quay.io/janus-idp/backstage-showcase:pr-638!

Co-authored-by: Tomas Kral <tomas.kral@gmail.com>
Copy link

sonarcloud bot commented Nov 3, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
17.7% 17.7% Duplication

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

@kadel
Copy link
Member

kadel commented Nov 3, 2023

Oh one is for 4.11 and the other is for ^4.1.1, so I don't think it should be an issue?

sorry, I already deleted the original comment when I noticed that one has ^ 😇

@kadel kadel merged commit facc61b into janus-idp:main Nov 3, 2023
6 of 7 checks passed
@Zaperex Zaperex deleted the list-dynamic-plugins branch November 3, 2023 16:13
Copy link
Contributor

github-actions bot commented Nov 3, 2023

The image is available at: quay.io/janus-idp/backstage-showcase:pr-638!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backend Plugin that returns the list of dynamic plugin installed in the Showcase application
3 participants