Skip to content

[SSH] Add versioning to agent dependency directory names - #7188

Merged
rclarey merged 1 commit into
mainfrom
ssh-agent-versioned-installs
Oct 27, 2026
Merged

rclarey merged 1 commit into
mainfrom
ssh-agent-versioned-installs

Conversation

@rclarey

@rclarey rclarey commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Changes

Install agent dependencies (uv, npm, ug) under versioned directories so old dependencies are not used when dependency pins are updated.

Why

This is needed for dedicated cluster support, since dedicated clusters might remaining running for a long time and we want to be able to update dependencies without requiring customers to restart their clusters

Tests

updated/added unit tests

Install uv and Node.js under version-suffixed directories and the Unity
Gateway CLI under a directory keyed by its pinned commit, and check for ug at
that path instead of on PATH. Bumping a pin then installs the new version
instead of reusing an older install left on a long-lived cluster.

Co-authored-by: Isaac <no-reply@databricks.com>
@rclarey
rclarey requested review from a team as code owners October 27, 2026 10:58
@rclarey
rclarey added this pull request to stack #7191 October 27, 2026 11:00
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 6290e3f

Run: 40492693604

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 281 15 5:22
✅​ aws-windows-latest-4core-16gb 283 13 4:34
✅​ azure linux-2core-8gb 280 15 5:23
✅​ azure-windows-latest-4core-16gb 282 13 3:50
✅​ gcp linux-2core-8gb 281 15 5:32
✅​ gcp-windows-latest-4core-16gb 283 13 4:23
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:30 aws-windows-latest-4core-16gb TestAccept
4:18 gcp-windows-latest-4core-16gb TestAccept
3:53 gcp linux-2core-8gb TestAccept
3:49 azure linux-2core-8gb TestAccept
3:47 aws linux-2core-8gb TestAccept
3:45 azure-windows-latest-4core-16gb TestAccept

@anton-107 anton-107 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking from my side; one follow-up below.

checksum string
}

func (s archiveSpec) installDirName() string {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: nothing removes the previous install once a bump lands, so every pin change leaves the old node-* (~190 MB extracted), uv-* and uv_tools-<commit> / uv_tools_bin-<commit> dirs behind in ~/.agent-shim/deps, plus the pre-versioning node / uv / uv_tools* dirs. On the long-lived dedicated clusters this is for, that keeps growing until the cluster restarts.

Could be a follow-up: after a successful install, under the setup lock, prune the sibling <dirName>-* / uv_tools*-* dirs that aren't the current version. One thing to watch: a session from an older CLI version still running on the same cluster may be using its own dir, so pruning would have to skip anything in use, or be limited to the unversioned legacy dirs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wanted to add cleanup but I skipped it for now since I didn't have a clear idea how to not cleanup directories from older CLI versions that are still in use

@rclarey
rclarey added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 236d5fd Oct 27, 2026
25 checks passed
@rclarey
rclarey deleted the ssh-agent-versioned-installs branch October 27, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants