Skip to content

Document the files a new resource type needs and guard shared code against naming resource types - #8043

Draft
janniklasrose wants to merge 11 commits into
janniklasrose/per-resource-testserver-permission-typesfrom
janniklasrose/per-resource-docs-guardrails
Draft

janniklasrose wants to merge 11 commits into
janniklasrose/per-resource-testserver-permission-typesfrom
janniklasrose/per-resource-docs-guardrails

Conversation

@janniklasrose

Copy link
Copy Markdown
Member

Changes

  • bundle/config/resources/README.md gets one section, "Adding a resource type": every file a new type needs, in the order you would write them, each with what it declares or registers and the test that fails while it is missing. A second table lists the registrations for behaviour that needs the whole bundle.
  • The direct engine, invariant and Python acceptance READMEs, AGENTS.md, and the rules for generated files and telemetry link to that section instead of repeating it. Statements that the code contradicts are corrected: a test that does not exist, resources.yml, the names of invariant configs, a directory that does not exist.
  • New test TestSharedCodeNamesNoNewResourceTypes. It parses the hand-written, non-test Go files under bundle/ and cmd/bundle/ that are not named after a resource key, and records which resource types each one names in bundle/config/resources/testdata/shared_code_resource_types.txt. It fails when a file names a type the record does not list for it, and when a listed type is no longer named. -update regenerates the record.

This builds on #8042, which is based on the combined branch of the per-resource changes.

Why

Logic about one resource type lives in files named after its key. Nothing kept a new type from being wired into a shared list by hand, and the steps to add a type were spread over several documents.

The record turns each new mention of a resource type in shared code into a one-line diff in review. It holds 15 files today: the shared code that still names a resource type, such as validators that keep per-type branches, the Python wheel trampoline and the apps validation.

Measured on the combined branch by taking feature_specs out and adding it again: the change that originally added the type edited 20 shared hand-written files besides bundle/config/resources.go. The measurement found two left, both test fixtures, and #8035 and #8036 removed the need for those. A new type now has to edit one shared hand-written file, bundle/config/resources.go.

The guard is syntactic. It does not see a branch on an SDK type, a Resources value passed as a parameter, a singular name, or code outside bundle/ and cmd/bundle/.

Tests

  • The guard test runs with the unit tests in well under a second, without network access or a built binary. It was seen to fail, with a message that says what to do, for a new shared file that names a type, for a recorded file that names another type, and for a recorded type that is no longer named. A test on source snippets pins the rule for fields of Resources.
  • An independent review checked about forty names in the new section against the code: every path pattern, registration function and test exists, and each named test fails for a type without its file.
  • The unit and acceptance suites pass.

This pull request and its description were written by Isaac.

janniklasrose and others added 10 commits November 26, 2026 01:30
The steps to add a resource type were spread over several READMEs that repeated each other and named files that do not exist. bundle/config/resources/README.md now lists every file a new type needs, in the order they are written, each with the test that fails while it is missing, plus the per-type registrations for behaviour that needs the whole bundle. The other documents keep what is specific to their package and link to that list.

Co-authored-by: Isaac <no-reply@databricks.com>
Logic about one resource type belongs in that type's files, but nothing stopped a new type from being wired into a shared list by hand. TestSharedCodeNamesNoNewResourceTypes parses the hand-written Go files under bundle/ and cmd/bundle/ that are not named after a resource key, and records which resource types each one names: a string that is a resource key, a field of config.Resources, or a config type. The record is a sorted text file, so naming a new type in shared code shows up as a one-line diff, and the test fails when a file names a type the record does not list for it or stops naming one it does. The Terraform state mappings and generated files are excluded.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
The target mode tests take their examples from one file per resource type, and the state load tests cover every type by construction, so the list of files a new type needs names the per-type file instead of two shared test files.

Co-authored-by: Isaac <no-reply@databricks.com>
The telemetry rule and the resources_metadata comment cited a test that no longer exists, and the rule said a new type needs no telemetry change at all, which contradicts the resource types README: a type with lifecycle.started declares its telemetry key, and deploy bool values register per type. Name the existing test and link to the README instead of repeating it.

