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

Bug: Unable to delete chart-repo on Safari #4582

Closed
2 tasks done
Elessar1802 opened this issue Jan 24, 2024 · 0 comments · Fixed by #4692
Closed
2 tasks done

Bug: Unable to delete chart-repo on Safari #4582

Elessar1802 opened this issue Jan 24, 2024 · 0 comments · Fixed by #4692
Assignees
Labels
bug Something isn't working

Comments

@Elessar1802
Copy link

Elessar1802 commented Jan 24, 2024

📜 Description

I am unable to delete chart-repos on safari. Chrome and Firefox do not show this issue.
Whenever I try to delete a chart repo on Safari I get an EOF (Bad response).

Screenshot 2024-01-24 at 12 35 45 PM

👟 Reproduction steps

  1. Open safari
  2. Navigate to Chart Repositories under Global Configurations
  3. Try and delete any of the chart repos
  4. Pressing the delete button should give an EOF error

👍 Expected behavior

The repository should be deleted with the following response

{
    "code": 200,
    "status": "OK",
    "result": "Chart repo deleted successfully."
}

👎 Actual Behavior

The repository is not deleted. Instead we get a BAD REQUEST response message.

{
    "code": 400,
    "status": "Bad Request",
    "errors": [
        {
            "code": "000",
            "internalMessage": "[{EOF}]",
            "userMessage": "EOF"
        }
    ]
}

☸ Kubernetes version

Minikube v1.32.0 on Darwin 14.2.1 (arm64)
Kubernetes v1.28.3 on Docker 24.0.7

Cloud provider

NaN

🌍 Browser

Safari

🧱 Your Environment

I have installed Devtron on minikube by following the instructions provided on the documentation pages

✅ Proposed Solution

The dashboard will send the first request at DELETE /orchestrator/chart-repo. The correct address is /orchestrator/chart-repo/ (with a trailing slash) [Ideally a REST API should not have a trailing slash?]. Since the frontend sends the request without the trailing slash, the server sends a Redirect response of 301: Moved Permanently. This causes the frontend to send another request but this time the content-body has a length of 0. That is the request is being sent without the body. If the server had sent a response with code of 308 instead of 301 the body would have stayed intact, and thus the request would have gone through successfully.

Thus this situation can be handled through the following methods -

  1. Through Backend: Remove the trailing slash from the endpoint or send a redirect response with error code of 308 instead of 301.
  2. Through Frontend: Add a trailing slash to the request being sent. Can be done by adding it to the line number 30 of dashboard/src/components/chartRepo/chartRepo.service.tsx
Screenshot 2024-01-24 at 3 50 27 PM

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find any similar issue

🏢 Have you read the Code of Conduct?

AB#8207

@Elessar1802 Elessar1802 added the bug Something isn't working label Jan 24, 2024
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

Successfully merging a pull request may close this issue.

3 participants