backstage / community-plugins

Community plugins for Backstage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Code-coverage: Calling new backend gives 404

AarjanM opened this issue Β· comments

Plugin Name

code-coverage

πŸ“œ Description

When calling the backend of this plugin in the new backend architecture (curl localhost:7007/api/code-coverage/report?entity=component:default/entity-name), it returns a 404. I think this is caused because the pluginId ('codeCoverage') is the default for the router.
Calling curl localhost:7007/api/codecoverage/report?entity=component:default/entity-name gives the expected result.

πŸ‘ Expected behavior

return the code-coverage report of the entity

πŸ‘Ž Actual Behavior with Screenshots

404 not found

πŸ‘Ÿ Reproduction steps

  1. Create a vanilla installation of new backstage architecture
  2. Follow the readme to add code-coverage plugin for backend and frontend
  3. Add annotation backstage.io/code-coverage: enabled to example-website in examples.yaml
  4. yarn dev
  5. curl -X POST -H "Content-Type:text/xml” -d @coberturea.xml "localhost:7007/api/code-coverage/report?entity=component:default/example-website&coverageType=cobertura"
  6. Returns 404
  7. Open Backstage, navigate to example-website and code coverage tab --> Errors 404 not found messages

πŸ“ƒ Provide the context for the Bug.

Can't use the code coverage plugin in our new Backstage installation

πŸ‘€ Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏒 Have you read the Code of Conduct?

Are you willing to submit PR?

No, but I'm happy to collaborate on a PR with someone else

Hi @AarjanM, with the new backend system there is currently no way to change this value, it uses the pluginId. Would you be able to change this from the location that sends the data?