-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
1.2
-
None
-
False
-
-
False
-
-
-
Low
Description of problem:
A trailing slash in the Argo CD URL results in a "Method Not Allowed" error at runtime.
Prerequisites (if any, like setup, operators/versions):
A cluster with Argo CD and Developer Hub installed. Also, a Component registered in RHDH that references an Argo CD Application.
Steps to Reproduce
- Configure Argo CD per the docs (https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.2/html-single/configuring_plugins_in_red_hat_developer_hub/index#rhdh-argocd)
- Leave a trailing slash on the Argo CD URL, e.g "url: https://argoInstance1.com/"
- Access the CD tab for the Component in the RHDH Catalog.
Actual results:
The CD page shows a 500 error. Logs for the RHDH Pod show that Argo CD returns a "Method Not Allowed Error".
{{
{"level":"info","message":"Getting apps for selector rhdh.app/name=parasol on appsargocd","plugin":"argocd","service":"backstage","timestamp":"2024-09-18 13:23:53"}}}
{{
}}
2024-09-18T13:23:53.873Z backstage error Request failed with status 500 invalid json response body at https://openshift-gitops-server-openshift-gitops.apps-crc.testing/api/v1/session reason: Unexpected token 'M', "Method Not Allowed
" is not valid JSON type=invalid-json stack=FetchError: invalid json response body at https://openshift-gitops-server-openshift-gitops.apps-crc.testing/api/v1/session reason: Unexpected token 'M', "Method Not Allowed
" is not valid JSON
Expected results:
The trailing slash should be handled correctly by the RHDH backend, or the backend should produce a validation error on startup.
Reproducibility (Always/Intermittent/Only Once):
Always.
Build Details:
RHDH Version: 1.2.2
Backstage Version: 1.26.5
Upstream: janus-idp/backstage-showcase 1.2.x @ c14d6dac
Midstream: gitlab.cee.redhat.com/rhidp/rhdh rhdh-1.2-rhel-9 @ 01df3afc
Build Time: 2024-08-19T03:35:16Z
Additional info (Such as Logs, Screenshots, etc):
- relates to
-
RHIDP-4065 Improve config validation for ArgoCD Plugin
-
- New
-