Co-authored-by: Isaac <no-reply@databricks.com>
TestAppropriateResourcesAreRenamed only checks types whose target mode examples are registered, so it says nothing about a new type until step 13. TestCreateRecoveryCoverage fails unless the adapter recovers from a failed create or opts out; the step did not say so.

Co-authored-by: Isaac <no-reply@databricks.com>
AGENTS.md named a bundle/mutator/ directory that does not exist; the Mutator interface lives in bundle/mutator.go. The Python support fixtures also hold a generated out.test.toml, so they are seven files, not six.

Co-authored-by: Isaac <no-reply@databricks.com>
Shared code that held config.Resources in a variable (r := b.Config.Resources; r.Jobs) could name a resource type without the guard test noticing. Treat a variable that the same function sets to a Resources value, or a pointer to one, like that value, and pin the rule with snippet tests. The record is unchanged. The doc comment now names the record's known false positive so it is not removed by mistake.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
The fake server registers permission object types from the file of each API, and the per-type files under bundle/deploy are named after the resource key. The list of files a new type needs says both, names the list of types the deployment history service accepts, and the record of shared code that names resource types drops the three renamed files.

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

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: fda6a2c08 | 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=276161894/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=276161894/001/out.deploy1.requests.json
    acceptance_test.go:1402: Diff:
        --- bundle/resources/grants/model_services/out.plan1.json
        +++ /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=276161894/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):

acceptance_test.go:1402: Diff:
        --- bundle/resources/grants/model_services/output.txt
        +++ /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=1973020112/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=1973020112/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=1973020112/001/out.deploy1.requests.json
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=true478544912/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=true478544912/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=true
        	Messages:   	bundle/resources/grants/model_services/out.deploy1.requests.json vs /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=true478544912/001/out.deploy1.requests.json

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/resources/grants/model_services/output.txt
        +++ /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=true3172762810/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=true3172762810/001/out.deploy1.requests.json
    acceptance_test.go:1402: Diff:
        --- bundle/resources/grants/model_services/out.plan1.json
        +++ /tmp/TestAcceptbundleresourcesgrantsmodel_servicesDMS=true3172762810/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"
                       ]
                     }

The test that guards schema annotations passes for a placeholder that is committed in the generated file, so the list of files a new type needs tells the reader to check for one.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: fda6a2c

Run: 45745992593

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 377 25 17:14
💚​ aws-windows-latest-4core-16gb 1 379 23 19:40
💚​ azure linux-2core-8gb 1 376 25 13:29
💚​ azure-windows-latest-4core-16gb 1 378 23 18:54
💚​ gcp linux-2core-8gb 1 377 25 19:21
💚​ gcp-windows-latest-4core-16gb 1 379 23 18:44
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 30 slowest tests (at least 2 minutes):
duration env testname
7:56 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=
7:31 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
6:25 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=1
3:47 aws linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=
3:45 aws linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
3:44 azure-windows-latest-4core-16gb TestAccept
3:42 aws-windows-latest-4core-16gb TestAccept
3:39 gcp-windows-latest-4core-16gb TestAccept
3:27 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=
3:20 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=1
3:16 azure linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
3:06 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=
2:53 aws linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=
2:52 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
2:52 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
2:45 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=
2:42 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=
2:31 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=
2:29 gcp linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=1
2:28 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=1
2:24 aws-windows-latest-4core-16gb 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.yml.tmpl/READPLAN=
2:16 azure linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=
2:09 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=1
2:08 aws linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_apply_policy_default_values.yml.tmpl/READPLAN=
2:03 aws linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=1
2:03 azure linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters_libraries.yml.tmpl/READPLAN=
2:02 azure linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=clusters.yml.tmpl/READPLAN=1
2:01 aws-windows-latest-4core-16gb 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.yml.tmpl/READPLAN=

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