fix: apply workspace connection/cwd to new tabs & starter tab; bump version to 0.14.6#18
Merged
Merged
Conversation
… version to 0.14.6 - workspace.CreateTab: re-fetch tab after ApplyPortableLayout so workspace defaults are applied to the actual created blocks - applyWorkspaceDefaultsToBlocks: only apply workspace cwd when block connection matches the workspace default connection - layout.BootstrapStarterLayout: apply workspace defaults to starter tab - bump version to 0.14.6 so remote wsh is redeployed (job manager now honors session/job cwd that was previously ignored on stale remote binaries)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes the workspace connection/cwd defaults not being applied in two places, and bumps the app version so remote
wshbinaries are redeployed.1. Workspace defaults applied to new tabs
pkg/wcore/workspace.goCreateTabnow re-fetches the tab from the DB afterApplyPortableLayoutbefore callingapplyWorkspaceDefaultsToBlocks. Previously the in-memorytabvariable retained an emptyBlockIds(the layout only persists the block ids to the database), soapplyWorkspaceDefaultsToBlocksiterated over zero blocks and never applied the workspaceconnection/cwd.2. Workspace cwd only applied on matching connection
applyWorkspaceDefaultsToBlocksnow only setscmd:cwd(term) /file:cwd(file browser) when the block's effective connection equals the workspace'sDefaultConnName. A block already on a different connection keeps its own cwd / remote home directory (per requirement).3. Workspace defaults applied to the starter tab
pkg/wcore/layout.goBootstrapStarterLayoutnow re-fetches the tab and appliesapplyWorkspaceDefaultsToBlocksso the initial starter tab also picks up the workspaceconnection/cwd.4. Version bump 0.14.5 -> 0.14.6
The job manager on the remote host applies a job's working directory (SSH session cwd) in
pkg/jobmanager/jobcmd.go, which was added after the 0.14.5 release. Becauseconncontroller.IsWshVersionUpToDateuses a semver comparison, a remote already runningwsh v0.14.5was considered up-to-date and never redeployed, so SSH sessions silently started in$HOMEinstead of the configured cwd. Bumping the version forces wavesrv to redeploy the freshwshbinary, which honors the job cwd.Root-cause note (debugging history)
The session-cwd symptom was not a frontend/backend plumbing bug.
startNewJobalready reads the block'scmd:cwdfrom block meta; the real blocker was the stale remotewshbinary ignoring the job cwd. Intermediate fix attempts that added cwd plumbing to the session-create RPC were removed as redundant after confirming the version bump resolves the issue. Final diff is intentionally minimal.Test plan
wshis redeployed (version reported as 0.14.6) and SSH session cwd is honored.