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

App history call fails when using --basehref and Nginx rewrite annotation #3319

Closed
3 tasks done
rbkaspr opened this issue Mar 31, 2020 · 2 comments
Closed
3 tasks done
Assignees
Labels
bug/severity:major Malfunction in one of the core component, impacting a majority of users bug Something isn't working

Comments

@rbkaspr
Copy link

rbkaspr commented Mar 31, 2020

Checklist:

  • I've searched in the docs and FAQ for my answer: http://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

When setting basehref and using the Nginx rewrite annotation, any calls to retrieve application history will fail. After discussion with @alexmt on Slack, the issue appears to be that the API expects an encoded URL for the App repo, but Nginx will decode any URLs as part of the rewrite, which causes the API call to fail

Expected:
/api/v1/repositories/https%3A%2F%2Fgithub.com%2Fargoproj%2Fargocd-example-apps/apps?revision=HEAD
argocd receives
/api/v1/repositories/https:/github.com/argoproj/argocd-example-apps/apps

To Reproduce

Set up ArgoCD with a custom basehref behind an Nginx ingress route with rewrite configuration as described in the docs here: https://argoproj.github.io/argo-cd/operator-manual/ingress/#ui-base-path

Set up an application from a Git repo and make a change

Open the History and Rollback menu for the app

Expected behavior

List of revisions populated with deltas for old revisions

Observed behavior

Deltas fail to populate, backend logs a 404

Suggested fix

I suggest one of two solutions to this issue:

  1. Have basehref affect the base API path as well as the UI, removing the need for the rewrite annotation
  2. Have these calls use an internal UUID or some other non-encoded value so the Nginx decode doesn't break them

Version

v1.5.0-rc1+3684a10
@rbkaspr rbkaspr added the bug Something isn't working label Mar 31, 2020
@rbkaspr rbkaspr changed the title App history call fails when using --basehref and Nginx rewrite annotatihttps://argoproj.github.io/argo-cd/operator-manual/ingress/#ui-base-pathon App history call fails when using --basehref and Nginx rewrite annotation Mar 31, 2020
@alexmt alexmt added this to the v1.6 GitOps Engine milestone Apr 9, 2020
@alexmt alexmt added enhancement New feature or request bug Something isn't working bug/severity:major Malfunction in one of the core component, impacting a majority of users and removed bug Something isn't working enhancement New feature or request labels Apr 9, 2020
@mayzhang2000 mayzhang2000 self-assigned this Apr 22, 2020
@alexmt
Copy link
Collaborator

alexmt commented Apr 22, 2020

I think we've decided to implement the first suggestion. For backward compatibility, lets keep current --basehref behavior and introduce new flag ( for example --root-path ) which changes both base API path as well as the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/severity:major Malfunction in one of the core component, impacting a majority of users bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants