bundle: record auto-migration compatibility telemetry on deploy#5439
bundle: record auto-migration compatibility telemetry on deploy#5439shreyas-goenka wants to merge 1 commit into
Conversation
60fba4e to
cc47397
Compare
e7e9e83 to
7c783aa
Compare
|
Commit: 4412358
24 interesting tests: 15 SKIP, 7 KNOWN, 2 flaky
Top 28 slowest tests (at least 2 minutes):
|
cc47397 to
b2c7271
Compare
7c783aa to
5e587f0
Compare
b2c7271 to
c2aa303
Compare
5e587f0 to
2cd3ef3
Compare
c2aa303 to
b1d732b
Compare
2cd3ef3 to
07abec1
Compare
b1d732b to
9e2f26b
Compare
07abec1 to
26c3380
Compare
9e2f26b to
00c5b7b
Compare
26c3380 to
30172b5
Compare
00c5b7b to
addcb6a
Compare
30172b5 to
3646391
Compare
bf9f878 to
abe3dfb
Compare
| has_serverless_compute true | ||
| local.cache.attempt true | ||
| local.cache.miss true | ||
| permissions_section_is_set false |
There was a problem hiding this comment.
Because permissions are not set here, by definition state_path_acl_exceeds_permissions is true.
There was a problem hiding this comment.
Analysis needs to take this into account when looking at state_path_acl_exceeds_permissions.
Can we choose to not emit it when permissions are not set?
There was a problem hiding this comment.
Simpliefied. We only record a single is_auto_migration_compatible. All the rich logic lives in the CLI.
permissions block.
Approval status: pending
|
abe3dfb to
3c6a454
Compare
3c6a454 to
681e089
Compare
| has_serverless_compute true | ||
| local.cache.attempt true | ||
| local.cache.miss true | ||
| permissions_section_is_set false |
There was a problem hiding this comment.
Analysis needs to take this into account when looking at state_path_acl_exceeds_permissions.
Can we choose to not emit it when permissions are not set?
681e089 to
e6521fb
Compare
|
We will also track auto migration from terraform to direct, can we prefix these values with dms_ to disambiguate? I'd also use shorter names with the same prefix for grouping / easier search in telemetry dashboard. For example, instead of use: dms_compat_auto |
Deploying a bundle requires write access (CAN_EDIT or higher) to the state folder; after an automatic DMS migration that is governed by a deployment object carrying only the bundle's statically declared permissions. Migration is therefore seamless only when everyone with write access to the state folder is declared with CAN_MANAGE in the permissions section — anyone missing loses the ability to deploy. ApplyWorkspaceRootPermissions already calls SetPermissions on each workspace path prefix during deploy; the response carries the folder's resulting ACL, which we reuse (no extra API call) to evaluate this. Exactly one verdict is recorded per deploy: - is_definitely_auto_migration_compatible: everyone with write access to the state folder is statically declared. - is_not_auto_migration_compatible: the state folder has undeclared write access. Includes the statically known cases: /Workspace/Shared without group_name: users CAN_MANAGE, and a folder under /Workspace/Users/<owner> (the owner always has CAN_MANAGE) with no permissions section. - is_maybe_auto_migration_compatible: no permissions section and the state folder has no known write access; resolving it needs a GetPermissions call. The fake test server now models directory ACL inheritance (home-folder owners and ancestor folder grants appear as inherited entries), so the acceptance test exercises the full matrix via bundle paths, declared permissions, and real parent folder grants. Co-authored-by: Shreyas Goenka <shreyas.goenka@databricks.com>
|
Renamed per @denik's suggestion: the three verdict keys are now |
Telemetry only. Deploying a bundle requires write access (CAN_EDIT or higher) to the state folder; after an auto DMS migration that is governed by a deployment object carrying only the bundle's statically declared
permissions. Migration is seamless only when everyone with write access to the state folder is declared with CAN_MANAGE — anyone missing loses the ability to deploy. Evaluated duringbundle deployby reusing the existingSetPermissionsresponse (no extra API call).Exactly one verdict per deploy (
bool_values):dms_compat_auto— all write access on the state folder is declared.dms_compat_not— undeclared write access exists. Includes the statically known cases:/Workspace/Sharedwithoutusers: CAN_MANAGE, and a folder under/Workspace/Users/<owner>(owner always has CAN_MANAGE) with no permissions section.dms_compat_maybe— no permissions section and no known write access; resolving needs aGetPermissionscall.Plus
state_path_is_shared.Tested by one acceptance test over the location × permissions matrix, including undeclared and declared CAN_EDIT grants; the fake server models directory ACL inheritance (home owners + ancestor grants), with parent grants set up via
workspace set-permissions.