Skip to content

[Fix] Do not validate single node clusters if a policy is configured#4206

Closed
shreyas-goenka wants to merge 1 commit into
mainfrom
remove/validation-for-policy
Closed

[Fix] Do not validate single node clusters if a policy is configured#4206
shreyas-goenka wants to merge 1 commit into
mainfrom
remove/validation-for-policy

Conversation

@shreyas-goenka
Copy link
Copy Markdown
Contributor

@shreyas-goenka shreyas-goenka commented Nov 10, 2024

Changes

Addresses another problem reported in databricks/cli#1546, where customers were not able to configure and use cluster policies for single node clusters.

Tests

Unit tests, and manually verified that cluster is successfully created without spark_conf even when num_workers is 0.

@shreyas-goenka shreyas-goenka requested review from a team as code owners November 10, 2024 22:17
@shreyas-goenka shreyas-goenka requested review from parthban-db and removed request for a team November 10, 2024 22:17
@github-actions
Copy link
Copy Markdown
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 4206
  • Commit SHA: 45cebe3f5543692c0e306dd7e02ad68f9f538544

Checks will be approved automatically on success.

@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

Test Details: go/deco-tests/11768949308

Comment thread clusters/clusters_api.go

// TODO: Remove this once all the resources using clusters are migrated to Go SDK.
// They would then be using Validate(cluster compute.CreateCluster) defined in resource_cluster.go that is a duplicate of this method but uses Go SDK.
func (cluster Cluster) Validate() error {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This function was not being used anywhere.

@shreyas-goenka shreyas-goenka changed the title Do not validate single node clusters if a policy is configured [Fix] Do not validate single node clusters if a policy is configured Nov 10, 2024
@alexott
Copy link
Copy Markdown
Contributor

alexott commented Nov 11, 2024

@shreyas-goenka if required attributes will be filled via cluster policy, then there will be permanent configuration drift. See note in the doc

@shreyas-goenka
Copy link
Copy Markdown
Contributor Author

Closing this PR in favour of #4222

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