Skip to content

Register the fake server's permission object types per API - #8042

Draft
janniklasrose wants to merge 2 commits into
janniklasrose/per-resource-integrationfrom
janniklasrose/per-resource-testserver-permission-types
Draft

janniklasrose wants to merge 2 commits into
janniklasrose/per-resource-integrationfrom
janniklasrose/per-resource-testserver-permission-types

Conversation

@janniklasrose

Copy link
Copy Markdown
Member

Changes

  • The fake server's permission object types are registered from the file of the API that owns the objects, with registerPermissionsObjectType in that file's init(), next to its route and store registrations. The hand-written table requestObjectTypeToObjectType in libs/testserver/permissions.go is gone.
  • Of the 24 pairs, 20 move to 18 API files. Four stay in permissions.go, registered there under one comment, because the fake server serves their permissions without modelling the API: authorization, dbsql-dashboards, sql/alerts and sql/queries.
  • A second registration for the same request object type panics and names it.
  • TestPermissionsObjectTypesMatchTestServer says where a missing object type is registered.

This builds on the combined branch of the per-resource changes, which contains the fake server's per-API registration (#8018) and the test above (#8005).

Why

A bundle resource type declares its permissions object types itself, and TestPermissionsObjectTypesMatchTestServer fails when the fake server does not know one of them. So a new resource type with a new permissions object type meant editing a shared table in the fake server. Now it means one line in the file of its API.

Tests

  • The registered pairs are the same 24 as the table held: a temporary test compared them before the table was removed. It is not part of the change.
  • No acceptance output changes; the unit and acceptance suites pass.

This pull request and its description were written by Isaac.

janniklasrose and others added 2 commits November 26, 2026 02:09
The fake permissions API kept one hand-written table of request object
types, so adding a permissions object type for an API meant editing a
shared file. Each API file in libs/testserver now registers its
permission object types from init(), next to its routes and store.
Object types whose API the fake server does not model stay registered
in permissions.go. A second registration of the same request object
type panics. The set of pairs is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@janniklasrose janniklasrose added DABs DABs related issues new-resource-work Skills, docs and small refactors for onboarding new bundle resources labels Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: 9ff2b6eba | Workflow run

Selected 20 changed tests (limit=20, 99 not selected)

128 tests: regression=2 unreleased=0 coverage=126 failing=0
test branch main (3f3ebfd) latest (v1.28.0)
TestAccept/bundle/escaped_refs/DMS=/READPLAN= ✅ ✅ ✅
TestAccept/bundle/escaped_refs/DMS=/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/escaped_refs/DMS=true/READPLAN= ✅ ✅ ✅
TestAccept/bundle/escaped_refs/DMS=true/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=alerts.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=apps.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=clusters.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=dashboards.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=database_catalogs.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=database_instances.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=experiments.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=jobs.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=jobs_apply_policy_default_values_for_each_task.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=jobs_apply_policy_default_values_job_cluster.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=jobs_apply_policy_default_values_task_cluster.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=jobs_escaped_refs.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=jobs_pydabs_10_tasks.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=jobs_run_job_ref.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=jobs_table_update_trigger.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=jobs_with_depends_on.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=jobs_with_task.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=model_serving_endpoints.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=models.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=models_with_permissions.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=pipelines.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=pipelines_allow_duplicate_names.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=pipelines_apply_policy_default_values.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=pipelines_config_dots.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=postgres_branches.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=postgres_catalogs.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=postgres_databases.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=postgres_endpoints.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=postgres_projects.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=postgres_roles.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=postgres_synced_tables.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=registered_models.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=schemas_empty_grants.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=schemas_tf_compat.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=schemas_uppercase_name.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=secret_scopes.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=secret_scopes_default_backend_type.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=synced_database_tables.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=volumes.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=volumes_external.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/auto-migrate/DMS=/INPUT_CONFIG=volumes_volume_path_job_ref.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=alerts.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=apps.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=catalogs.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=catalogs_optional_fields.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=clusters.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=dashboards.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=data_quality_monitors.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=database_catalogs.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=database_instances.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=experiments.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=external_locations.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=feature_specs.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=features.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=jobs.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=jobs_apply_policy_default_values_for_each_task.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=jobs_apply_policy_default_values_job_cluster.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=jobs_apply_policy_default_values_task_cluster.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=jobs_pydabs_10_tasks.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=jobs_run_job_ref.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=jobs_table_update_trigger.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=jobs_with_depends_on.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=jobs_with_task.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=model_services.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=model_serving_endpoints.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=model_serving_endpoints_telemetry.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=models.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=pipelines.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=pipelines_allow_duplicate_names.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=pipelines_apply_policy_default_values.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=postgres_branches.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=postgres_catalogs.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=postgres_databases.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=postgres_endpoints.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=postgres_projects.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=postgres_roles.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=postgres_synced_tables.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=registered_models.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=schemas.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=schemas_empty_grants.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=schemas_tf_compat.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=schemas_uppercase_name.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=secret_scopes.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=secret_scopes_default_backend_type.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=sql_warehouses.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=synced_database_tables.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=uc_trailing_slash.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=volumes.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=volumes_external.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=volumes_uppercase_name.yml.tmpl ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=alerts.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=alerts.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=apps.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=apps.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=catalogs.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=catalogs.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=catalogs_optional_fields.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=catalogs_optional_fields.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster_policies.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster_policies.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=dashboards.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=dashboards.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=data_quality_monitors.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=data_quality_monitors.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=database_catalogs.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=database_catalogs.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=database_instances.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=database_instances.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=experiments.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=experiments.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/resources/grants/model_services/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/grants/model_services/DMS=true ✅ ❌ ❌
TestAccept/selftest/envmatrix_files/all/VALUE=alpha.txt ✅ ✅ ✅
TestAccept/selftest/envmatrix_files/all/VALUE=beta.txt ✅ ✅ ✅
TestAccept/selftest/envmatrix_files/excluded/VALUE=alpha.txt ✅ ✅ ✅
TestAccept/selftest/selection ✅ ✅ ✅
TestAccept/bundle/resources/grants/model_services/DMS=: branch ✅ | main (3f3ebfd) ❌ | latest (v1.28.0) ❌

