Conversation
xsh310
added this pull request to stack #576
September 12, 2026 23:38
xsh310
marked this pull request as ready for review
September 12, 2026 23:54
xsh310
force-pushed
the
skills-download-workspace-id
branch
from
September 13, 2026 00:22
d60d990 to
06754e9
Compare
xsh310
marked this pull request as draft
September 13, 2026 00:23
xsh310
force-pushed
the
skills-download-workspace-id
branch
from
September 13, 2026 00:46
06754e9 to
f81ee7c
Compare
xsh310
force-pushed
the
skills-download-workspace-id
branch
from
September 13, 2026 01:04
f81ee7c to
01c0c00
Compare
xsh310
marked this pull request as ready for review
September 13, 2026 01:10
xsh310
force-pushed
the
skills-download-workspace-id
branch
from
September 14, 2026 03:08
01c0c00 to
acb868b
Compare
xsh310
force-pushed
the
skills-download-workspace-id
branch
from
September 14, 2026 20:09
acb868b to
b3e9c45
Compare
| base: str | ||
| dirs: tuple[str, ...] | ||
| metastore_id: str | None = None | ||
| workspace_id: str | None = None |
Collaborator
There was a problem hiding this comment.
P2: workspace_id is now recorded, but the install identity key (_record_key → (metastore_id, fqn, base)) doesn't include it, and the SkillInstall docstring still describes the key without it. When metastore_id is None (older/edge records), two skills with the same fqn at the same base from different workspaces collide on reconcile and one overwrites the other. Either fold workspace_id into the identity key or update the docstring to state it's descriptive-only.
xsh310
force-pushed
the
skills-download-workspace-id
branch
from
September 14, 2026 22:32
b3e9c45 to
b5dcb72
Compare
xsh310
force-pushed
the
skills-download-workspace-id
branch
from
September 14, 2026 23:20
b5dcb72 to
857e523
Compare
xsh310
force-pushed
the
skills-download-workspace-id
branch
from
September 15, 2026 01:41
857e523 to
5166600
Compare
xsh310
force-pushed
the
skills-download-workspace-id
branch
from
September 15, 2026 03:40
5166600 to
0ea62b1
Compare
Capture the numeric workspace (org) id and store it as `workspace_id` on each downloaded-skill record, giving attribution a rename-proof workspace identifier alongside the workspace URL. Databricks stamps every authenticated response with an `X-Databricks-Org-Id` header, so the download's existing API calls already carry it; the HTTP GET helpers now capture it into a session cache (keyed by hostname, mirroring the model-service listing caches) with no extra request. A record omits the field when no response has revealed the id yet. Co-authored-by: Isaac <no-reply@databricks.com>
xsh310
force-pushed
the
skills-download-workspace-id
branch
from
September 15, 2026 04:42
0ea62b1 to
bf8e153
Compare
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.
What
Record the numeric workspace (org) id as
workspace_idon each downloaded-skillattribution record. Final PR of the attribution work, on top of #585.
Why
The record already stores the workspace URL, but a URL can change (workspace
rename / vanity host). The numeric org id is a stable, rename-proof workspace
identifier, so attribution keeps both. It costs nothing extra to capture:
Databricks stamps every authenticated response with an
X-Databricks-Org-Idheader, and the download already makes those calls.
Changes
databricks.py: the HTTP GET helpers captureX-Databricks-Org-Idinto asession cache keyed by hostname (mirroring the existing model-service listing
caches);
workspace_org_id(workspace)reads it back, and a cache-clear hook iswired into the test isolation fixture. No extra request is made.
skills_state.py/skills_download.py:SkillInstallcarriesworkspace_id,set from
workspace_org_idwhen a record is written.metastore_idremains thelogical key; the field is omitted when no response has revealed the id yet.
Testing
uv run ruff check,ruff format --check,ty check src, anduv run pytestallpass (the pre-existing
test_e2e_user_agent/test_claude_smart_routing_v2failures also fail on the base). Added coverage that the GET helper captures the
header (and tolerates its absence), and that a download records
workspace_idwhen the id is known and omits it when it is not.
Stack
Part of gh stack #576, on top of #585 (
skills-download-remove).This pull request and its description were written by Isaac.