Skip to content

Do not exit early when checking incompatible tasks #2692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 11, 2025

Conversation

andrewnester
Copy link
Contributor

Changes

Do not exit early when checking incompatible tasks

Why

This allows us to find all tasks with local libraries and old DBR versions setup and not only the first one.

Tests

Existing tests pass

Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

The new CLI release should give us an idea how many folks use this, right?

@andrewnester
Copy link
Contributor Author

@pietern it will give us metrics on how many users have this wrapper enabled but not how many saw this error

@andrewnester andrewnester requested a review from pietern April 9, 2025 15:08
if hasIncompatibleWheelTasks(ctx, b) {
return diag.Errorf("Python wheel tasks require compute with DBR 13.3+ to include local libraries. Please change your cluster configuration or use the experimental 'python_wheel_wrapper' setting. See https://docs.databricks.com/dev-tools/bundles/python-wheel.html for more information.")
diags := hasIncompatibleWheelTasks(ctx, b)
if len(diags) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

style nit: Why return a diag object instead of returning the error directory? Seems like an antipattern to add an error diag if any diags are returned by hasIncompatibleWheelTasks.

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 common pattern we do across codebase when we want to collect all diagnostics instead of returning early

Copy link
Contributor

Choose a reason for hiding this comment

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

In this case we don't have to return diags from hasIncompatibleWheelTasks, we can just return the error directly. That seems more idiomatic for Go.

@andrewnester andrewnester enabled auto-merge April 11, 2025 13:28
@andrewnester andrewnester added this pull request to the merge queue Apr 11, 2025
Merged via the queue into main with commit 0232a9a Apr 11, 2025
9 checks passed
@andrewnester andrewnester deleted the fix/check-all-tasks branch April 11, 2025 14:02
deco-sdk-tagging bot added a commit that referenced this pull request Apr 16, 2025
## Release v0.248.0

### Notable Changes
* Python for Databricks Asset Bundles is now in Public Preview. This feature extends bundles so that you can define jobs and pipelines as Python code, dynamically create jobs and pipelines using metadata, and modify jobs and pipelines defined in YAML or Python during bundle deployment. For more information and to get started see [Configuration in Python](https://docs.databricks.com/aws/en/dev-tools/bundles/python).
* Fixed a regression with pipeline library globs introduced in 0.247.0 ([#2723](#2723)). The issue caused glob patterns to fail when using paths relative to a directory that is not the bundle root.

### Dependency updates
* Upgraded Go SDK to 0.63.0 ([#2716](#2716))
* Upgraded TF provider to 1.73.0 ([#2728](#2728))

### CLI
* Added an error when invalid subcommand is provided for CLI commands ([#2655](#2655))
* Added dry-run flag support to sync command ([#2657](#2657))

### Bundles
* Do not use app config section in test templates and generated app configuration ([#2599](#2599))
* Do not exit early when checking incompatible tasks for specified DBR ([#2692](#2692))
* Removed include/exclude flags support from bundle sync command ([#2718](#2718))
* Do not clean up Python artifacts dist and build folder in "bundle validate", do it in "bundle deploy". This reverts the behaviour introduced in 0.245.0 ([#2722](#2722))

### API Changes
* Added enable-export-notebook, enable-notebook-table-clipboard and enable-results-downloading workspace-level commands.
* Removed unused `timeout` and `no-wait` flags for clusters and pipelines
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