Skip to content

Conversation

@idelafuente-oc
Copy link

@idelafuente-oc idelafuente-oc commented Dec 5, 2025

Closes: #3977

Changes

Adds to the databricks bundle validate the ability to detect properties wrongly added to the parent task in for_each_task.
Currently it checks for:

  • max_retries (errors)
  • min_retry_interval_millis (warning)
  • retry_on_timeout (warning)

Can easily be extended to other configs with it's custom check.

Why

Currently databricks bundle validate doesn't detect this kind of issues, only on deployment this error was thrown. I think it's a good idea to add to the validate logic this typos of checks to prevent issues early on.

Tests

I have tested this changes by building the wheel locally with the changes implemented, here is the output of a validate run over code with the issue:
517134763-5a6f7f40-dbf6-408a-ad75-2765e25c73f4
I also added the unit tests for this.

@idelafuente-oc idelafuente-oc changed the title Validate/for each task validation for_each_task checks on databricks bundle validate Dec 5, 2025
@andrewnester
Copy link
Contributor

Hi @idelafuente-oc ! Thanks for the PR! Contributing to Databricks CLI requires you to sign a CLA If that's something you're okay with, please send a request to sign the CLA to dabs-feedback@databricks.com, and we'll take it from there. Thank you!

@idelafuente-oc
Copy link
Author

idelafuente-oc commented Dec 9, 2025

Hi @idelafuente-oc ! Thanks for the PR! Contributing to Databricks CLI requires you to sign a CLA If that's something you're okay with, please send a request to sign the CLA to dabs-feedback@databricks.com, and we'll take it from there. Thank you!

Hello @andrewnester! Since the CLA has been completed, is this good to be reviewed? I added a commit with a small change for a few lines that the gh linter was complaining about. Thank you!

return b
}

func TestForEachTask_InvalidRetryFields(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The test looks good overall, but generally for testing mutators, we prefer to use acceptance tests (see acceptance folder). Could you change this test to an acceptance test instead?

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the feedback. I added the acceptance tests.

Let me know if I show delete the for_each_task_test.go, I removed some of it's content. Went the unit tests route cause I saw there were some other unit tests there already but missed the acceptance part.

@github-actions
Copy link

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 4104
  • Commit SHA: a7906c2560ab88f18cb3b4abbdb357122154a482

Checks will be approved automatically on success.

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.

Validate doesn't detect issues on for_each_task

2 participants