main (3f3ebfd):

acceptance_test.go:1402: Diff:
        --- bundle/resources/grants/model_services/output.txt
        +++ /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=1093708770/002/output.txt
        @@ -18,7 +18,6 @@
             {
               "principal": "deco-test-user@databricks.com",
               "privileges": [
        -        "APPLY_TAG",
                 "EXECUTE"
               ]
             }
        @@ -26,8 +25,10 @@
         }
         
         >>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged
        +update model_services.my_model_service.grants
         
        +Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged
        +
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.model_services.my_model_service
        
    acceptance_test.go:1402: Diff:
        --- bundle/resources/grants/model_services/out.plan1.json
        +++ /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=1093708770/001/out.plan1.json
        @@ -28,7 +28,12 @@
                     {
                       "principal": "deco-test-user@databricks.com",
                       "privileges": [
        -                "APPLY_TAG",
        +                "APPLY_TAG"
        +              ]
        +            },
        +            {
        +              "principal": "deco-test-user@databricks.com",
        +              "privileges": [
                         "EXECUTE"
                       ]
                     }
        
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1155
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:704
        	Error:      	Not equal: 
        	            	expected: "{\n  \"method\": \"PATCH\",\n  \"path\": \"/api/2.1/unity-catalog/permissions/model_service/main.myschema.myservice\",\n  \"body\": {\n    \"changes\": [\n      {\n        \"add\": [\n          \"APPLY_TAG\",\n          \"EXECUTE\"\n        ],\n        \"principal\": \"deco-test-user@databricks.com\",\n        \"remove\": [\n          \"ALL_PRIVILEGES\"\n        ]\n      }\n    ]\n  }\n}\n"
        	            	actual  : "{\n  \"method\": \"PATCH\",\n  \"path\": \"/api/2.1/unity-catalog/permissions/model_service/main.myschema.myservice\",\n  \"body\": {\n    \"changes\": [\n      {\n        \"add\": [\n          \"APPLY_TAG\"\n        ],\n        \"principal\": \"deco-test-user@databricks.com\",\n        \"remove\": [\n          \"ALL_PRIVILEGES\"\n        ]\n      },\n      {\n        \"add\": [\n          \"EXECUTE\"\n        ],\n        \"principal\": \"deco-test-user@databricks.com\",\n        \"remove\": [\n          \"ALL_PRIVILEGES\"\n        ]\n      }\n    ]\n  }\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -7,3 +7,11 @@
        	            	         "add": [
        	            	-          "APPLY_TAG",
        	            	+          "APPLY_TAG"
        	            	+        ],
        	            	+        "principal": "deco-test-user@databricks.com",
        	            	+        "remove": [
        	            	+          "ALL_PRIVILEGES"
        	            	+        ]
        	            	+      },
        	            	+      {
        	            	+        "add": [
        	            	           "EXECUTE"
        	Test:       	TestAccept/bundle/resources/grants/model_services/DMS=
        	Messages:   	bundle/resources/grants/model_services/out.deploy1.requests.json vs /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=1093708770/001/out.deploy1.requests.json

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/resources/grants/model_services/output.txt
        +++ /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=2840992970/002/output.txt
        @@ -18,7 +18,6 @@
             {
               "principal": "deco-test-user@databricks.com",
               "privileges": [
        -        "APPLY_TAG",
                 "EXECUTE"
               ]
             }
        @@ -26,8 +25,10 @@
         }
         
         >>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged
        +update model_services.my_model_service.grants
         
        +Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged
        +
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.model_services.my_model_service
        
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1155
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:704
        	Error:      	Not equal: 
        	            	expected: "{\n  \"method\": \"PATCH\",\n  \"path\": \"/api/2.1/unity-catalog/permissions/model_service/main.myschema.myservice\",\n  \"body\": {\n    \"changes\": [\n      {\n        \"add\": [\n          \"APPLY_TAG\",\n          \"EXECUTE\"\n        ],\n        \"principal\": \"deco-test-user@databricks.com\",\n        \"remove\": [\n          \"ALL_PRIVILEGES\"\n        ]\n      }\n    ]\n  }\n}\n"
        	            	actual  : "{\n  \"method\": \"PATCH\",\n  \"path\": \"/api/2.1/unity-catalog/permissions/model_service/main.myschema.myservice\",\n  \"body\": {\n    \"changes\": [\n      {\n        \"add\": [\n          \"APPLY_TAG\"\n        ],\n        \"principal\": \"deco-test-user@databricks.com\",\n        \"remove\": [\n          \"ALL_PRIVILEGES\"\n        ]\n      },\n      {\n        \"add\": [\n          \"EXECUTE\"\n        ],\n        \"principal\": \"deco-test-user@databricks.com\",\n        \"remove\": [\n          \"ALL_PRIVILEGES\"\n        ]\n      }\n    ]\n  }\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -7,3 +7,11 @@
        	            	         "add": [
        	            	-          "APPLY_TAG",
        	            	+          "APPLY_TAG"
        	            	+        ],
        	            	+        "principal": "deco-test-user@databricks.com",
        	            	+        "remove": [
        	            	+          "ALL_PRIVILEGES"
        	            	+        ]
        	            	+      },
        	            	+      {
        	            	+        "add": [
        	            	           "EXECUTE"
        	Test:       	TestAccept/bundle/resources/grants/model_services/DMS=
        	Messages:   	bundle/resources/grants/model_services/out.deploy1.requests.json vs /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=2840992970/001/out.deploy1.requests.json
    acceptance_test.go:1402: Diff:
        --- bundle/resources/grants/model_services/out.plan1.json
        +++ /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=2840992970/001/out.plan1.json
        @@ -28,7 +28,12 @@
                     {
                       "principal": "deco-test-user@databricks.com",
                       "privileges": [
        -                "APPLY_TAG",
        +                "APPLY_TAG"
        +              ]
        +            },
        +            {
        +              "principal": "deco-test-user@databricks.com",
        +              "privileges": [
                         "EXECUTE"
                       ]
                     }
TestAccept/bundle/resources/grants/model_services/DMS=true: branch ✅ | main (3f3ebfd) ❌ | latest (v1.28.0) ❌

main (3f3ebfd):

acceptance_test.go:1402: Diff:
        --- bundle/resources/grants/model_services/output.txt
        +++ /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=true2126398247/002/output.txt
        @@ -18,7 +18,6 @@
             {
               "principal": "deco-test-user@databricks.com",
               "privileges": [
        -        "APPLY_TAG",
                 "EXECUTE"
               ]
             }
        @@ -26,8 +25,10 @@
         }
         
         >>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged
        +update model_services.my_model_service.grants
         
        +Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged
        +
         >>> [CLI] bundle destroy --auto-approve
         The following resources will be deleted:
           delete resources.model_services.my_model_service
        
    acceptance_test.go:1402: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1402
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1155
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:704
        	Error:      	Not equal: 
        	            	expected: "{\n  \"method\": \"PATCH\",\n  \"path\": \"/api/2.1/unity-catalog/permissions/model_service/main.myschema.myservice\",\n  \"body\": {\n    \"changes\": [\n      {\n        \"add\": [\n          \"APPLY_TAG\",\n          \"EXECUTE\"\n        ],\n        \"principal\": \"deco-test-user@databricks.com\",\n        \"remove\": [\n          \"ALL_PRIVILEGES\"\n        ]\n      }\n    ]\n  }\n}\n"
        	            	actual  : "{\n  \"method\": \"PATCH\",\n  \"path\": \"/api/2.1/unity-catalog/permissions/model_service/main.myschema.myservice\",\n  \"body\": {\n    \"changes\": [\n      {\n        \"add\": [\n          \"APPLY_TAG\"\n        ],\n        \"principal\": \"deco-test-user@databricks.com\",\n        \"remove\": [\n          \"ALL_PRIVILEGES\"\n        ]\n      },\n      {\n        \"add\": [\n          \"EXECUTE\"\n        ],\n        \"principal\": \"deco-test-user@databricks.com\",\n        \"remove\": [\n          \"ALL_PRIVILEGES\"\n        ]\n      }\n    ]\n  }\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -7,3 +7,11 @@
        	            	         "add": [
        	            	-          "APPLY_TAG",
        	            	+          "APPLY_TAG"
        	            	+        ],
        	            	+        "principal": "deco-test-user@databricks.com",
        	            	+        "remove": [
        	            	+          "ALL_PRIVILEGES"
        	            	+        ]
        	            	+      },
        	            	+      {
        	            	+        "add": [
        	            	           "EXECUTE"
        	Test:       	TestAccept/bundle/resources/grants/model_services/DMS=true
        	Messages:   	bundle/resources/grants/model_services/out.deploy1.requests.json vs /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=true2126398247/001/out.deploy1.requests.json
    acceptance_test.go:1402: Diff:
        --- bundle/resources/grants/model_services/out.plan1.json
        +++ /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=true2126398247/001/out.plan1.json
        @@ -28,7 +28,12 @@
                     {
                       "principal": "deco-test-user@databricks.com",
                       "privileges": [
        -                "APPLY_TAG",
        +                "APPLY_TAG"
        +              ]
        +            },
        +            {
        +              "principal": "deco-test-user@databricks.com",
        +              "privileges": [
                         "EXECUTE"
                       ]
                     }

latest (v1.28.0): same output as main (3f3ebfd)

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 9ff2b6e

Run: 45742934788

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 377 25 13:15
💚​ aws-windows-latest-4core-16gb 1 379 23 17:35
💚​ azure linux-2core-8gb 1 376 25 12:49
💚​ azure-windows-latest-4core-16gb 1 378 23 17:39
💚​ gcp linux-2core-8gb 1 377 25 13:58
💚​ gcp-windows-latest-4core-16gb 1 379 23 19:39
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 27 slowest tests (at least 2 minutes):
duration env testname
3:51 gcp-windows-latest-4core-16gb TestAccept
3:45 azure-windows-latest-4core-16gb TestAccept
3:19 aws-windows-latest-4core-16gb TestAccept
3:09 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
2:55 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=
2:53 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
2:47 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=
2:43 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
2:36 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=1
2:35 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=1
2:33 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=
2:30 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=1
2:28 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=
2:28 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=1
2:24 azure linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=
2:24 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=
2:22 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
2:21 aws linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
2:21 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=
2:18 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=
2:09 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=1
2:08 azure linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
2:06 aws linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=
2:03 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=
2:02 aws linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=1
2:00 azure linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=
2:00 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=1

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues new-resource-work Skills, docs and small refactors for onboarding new bundle resources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants