Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Workspace] Add workspace id in basePath #6060
[Workspace] Add workspace id in basePath #6060
Changes from 12 commits
abfdb6b
b6a1622
64b3645
9b66a28
2e388a5
80bed72
2d710b8
2a1148e
3d975ae
50648b6
e290a13
d01be23
ca2e600
6cc5e09
7b8c21c
367268d
a5fd308
3980cd7
d544f94
d4f716c
b4f0a87
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Check warning on line 55 in src/core/public/http/base_path.ts
Codecov / codecov/patch
src/core/public/http/base_path.ts#L55
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.
Maybe we can rename the "workspace" in
prepend
andremove
function as well^^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 was intending to rename the withoutWorkspace to withoutClientBasePath but I was thinking in the future, the clientBasePath may consist of workspace/dataSourceId/other stuff and prependOptions will have withoutWorkspace/withoutDataSourceId/withoutClientBasePath options accordingly so I kept them.
But for now, there is no such case so it has no harm to have only one
withoutClientBasePath
config in prependOptions, but will add some comment here.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 see, thanks for the clarification^^
Check warning on line 72 in src/core/public/http/base_path.ts
Codecov / codecov/patch
src/core/public/http/base_path.ts#L72
Check warning on line 68 in src/core/public/http/http_service.mock.ts
Codecov / codecov/patch
src/core/public/http/http_service.mock.ts#L67-L68
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.
Nit: Is there precedence for depending on a plugin in core? i dont see any use of the
getPlugins
API in core. Also if this is a temporary dependency, can we add a TODO here and link it to an issue where we remove it in future so that core can remain independent of plugins?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.
Yes but actually what I want to do here is to make the workspace id logic disabled when workspace is not enabled. But it turns out that it will introduce another indirect dependency on the workspace plugin. I can revert to previous version, in which it will try to construct workspaceBasePath no matter workspace is enabled or not, and let server side to gives a
404
when workspace is disabled, do you think that would be better?Check warning on line 57 in src/core/public/http/http_service.ts
Codecov / codecov/patch
src/core/public/http/http_service.ts#L55-L57
Check warning on line 60 in src/core/public/http/http_service.ts
Codecov / codecov/patch
src/core/public/http/http_service.ts#L60
Check warning on line 65 in src/core/public/http/http_service.ts
Codecov / codecov/patch
src/core/public/http/http_service.ts#L65