Skip to content

direct: Added support for clusters deployment#3682

Merged
andrewnester merged 14 commits intomainfrom
feat/direct-clusters-support
Oct 8, 2025
Merged

direct: Added support for clusters deployment#3682
andrewnester merged 14 commits intomainfrom
feat/direct-clusters-support

Conversation

@andrewnester
Copy link
Contributor

@andrewnester andrewnester commented Sep 29, 2025

Changes

Added support for cluster deployment for direct deployment

As part of the implementation for direct, added the default values 60 for autotermination_minutes, the same value as in TF.

Why

Behaviour matches the one in Terraform

Tests

Enabled existing cluster acceptance tests for direct as well + added a new one which does da different type of updates

andrewnester added a commit that referenced this pull request Oct 1, 2025
## Changes
Added support for ClassifyChanges

## Why
Needed for #3682

Some resources might have different types of changes based on their
remote state. For example, the cluster's resize action becomes an update
if the cluster is stopped. In order to do such classification, we need
access to the remote state, so we are introducing a new ClassifyChange
method.

ClassifyChange is called first, if it returns ActionTypeUnset,
ClassifyByTriggers called

## Tests
<!-- How have you tested the changes? -->

<!-- If your PR needs to be included in the release notes for next
release,
add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Oct 1, 2025

Run: 18191055385

Env ✅​pass 🔄​flaky 🙈​skip
✅​ aws linux 322 538
✅​ aws windows 323 537
🔄​ aws-ucws linux 429 9 434
🔄​ aws-ucws windows 430 9 433
✅​ azure linux 322 537
✅​ azure windows 323 536
🔄​ azure-ucws linux 430 8 433
🔄​ azure-ucws windows 435 4 432
✅​ gcp linux 321 539
✅​ gcp windows 322 538
9 failing tests:
Test Name aws-ucws linux aws-ucws windows azure-ucws linux azure-ucws windows
TestAccept/bundle/deploy/dashboard/detect-change 🔄​flaky 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/deploy/dashboard/generate_inplace 🔄​flaky 🔄​flaky 🔄​flaky 🔄​flaky
TestAccept/bundle/deploy/dashboard/nested-folders 🔄​flaky 🔄​flaky 🔄​flaky ✅​pass
TestAccept/bundle/deploy/dashboard/simple 🔄​flaky 🔄​flaky 🔄​flaky 🔄​flaky
TestAccept/bundle/deploy/dashboard/simple_outside_bundle_root 🔄​flaky 🔄​flaky 🔄​flaky 🔄​flaky
TestAccept/bundle/deploy/dashboard/simple_syncroot 🔄​flaky 🔄​flaky 🔄​flaky ✅​pass
TestAccept/bundle/deployment/bind/dashboard 🔄​flaky 🔄​flaky 🔄​flaky ✅​pass
TestAccept/bundle/deployment/bind/dashboard/recreation 🔄​flaky 🔄​flaky 🔄​flaky ✅​pass
TestDashboardAssumptions_WorkspaceImport 🔄​flaky 🔄​flaky 🔄​flaky 🔄​flaky

@andrewnester andrewnester marked this pull request as ready for review October 1, 2025 17:29
}

localAction, localChangeMap := convertChangesToTriggersMap(adapter, localDiff)
remoteState, err := adapter.DoRefresh(ctx, dbentry.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.

Moving state refresh to before local actions because we need to have access to the remote state to classify local diffs as well, aka resize vs. update if the cluster is running or not

@denik
Copy link
Contributor

denik commented Oct 3, 2025

Can we enable these tests?

bundle/integration_whl/interactive_cluster/test.toml:EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform"]  # clusters resource
bundle/integration_whl/interactive_cluster_dynamic_version/test.toml:EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform"]  # clusters not implemented
bundle/integration_whl/interactive_single_user/test.toml:EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform"]  # clusters resource
bundle/resources/clusters/test.toml:EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform"]  # clusters are not implemented yet

return err
}
return nil
}
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't need WaitAfterCreate/Update?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@denik no, we don't wait wait for clusters to start / update now in TF as well

Copy link
Contributor

@denik denik left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@andrewnester andrewnester merged commit 18cab43 into main Oct 8, 2025
12 checks passed
@andrewnester andrewnester deleted the feat/direct-clusters-support branch October 8, 2025 09:49
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

Comments