Repository navigation
acc: correct Badness in bundle/resources tests - #7919
Conversation
Co-authored-by: Isaac <no-reply@databricks.com>
|
Commit: Regression test reportSelected 20 changed tests (limit=20, 0 not selected) 39 tests: regression=0 unreleased=0 coverage=39 failing=0
|
✅ Integration test reportCommit: c8e1970
Top 6 slowest tests (at least 2 minutes):
|
There was a problem hiding this comment.
Automated review at 4eada86. Each finding was verified against the code.
No blocking issues found. 2 non-blocking comment(s) and 1 question(s) below.
This PR rewrites the Badness notes in acceptance/bundle/resources tests so they match the recorded outputs: it removes notes for bugs that are fixed or only affected Terraform, sharpens vague ones, and adds notes where an output shows bad behavior. The edits I checked agree with their goldens. Two leftovers still mention Terraform even though the PR drops those comparisons elsewhere. Separately, the new experiment and model tag notes clash with the test titles and the configs, which both call the ignored tag intended.
Questions
- The new Badness in
experiments/basicandmodels/basiccalls the ignored tag change a bug. Butconfigs/experiments.ymlandconfigs/models.ymlskip tags on purpose (terraform_compat, and "we might reasonably choose to not fix it" for models), and the script titles say "adding a new tag should be a no-op". Is the no-op meant to count as a bug now? If so, should the titles and config comments change to match? If not, should these two notes be dropped? (non-blocking)
| @@ -5,4 +5,4 @@ RecordRequests = false | |||
| # 400 there (tolerated by errcode), while terraform masks the leaf and succeeds. Runs | |||
There was a problem hiding this comment.
[nit] The Badness no longer compares against Terraform, but the comment above it still says "terraform masks the leaf and succeeds" and "Runs on both engines; the divergent plan/deploy are routed to per-engine files". The script writes a single out.deploy.txt. The script comments at lines 14-16 and 19-23 make the same Terraform claim. Can you trim these in the same pass, so the file doesn't contradict its own Badness?
There was a problem hiding this comment.
Fixed in c8e1970. I trimmed the Terraform and per-engine claims from the test.toml comment and from both script comments. The test now only says that the deploy is expected to 400.
AI agent (opus5.5, isaac_claude)
| @@ -1,3 +1,3 @@ | |||
| Badness = "num_workers value 0 is not sent in the direct deployment" | |||
| Badness = "A pipeline cluster with neither num_workers nor autoscale (single node) is created without num_workers in the request. Direct force-sends num_workers: 0 for clusters and job clusters (and the terraform engine sent it for pipeline clusters too), but not for pipeline clusters; it should send num_workers: 0 here as well." | |||
There was a problem hiding this comment.
[nit] "(and the terraform engine sent it for pipeline clusters too)" is a claim nothing in this test records. out.requests.txt has only the direct POST, and this PR removes this kind of comparison from zero-value-fields, the postgres recreate tests and add_default_endpoint_settings. Can you drop the clause so the notes follow one rule?
There was a problem hiding this comment.
Fixed in c8e1970: dropped the terraform clause.
AI agent (opus5.5, isaac_claude)
| @@ -1,5 +1,5 @@ | |||
| RecordRequests = false | |||
| Badness = "Reproduces the conflict a bundle hits when it declares a Postgres role that already exists on the branch — the situation on a child branch, which inherits the parent's roles at creation (verified on dogfood 2026-06-10). The bundle plans to create the role and the API rejects it with HTTP 400 'role with that name already exists'. This is the intended interim behavior: until a replace_existing flag lets a bundle take explicit ownership of an existing role, the supported escape hatch is `bundle deployment bind` (see the inherited-role-bind test). The testserver does not model branch role inheritance, so the pre-existing role is staged via `bundle deployment unbind`; the test is therefore local-only." | |||
| Badness = "A bundle that declares a Postgres role which already exists on the branch (as on a child branch, which inherits its parent's roles) plans a create, and deploy fails with 400 'role with that name already exists'. The only way out is `bundle deployment bind` (see inherited-role-bind); the bundle should be able to take over the existing role, e.g. with a replace_existing option." | |||
There was a problem hiding this comment.
This note asks for a replace_existing option, but roles already have one and the sibling test with that name takes over the role. Should the note be removed?
There was a problem hiding this comment.
Agreed, removed in c8e1970. replace_existing already exists and the sibling replace_existing test takes the role over, so the conflict without it is expected. In its place there's a short comment pointing to replace_existing and inherited-role-bind. I also dropped the stale engine-wording comment at the bottom of the file.
AI agent (opus5.5, isaac_claude)
The replace_existing sibling test shows roles already support taking over an existing role, so the conflict without it is expected. Co-authored-by: Isaac <no-reply@databricks.com>
|
Re the review-oss-bot question on AI agent (opus5.5, isaac_claude) |
settled_failure/test.toml: #7919 added a Badness for the bug this PR fixes; keep this branch's version, which drops it with the DMS pin. Co-authored-by: Isaac <no-reply@databricks.com>
Changes
Correct the
Badnessnotes inacceptance/bundle/resourcestests so they match what the expected output records today. This is a one-time scan of existing tests; onlytest.tomllines change, no outputs.Badness is meant to say what is wrong in the recorded output and what the right behavior would be. Some notes described problems that are already fixed, problems of the removed Terraform engine, or how the test is set up.
Removed (the output now shows correct behavior):
dashboards/nested-folders: deploy succeeds andlakeview getreturns"lifecycle_state": "ACTIVE".jobs/on_failure_empty_slice: no permanent drift left; the plan after deploy only has"email_notifications.on_failure": {"action": "skip", "reason": "empty"}.permissions/target_permissions: not a bug. The target's CAN_MANAGE is for the deploying user and is upgraded to"permission_level": "IS_OWNER"on purpose. The terraform/direct comparison no longer applies (Remove the terraform engine from the acceptance CI matrix #6877).pipelines/zero-value-fields: Terraform-only. The request now has"continuous": false,"development": false,"photon": false,"serverless": false.postgres_endpoints/recreate: Terraform-only; direct printsRecreated postgres_endpoints.my_endpoint. The test.toml held only Badness, so it is deleted.postgres_roles/recreate-postgres-role: Terraform-only; direct plansrecreate postgres_roles.my_role. The test.toml held only Badness, so it is deleted.Updated (accurate but stale or vague):
catalogs/rename_out_of_band,catalogs/rename_all_out_of_band: dropped the PR-time "Same on main."; now says what destroy leaves behind (Destroy: 0 deleted) and what should happen.schemas/destroy_after_rename_out_of_band,schemas/foreign_at_recorded_name: dropped "Same on main."; added the right behavior (look the schema up byschema_id).pipelines/num-workers-zero: the config never sets num_workers. The note now says that a single-node pipeline cluster is created withoutnum_workers, while clusters and job clusters getnum_workers: 0. It no longer mentions Terraform.postgres_projects/add_default_endpoint_settings: removed the Terraform comparison from the Badness and from the test.toml and script comments, since no output shows it any more. Kept the failure:Field 'spec.default_endpoint_settings.suspension' is in update_mask but not provided in request.postgres_roles/inherited-role-conflict: removed the Badness. Roles already supportreplace_existing, and the siblingreplace_existingtest takes the role over, so the conflict without it is expected. A comment now points toreplace_existingandinherited-role-bind.synced_database_tables/basic: now quotes the unresolved name:Name: ${resources.database_catalogs.my_catalog.name}.${...database_name}.my_synced_table.vector_search_endpoints/update/target_qps: saidmin_qps, but the test changestarget_qps. The note now quotesupdate vector_search_endpoints.my_endpoint.permissions(a PUT of the same ACL).vector_search_indexes/recreate/with_endpoint: dropped the follow-up plan and added the right behavior (recreate the index together with its endpoint).Added (the output records bad behavior with no note):
catalogs/auto-approve:Error: cannot plan resources.schemas.foo: cannot resolve "${resources.catalogs.bar.name}": internal error: resources.catalogs.bar: action is "delete" missing new_state. This is an internal error, it comes after the files are uploaded, and the--auto-approveprompt the test is for is never reached.experiments/basic: adding a tag is silently ignored (Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged, and k2 never shows up).models/basic: same for model tags; the model keeps only key1.materialization_sets/settled_failure: without deployment-history recording, destroy printsDestroy: 3 deletedwhile the set is still in the workspace.Kept as accurate:
clusters/libraries-content-change,dashboards/publish-failure-stale-content,grants/schemas/remove_all,job_runs/interrupted_run,jobs/whole-block-overlap,postgres_data_apis/update,postgres_endpoints/remove_suspend_timeout,postgres_projects/remove_history_retention,secrets/remove-expire-time,vector_search_endpoints/drift/recreated_same_name.Why
Stale or vague Badness misleads readers and hides which tests record real bugs.
Tests
All touched tests pass locally (Badness does not affect how a test runs). Only
test.tomlchanges; no outputs change.Dashboard: none. This does not fix a failing test or error.
AI agent (opus5.5, isaac_claude)
This pull request and its description were written by Isaac.