-
Notifications
You must be signed in to change notification settings - Fork 22
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
Propagate new Trace Server url upon change #158
Propagate new Trace Server url upon change #158
Conversation
vscode-trace-extension/src/trace-viewer-panel/trace-viewer-webview-panel.ts
Outdated
Show resolved
Hide resolved
49b6acb
to
c9d0379
Compare
@colin-grant-work thank you for your comments. I have updated my PR. |
14d0ce5
to
0c7192f
Compare
...ace-webviews/src/trace-explorer/opened-traces/vscode-trace-explorer-opened-traces-widget.tsx
Outdated
Show resolved
Hide resolved
0c7192f
to
dda0e5f
Compare
Hi @colin-grant-work, thanks for resolving the conversations, if the patch is all good, can you approve? I pushed a rebase patch to fix code conflict. |
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 have no more objections, but it would be good if another committer could give it a functional test.
@@ -59,6 +60,17 @@ export function activate(context: vscode.ExtensionContext): ExternalAPI { | |||
if (e.affectsConfiguration('trace-compass.traceserver.url') || e.affectsConfiguration('trace-compass.traceserver.apiPath')) { | |||
updateTspClient(); | |||
} | |||
|
|||
if (e.affectsConfiguration('trace-compass.traceserver.url')) { | |||
const newUrl = getTraceServerUrl(); |
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.
Investigating remote deployments of this plugin, I've been doing some checking on VSCode utilities for Remote deployments and found the asExternalUri
function in the env
namespace. Basically, in a desktop deployment, that function does nothing, because external
is the same as local, but in a remote deployment, that function transforms the URI into a form that the client can use to access a client running on the host and also does any port forwarding, if the application is set up for that. You can see it in action in the 'Live Preview' plugin, which, like the Trace Extension, opens up a server on the remote machine on certain ports. With that in mind, perhaps the output of getTraceServerUrl
should be passed through that utility to ensure that it's accessible.
The caveat that I can see is that if a user is using a VSCode deployment that does not implement the necessary infrastructure, it might be desirable to let the user specify the exact shape of the URL they want the views to use so that the user can set up access to the service manually.
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.
Hi @colin-grant-work, thank you for the investigation. Are you OK to merge this PR and discuss this later if necessary?
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, that's fine. I'll move this over to an issue.
...ace-webviews/src/trace-explorer/opened-traces/vscode-trace-explorer-opened-traces-widget.tsx
Outdated
Show resolved
Hide resolved
dda0e5f
to
c594f58
Compare
This commit allow the VSCode extension to listen to the onDidChangeConfiguration event provided by VSCode and propagate the new URL to components. The new URL is sent as a message to the front end, then the TraceServerUrlProvider will run handlers that was registered to the TSPClientProvider. Signed-off-by: Hoang Thuan Pham <[email protected]>
c594f58
to
9c64e93
Compare
This commit allow the VSCode extension to listen to the onDidChangeConfiguration event provided by VSCode and propagate the new URL to components. The new URL is sent as a message to the front end, then the TraceServerUrlProvider will run handlers that was registered to the TSPClientProvider.
Part of #10.