Skip to content

Fix default-python template not to add environments when serverless=yes and include_python=no#2866

Merged
denik merged 5 commits intomainfrom
denik/serverless-remove-environments
May 13, 2025
Merged

Fix default-python template not to add environments when serverless=yes and include_python=no#2866
denik merged 5 commits intomainfrom
denik/serverless-remove-environments

Conversation

@denik
Copy link
Copy Markdown
Contributor

@denik denik commented May 13, 2025

Changes

Do not add environments section in default-python templates if there is no python_wheel_task section.

Why

Since it's python_wheel_task that triggers implicit artifact and wheel creation, environment fails with the error when resolving ./dist/*.whl pattern.

Tests

New acceptance test that extensively deploys all possible combinations of default-python template. On main branch this test fails for combinations with serverless=yes include_python=no.


### Bundles
* Removed unused fields from resources.models schema: creation\_timestamp, last\_updated\_timestamp, latest\_versions and user\_id. Using them now raises a warning.
* Fixed default-python template for case when serverless=yes and include\_python=no. ([#2866](https://github.com/databricks/cli/pull/2866))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Fixed default-python template for case when serverless=yes and include\_python=no. ([#2866](https://github.com/databricks/cli/pull/2866))
* Do not add environments section in default-python templates if there is no python_wheel_task section ([#2866](https://github.com/databricks/cli/pull/2866))

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.

I prefer original - it tells users what feature is broken(default template with serverless=yes & include_python=no). The stuff about environments and python_wheel_task is impl details.

@denik denik force-pushed the denik/serverless-remove-environments branch from c3d469f to 6d45a30 Compare May 13, 2025 14:48
@denik denik temporarily deployed to test-trigger-is May 13, 2025 14:48 — with GitHub Actions Inactive
@denik denik changed the title default-python/serverless: do not add environments if there is no python_wheel_task: Fix default-python template for case when serverless=yes and include_python=no May 13, 2025
@denik denik temporarily deployed to test-trigger-is May 13, 2025 14:53 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is May 13, 2025 14:53 — with GitHub Actions Inactive
@denik denik changed the title Fix default-python template for case when serverless=yes and include_python=no Fix default-python template not to add environments when serverless=yes and include_python=no May 13, 2025
@denik denik temporarily deployed to test-trigger-is May 13, 2025 14:54 — with GitHub Actions Inactive
@denik denik enabled auto-merge May 13, 2025 14:55
@denik denik temporarily deployed to test-trigger-is May 13, 2025 15:05 — with GitHub Actions Inactive
@denik denik disabled auto-merge May 13, 2025 15:20
@denik denik merged commit 59ebbcb into main May 13, 2025
8 of 10 checks passed
@denik denik deleted the denik/serverless-remove-environments branch May 13, 2025 15:20
anton-107 pushed a commit that referenced this pull request May 14, 2025
…es and include_python=no (#2866)

## Changes
Do not add environments section in default-python templates if there is
no python_wheel_task section.

## Why
Since it's python_wheel_task that triggers implicit artifact and wheel
creation, environment fails with the error when resolving `./dist/*.whl`
pattern.

## Tests
New acceptance test that extensively deploys all possible combinations
of default-python template. On main branch this test fails for
combinations with serverless=yes include_python=no.
deco-sdk-tagging bot added a commit that referenced this pull request May 14, 2025
## Release v0.252.0

### Dependency updates
* Upgraded Go SDK to 0.69.0 ([#2867](#2867))
* Upgraded to TF provider 1.79.0 ([#2869](#2869))

### Bundles
* Remove unused fields from resources.models schema: creation\_timestamp, last\_updated\_timestamp, latest\_versions and user\_id. Using them now raises a warning ([#2828](#2828)).
* Preserve folder structure for app source code in bundle generate ([#2848](#2848))
* Fix normalising requirements file path in dependencies section ([#2861](#2861))
* Fix default-python template not to add environments when serverless=yes and include\_python=no ([#2866](#2866))
* Fix handling of Unicode characters in Python support ([#2873](#2873))
* Add support for secret scopes in DABs ([#2744](#2744))
* Make `artifacts.*.type` optional in bundle JSON schema ([#2881](#2881))
* Fix support for `spot_bid_max_price` field in Python support ([#2883](#2883))
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