Skip to content

Use resource.yml in field classification in config-remote-sync#4677

Open
ilyakuz-db wants to merge 6 commits intomainfrom
config-sync-migrate-to-resource-yml
Open

Use resource.yml in field classification in config-remote-sync#4677
ilyakuz-db wants to merge 6 commits intomainfrom
config-sync-migrate-to-resource-yml

Conversation

@ilyakuz-db
Copy link
Contributor

@ilyakuz-db ilyakuz-db commented Mar 6, 2026

Changes

  1. Use existing resource.yml classification in config-remote-sync instead of custom rules
  2. Update resource.yml with new fields

Why

This PR eliminates tech debt, config-remote-sync will be in sync with resource updates

Tests

Existing tests (one snapshot updated because underlying bug was fixed)

@ilyakuz-db ilyakuz-db temporarily deployed to test-trigger-is March 6, 2026 16:38 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Mar 6, 2026

Commit: 7957b55

Run: 22832194523

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🔄​ aws linux 2 6 7 268 780 9:55
💚​ aws windows 8 7 270 778 6:31
💚​ aws-ucws linux 8 7 365 695 7:45
💚​ aws-ucws windows 8 7 367 693 6:02
💚​ azure linux 2 9 271 778 8:11
💚​ azure windows 2 9 273 776 5:24
💚​ azure-ucws linux 2 9 370 691 9:52
💚​ azure-ucws windows 2 9 372 689 6:13
💚​ gcp linux 2 9 267 781 9:12
💚​ gcp windows 2 9 269 779 5:50
15 interesting tests: 7 SKIP, 6 RECOVERED, 2 flaky
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🔄​ TestAccept 🔄​f 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestAccept/ssh/connection 🔄​f 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 36 slowest tests (at least 2 minutes):
duration env testname
6:06 gcp linux TestAccept/ssh/connection
5:51 gcp linux TestSecretsPutSecretStringValue
5:10 aws-ucws windows TestAccept/ssh/connection
4:58 aws linux TestSecretsPutSecretStringValue
4:44 aws-ucws linux TestAccept/ssh/connection
4:37 azure linux TestAccept/ssh/connection
4:22 azure-ucws windows TestSecretsPutSecretStringValue
4:11 gcp windows TestSecretsPutSecretStringValue
3:59 azure linux TestSecretsPutSecretStringValue
3:58 azure-ucws linux TestAccept/ssh/connection
3:48 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:44 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:43 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:33 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:31 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:20 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:17 azure-ucws linux TestSecretsPutSecretStringValue
3:14 gcp windows TestAccept/ssh/connection
3:09 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:07 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:57 aws windows TestAccept/ssh/connection
2:52 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:51 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:49 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:47 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:45 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:44 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:29 aws windows TestSecretsPutSecretStringValue
2:20 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:19 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:14 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:13 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:09 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:09 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:06 azure-ucws windows TestAccept/ssh/connection
2:03 azure windows TestAccept/ssh/connection

@ilyakuz-db ilyakuz-db temporarily deployed to test-trigger-is March 7, 2026 11:01 — with GitHub Actions Inactive
email_notifications.on_failure[0]: replace
max_concurrent_runs: replace
tags['env']: remove
timeout_seconds: remove
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is expected, logic was incorrect previously - this case was skipped completely

// If a CLI-defaulted field is changed on remote and should be disabled
// (e.g. queueing disabled → remote field is nil), we can't define it
// in the config as "null" because the CLI default will be applied again.
var resetValues = map[string][]resetRule{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include this logic in resources.yml?

reason: managed

backend_defaults:
# Backend returns PERFORMANCE_OPTIMIZED for serverless jobs when not set
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is set only for serverless jobs, probably, this should live in changes desc overrides

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this field ever set for non-serverless jobs?


# Same as clusters.node_type_id — see clusters/resource_cluster.go#L333
# s.SchemaPath("node_type_id").SetComputed()
- field: tasks[*].new_cluster.node_type_id
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I try to create new_cluster without node_type_id it fails with 400 error:

Endpoint: POST https://<host>/api/2.2/jobs/reset
HTTP Status: 400 Bad Request
API error_code: INVALID_PARAMETER_VALUE
API message: Cluster validation error: Unknown node type id

Considering that backend default is applied only when config value is nil, and for nil value we have 400 error - it doesn't make sense to keep it here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @denik

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question, if I don't specify new_cluster, can it be added by the backend when resource is fetched? I guess not, or some test would fail, but good to say it explicitly.

@ilyakuz-db ilyakuz-db temporarily deployed to test-trigger-is March 8, 2026 23:18 — with GitHub Actions Inactive
@ilyakuz-db ilyakuz-db changed the title Config sync migrate to resource yml Use resource.yml in field classification in config-remote-sync Mar 9, 2026
@ilyakuz-db ilyakuz-db marked this pull request as ready for review March 9, 2026 09:54
ignore_remote_changes:
# edit_mode is set by CLI, not user-configurable
- field: edit_mode
reason: managed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using "managed" in other places to mean managed by backend, we should have another reason here.


jobs:
ignore_remote_changes:
# edit_mode is set by CLI, not user-configurable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean DABs override user setting? Do you know if that is intentional?

reason: managed

backend_defaults:
# Backend returns PERFORMANCE_OPTIMIZED for serverless jobs when not set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this field ever set for non-serverless jobs?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants