-
Notifications
You must be signed in to change notification settings - Fork 27
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
♻️ Traefik rules: final Path needed for viewing files #2737
♻️ Traefik rules: final Path needed for viewing files #2737
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2737 +/- ##
========================================
- Coverage 78.2% 77.3% -1.0%
========================================
Files 647 647
Lines 26915 26915
Branches 2617 2617
========================================
- Hits 21066 20819 -247
- Misses 5143 5367 +224
- Partials 706 729 +23
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Would it make sense to add a test in osparc-simcore/tests/swarm-deploy
to check these path are in sync?
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.
Let me look at it in more dtail and provide you feedback in amoment
services/docker-compose.yml
Outdated
@@ -229,7 +229,7 @@ services: | |||
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.rule=hostregexp(`{host:.+}`) | |||
&& (Path(`/`, `/v0`,`/socket.io/`,`/static-frontend-data.json`, | |||
`/study/{study_uuid:\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b}`, | |||
`/view`) || PathPrefix(`/v0/`)) | |||
`/view`, `/#/view`) || PathPrefix(`/v0/`)) |
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.
@sanderegg I am afraid is not the last ... viewers (studies_dispatcher
plugin) as a redirection syntax that uses fragments to communicate with the front end.
For instance
https://osparc.io/#/error?message=Sorry%2C%20I%20could%20not%20find%20this%20&status_code=404
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.
This builds the redirect response and adds a fragment to a page with a query (similar to portainer) . There are two pages, namely view
and error
so far, so I guess the label pattern is something like
Path(`/view`, `/error`) || PathPrefix(`/#`)
the two first will return different front-ends (/
-> osparc, /view
, /error
-> views) and fragments is info that the front end will consume
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.
Actually we use fragments for much more at the root as well
https://osparc.io/#reset-password?code=131234
https://osparc.io/#reset-password?registered
https://osparc.io/#/registration/?invitation={code}
at the time, i already suggesting standardizing this #1975
Perhaps it is the moment to do so.
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.
ok, so for the /view and /error I will set on top /view/#/ and /error/#/. for the last 3 ones I'm puzzled.
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.
thx for looking at this L:-)
What do these changes do?
Related issue/s
How to test
Checklist