Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Recreate REST client after starting a workspace#431

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bcpeinhardt merged 1 commit intocoder:mainfromaaronlehmann:recreate-rest-client
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,6 +2,8 @@

## Unreleased

- Recreate REST client after starting a workspace to ensure fresh TLS certificates.

## [v1.3.10](https://github.com/coder/vscode-coder/releases/tag/v1.3.9) (2025-01-17)

- Fix bug where checking for overridden properties incorrectly converted host name pattern to regular expression.
Expand Down
21 changes: 11 additions & 10 deletionssrc/remote.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,11 +56,6 @@ export class Remote {
label: string,
binPath: string,
): Promise<Workspace | undefined> {
// Maybe already running?
if (workspace.latest_build.status === "running") {
return workspace
}

const workspaceName = `${workspace.owner_name}/${workspace.name}`

// A terminal will be used to stream the build, if one is necessary.
Expand DownExpand Up@@ -320,13 +315,19 @@ export class Remote {
disposables.push(this.registerLabelFormatter(remoteAuthority, workspace.owner_name, workspace.name))

// If the workspace is not in a running state, try to get it running.
const updatedWorkspace = await this.maybeWaitForRunning(workspaceRestClient, workspace, parts.label, binaryPath)
if (!updatedWorkspace) {
// User declined to start the workspace.
await this.closeRemote()
if (workspace.latest_build.status !== "running") {
if (!(await this.maybeWaitForRunning(workspaceRestClient, workspace, parts.label, binaryPath))) {
// User declined to start the workspace.
await this.closeRemote()
} else {
// Start over with a fresh REST client because we may have waited an
// indeterminate amount amount of time for confirmation to start the
// workspace.
await this.setup(remoteAuthority)
}
return
}
this.commands.workspace = workspace = updatedWorkspace
this.commands.workspace = workspace

// Pick an agent.
this.storage.writeToCoderOutputChannel(`Finding agent for ${workspaceName}...`)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp