-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: base href does not work #11401 #10194 #2134 #11644
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I need to take a look at this more closely, but this looks more like partial rootpath support rather than base href from a glance.
With just base href, the proxy in front should be rewriting these subpaths. The Argo Server still sees all requests from /
. Or, effectively, base href primarily impacts links, such as those on the front-end
@agilgur5 what "partial rootpath support" mean?
=> Can you give me an example?
=> I tried to keep this compatible with other functions, ex: readiness check |
@agilgur5 I'm sorry, but I do not understand. Let's me know if you want any info here |
Signed-off-by: Son Bui <[email protected]>
Let me try two other explanations:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is actionable as a "fix" to base href. base href is working correctly.
This could be used as part of a feature to implement rootpath (#7767), but that should probably be done as one larger PR
Can you make a test? I don't think it work like the document and I also made some test before. That's why many people report this in some issues. Also you can read the fix code to know the reason |
@agilgur5 with ingress rewrite, I think this is not a issue. I tried without ingress rewrite for this |
The back-end is working correctly. Per #11401 (comment), the Server logs are correct, correctly detecting the environment variable. Per #11643 (comment), the Server correctly sets That is the only impact to the back-end that base href has. All other impacts are front-end facing.
Per above, both users' own issues show that it is working correctly. |
Yes exactly! Base href is intended to be used in conjunction to an ingress rewrite. The docs do show using both together. They've received a few PRs in the past too to try and clarify that for users. |
That's just a separate feature entirely. That is part of rootpath support #7767. And totally feel free to work on #7767! Base href and rootpath are just two separate (but related) features. Note that the opening comment of #7767 uses both "Base href" specifically is a front-end only feature designed to be used with ingress rewrites. It is making the front-end aware of an existing back-end configuration. The back-end configuration can be done either with an ingress rewrite or with
Yea that is specifically because people misinterpreted base href to mean rootpath, but they are not identical features. So that was a clarification that base href should not be used by itself alone -- it should be used with a similar back-end configuration. |
@agilgur5 |
No they are separate, it's just that rootpath was never implemented in Workflows. Moreover, "base href" refers to a Web standard, literally the HTML
|
@agilgur5 Could you give me a real life example for rootpath and basehref with different values for running Argo Workflow? |
I think my PR do not handle this |
@agilgur5 Maybe we also need rootpath to handle all cases. let me try to figure it out |
The main one is an ingress rewrite. For instance, if I have If all those services did not support rootpath, it would be easier to configure ingress rewrites for all of them in the same way -- only the subpath would be different between them. If they did all support rootpath, they may all also require different configuration (e.g. a configmap vs a flag vs an env var, etc), so rewrites may be easier/more consistent as well. I can think of some other wacky use-cases, but that's the only one I can think of off the top of my head that is a "real life example" that I and others have definitely used many times before. |
Yea that's what I meant when I said that full rootpath support to handle all cases would require a larger PR. |
Fix #11401
Fix #10194
Fix #11643
Fix #7767
Related #2134
Motivation
Support BASE_HREF on the document https://argoproj.github.io/argo-workflows/argo-server/
Modifications
Add handle base href for static file and test
Verification
make test
More
As I check this issue, I see the lib to embed static files into Go binary has been deprecated (https://github.com/bouk/staticfiles). We should replace it.