-
Notifications
You must be signed in to change notification settings - Fork 82
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
Conversation
There was a problem hiding this 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?
@pietern it will give us metrics on how many users have this wrapper enabled but not how many saw this error |
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 { |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
## 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
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