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

🐛 Entity-feedback: Entity Feedback Plugin: GET /ratings/:entityRef returns 404 in production, but /ratings?ownerRef works #1523

Open
2 tasks done
bchemsed1 opened this issue Oct 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@bchemsed1
Copy link

bchemsed1 commented Oct 14, 2024

Plugin Name

Entity-feedback

📜 Description

The Entity Feedback plugin is experiencing inconsistent behavior in our production environment (EKS cluster behind a proxy). GET requests using query parameters work as expected, but requests using path parameters for entity references return a 404 error.

Request URL:
https://developer.ec1.aws.aztec.cloud/api/entity-feedback/ratings/component%3Adefault%2Fbuildon
Request Method:
GET
Status Code:
404 Not Found
Remote Address:
44.***.109.***:443
Request URL:
https://developer.ec1.aws.aztec.cloud/api/entity-feedback/ratings?ownerRef=group%3Adefault%2Fcore
Request Method:
GET
Status Code:
200 OK
Remote Address:
44.***.109.***:443

👍 Expected behavior

Both requests should return 200 OK with the appropriate data.

👎 Actual Behavior with Screenshots

The request with the entity reference in the path returns a 404 Not Found, while the request with the ownerRef query parameter works correctly.

👟 Reproduction steps

  1. Deploy Backstage with Entity Feedback plugin to production environment
  2. Make a GET request to /api/entity-feedback/ratings?ownerRef=group:default/core
    • Result: Returns 200 OK with expected data
  3. Make a GET request to /api/entity-feedback/ratings/component:default/buildon-sandbox
    • Result: Returns 404 Not Found

📃 Provide the context for the Bug.

  • This issue only occurs in our production environment. Local development setup works as expected for both types of requests.
  • Other Backstage plugins and backend API endpoints are functioning correctly in the same environment.
  • No custom modifications have been made to the Entity Feedback plugin code.

👀 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?

None

@bchemsed1 bchemsed1 added the bug Something isn't working label Oct 14, 2024
@kuangp
Copy link
Member

kuangp commented Oct 14, 2024

Hmm going to need a bit more info to try to debug this - do you see any log messages in the backend that corresponds to that 404 request? can you also provide what Backstage and plugin versions you're on?

@bchemsed1
Copy link
Author

Hello @kuangp,

We are currently using Backstage version 1.22.19.

Here are all the logs I see when I try to interact with the plugin:

2024-10-14T13:54:06.616Z backstage info ::ffff:1.240.163.118 - - [14/Oct/2024:13:54:06 +0000] "GET /api/entity-feedback/ratings/component:default/buildon HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" type=incomingRequest
2024-10-14T13:54:32.954Z backstage info ::ffff:1.240.163.118 - - [14/Oct/2024:13:54:32 +0000] "GET /api/entity-feedback/ratings/component:default/buildon HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" type=incomingRequest
2024-10-14T13:55:12.092Z backstage info ::ffff:1.240.163.118 - - [14/Oct/2024:13:55:12 +0000] "POST /api/entity-feedback/ratings/component:default/buildon HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" type=incomingRequest
2024-10-14T13:55:16.026Z backstage info ::ffff:1.240.163.118 - - [14/Oct/2024:13:55:16 +0000] "POST /api/entity-feedback/ratings/component:default/buildon HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" type=incomingRequest
2024-10-14T13:55:46.721Z backstage info ::ffff:1.240.163.118 - - [14/Oct/2024:13:55:46 +0000] "GET /api/entity-feedback/ratings?ownerRef=group%3Adefault%2Fcore HTTP/1.1" 200 2 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" type=incomingRequest

Let me know it you need to more info

@bchemsed1
Copy link
Author

Sorry forgot the plugins versions:
The frontend is on : @backstage-community/plugin-entity-feedback": "^0.3.5
And the backend: @backstage-community/plugin-entity-feedback-backend": "^0.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants