Pipelines do not use patched wheel when dynamic artifact version is enabled
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Describe the issue
Pipeline environment dependencies do not automatically use the patched wheel when using artifacts.<name>.dynamic_version: true. This works perfectly fine for dependencies in jobs and the documentation does not mention this being a job-specific feature.
Configuration
Prerequisites
- Databricks CLI
- uv
Project structure
.
├── databricks.yml
├── pyproject.toml
└── src
├── etl
│ └── transformations
│ └── sample_transformation.py
├── notebooks
│ └── sample_notebook.ipynb
└── sample_package
└── __init__.py
Above is a basic project structure that is the basis for the configuration below.
sample_transformation.py, sample_notebook.ipynb and __init__.py can be blank files.
databricks.yml
bundle:
name: dynamic_version_test
engine: direct
artifacts:
python_artifact:
type: whl
build: uv build --wheel
dynamic_version: true
targets:
dev:
mode: development
default: true
workspace:
host: <workspace-host>
resources:
jobs:
sample_job:
name: sample_job
tasks:
- task_key: sample_task
notebook_task:
notebook_path: ./src/notebooks/sample_notebook.ipynb
environment_key: default
environments:
- environment_key: default
spec:
environment_version: "5"
dependencies:
- ./dist/*.whl
pipelines:
sample_pipeline:
name: sample_pipeline
catalog: main
schema: default
serverless: true
root_path: ./src/etl
libraries:
- glob:
include: ./src/etl/transformations/**
environment:
dependencies:
- ./dist/*.whl
pyproject.toml
[project]
name = "sample_package"
version = "0.0.1"
authors = [{ name = "[email protected]" }]
requires-python = ">=3.10,<3.13"
dependencies = []
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Steps to reproduce the behavior
- Run
databricks bundle deploy - Run
databricks bundle open sample_jobor find the job manually in the workspace - Confirm that the job's "default" environment is using a patched wheel on the format
sample_package-0.0.1+1234567890987654321-py3-none-any.whl - Run
databricks bundle open sample_pipelineor find the pipeline manually in the workspace - Confirm that the pipeline's environment is referencing a non-patched wheel on the format
sample_package-0.0.1-py3-none-any.whl
Expected Behavior
Both the job and the pipeline environments should use the same wheel with the patched name.
Actual Behavior
Only the job is using the patched wheel.
OS and CLI version
- OS: macOS
- Databricks CLI version: v0.299.2
Is this a regression?
No, I don't think so.
Debug Logs
17:03:49 Info: start pid=77713 version=0.299.2 args="databricks, bundle, deploy, -t, dev, --debug"
...
17:03:49 Debug: Apply pid=77713 mutator=ApplyArtifactsDynamicVersion
17:03:49 Debug: Apply pid=77713 mutator=artifacts.Prepare
17:03:49 Debug: artifacts block is defined, skipping auto-detecting pid=77713 mutator=artifacts.Prepare
...
17:03:49 Debug: Apply pid=77713 mutator=fast_validate(readonly)
17:03:49 Debug: ApplyParallel pid=77713 mutator=fast_validate(readonly) mutator=validate:job_cluster_key_defined
17:03:49 Debug: ApplyParallel pid=77713 mutator=fast_validate(readonly) mutator=validate:job_task_cluster_spec
17:03:49 Debug: ApplyParallel pid=77713 mutator=fast_validate(readonly) mutator=validate:artifact_paths
17:03:49 Info: Phase: build pid=77713
17:03:49 Debug: Apply pid=77713 mutator=scripts.prebuild
17:03:49 Debug: No script defined for prebuild, skipping pid=77713 mutator=scripts.prebuild
17:03:49 Debug: Apply pid=77713 mutator=artifacts.Build
Building python_artifact...
17:03:50 Debug: build output for python_artifact:
Building wheel...
Successfully built dist/sample_package-0.0.1-py3-none-any.whl
pid=77713 mutator=artifacts.Build
17:03:50 Debug: Apply pid=77713 mutator=artifacts.Build mutator=expandGlobs
17:03:50 Info: Patched wheel (built) /Users/path/to/project/dynamic_version_test/dist/sample_package-0.0.1-py3-none-any.whl -> /Users/path/to/project/dynamic_version_test/.databricks/bundle/dev/patched_wheels/python_artifact_sample_package/sample_package-0.0.1+1779289430798249639-py3-none-any.whl pid=77713 mutator=artifacts.Build
17:03:50 Debug: Patching ind=0 artifactName=python_artifact Source=/Users/path/to/project/dynamic_version_test/dist/sample_package-0.0.1-py3-none-any.whl patchedWheel=/Users/path/to/project/dynamic_version_test/.databricks/bundle/dev/patched_wheels/python_artifact_sample_package/sample_package-0.0.1+1779289430798249639-py3-none-any.whl pid=77713 mutator=artifacts.Build
17:03:50 Debug: Apply pid=77713 mutator=scripts.postbuild
17:03:50 Debug: No script defined for postbuild, skipping pid=77713 mutator=scripts.postbuild
17:03:50 Debug: Apply pid=77713 mutator=ResolveVariableReferences
17:03:50 Debug: Apply pid=77713 mutator=ResolveVariableReferences(resources)
17:03:50 Debug: Apply pid=77713 mutator=libraries.ExpandGlobReferences
17:03:50 Debug: Apply pid=77713 mutator=CheckForSameNameLibraries
17:03:50 Debug: Apply pid=77713 mutator=SwitchToPatchedWheels
17:03:50 Debug: Updating resources.jobs.sample_job.environments[0].spec.dependencies[0] from dist/sample_package-0.0.1-py3-none-any.whl to .databricks/bundle/dev/patched_wheels/python_artifact_sample_package/sample_package-0.0.1+1779289430798249639-py3-none-any.whl pid=77713 mutator=SwitchToPatchedWheels
17:03:50 Debug: Apply pid=77713 mutator=TransformWheelTask
...
17:03:51 Debug: POST /api/2.0/workspace/mkdirs
> {
> "path": "/Workspace/Users/[email protected]/.bundle/dynamic_version_test/dev/artifacts/.interna... (1 more bytes)"
> }
< HTTP/2.0 200 OK
< {} pid=77713 mutator=artifacts.CleanUp sdk=true
17:03:51 Debug: Apply pid=77713 mutator=libraries.Upload
Uploading .databricks/bundle/dev/patched_wheels/python_artifact_sample_package/sample_package-0.0.1+1779289430798249639-py3-none-any.whl...
Uploading dist/sample_package-0.0.1-py3-none-any.whl...
17:03:51 Debug: POST /api/2.0/workspace-files/import-file/Workspace/Users/[email protected]/.bundle/dynamic_version_test/dev/artifacts/.internal/sample_package-0.0.1-py3-none-any.whl?overwrite=true
> PBPsample_package/__init__.pyPBP`ث�q|'sample_p... (917 more bytes)
< HTTP/2.0 200 OK pid=77713 mutator=libraries.Upload sdk=true
17:03:51 Info: Upload succeeded pid=77713 mutator=libraries.Upload
17:03:51 Debug: POST /api/2.0/workspace-files/import-file/Workspace/Users/[email protected]/.bundle/dynamic_version_test/dev/artifacts/.internal/sample_package-0.0.1+1779289430798249639-py3-none-any.whl?overwrite=true
> BP sample_package/__init__.pyUT6^��P... (1223 more bytes)
< HTTP/2.0 200 OK pid=77713 mutator=libraries.Upload sdk=true
17:03:51 Info: Upload succeeded pid=77713 mutator=libraries.Upload
...
Deploying resources...
17:03:53 Debug: POST /api/2.2/jobs/create
> {
> "deployment": {
> "kind": "BUNDLE",
> "metadata_file_path": "/Workspace/Users/[email protected]/.bundle/dynamic_version_test/dev/state/metadata.jso... (1 more bytes)"
> },
> "edit_mode": "UI_LOCKED",
> "environments": [
> {
> "environment_key": "default",
> "spec": {
> "dependencies": [
> "/Workspace/Users/[email protected]/.bundle/dynamic_version_test/dev/artifacts/.interna... (59 more bytes)"
> ],
> "environment_version": "5"
> }
> }
> ],
> "format": "MULTI_TASK",
> "max_concurrent_runs": 4,
> "name": "[dev username] sample_job",
> "queue": {
> "enabled": true
> },
> "tags": {
> "dev": "username"
> },
> "tasks": [
> {
> "environment_key": "default",
> "notebook_task": {
> "notebook_path": "/Workspace/Users/[email protected]/.bundle/dynamic_version_test/dev/files/src/notebook... (17 more bytes)"
> },
> "task_key": "sample_task"
> }
> ]
> }
< HTTP/2.0 200 OK
< {
< "job_id": 1081705303080705
< } pid=77713 sdk=true
17:03:53 Info: Created resources.jobs.sample_job id="1081705303080705" pid=77713
17:03:54 Debug: POST /api/2.0/pipelines
> {
> "catalog": "main",
> "channel": "CURRENT",
> "deployment": {
> "kind": "BUNDLE",
> "metadata_file_path": "/Workspace/Users/[email protected]/.bundle/dynamic_version_test/dev/state/metadata.jso... (1 more bytes)"
> },
> "development": true,
> "edition": "ADVANCED",
> "environment": {
> "dependencies": [
> "/Workspace/Users/[email protected]/.bundle/dynamic_version_test/dev/artifacts/.interna... (39 more bytes)"
> ]
> },
> "libraries": [
> {
> "glob": {
> "include": "/Workspace/Users/[email protected]/.bundle/dynamic_version_test/dev/files/src/etl/tran... (14 more bytes)"
> }
> }
> ],
> "name": "[dev username] sample_pipeline",
> "root_path": "/Workspace/Users/[email protected]/.bundle/dynamic_version_test/dev/files/src/etl",
> "schema": "default",
> "serverless": true,
> "tags": {
> "dev": "username"
> }
> }
< HTTP/2.0 200 OK
< {
< "pipeline_id": "80358402-fc8a-42a6-bbde-e9686472e4b2"
< } pid=77713 sdk=true
17:03:54 Info: Created resources.pipelines.sample_pipeline id="80358402-fc8a-42a6-bbde-e9686472e4b2" pid=77713
...
Deployment complete!
- Vorherrschende Sprache
- Go
- Sterne
- 405
- Forks
- 250
- Ø Merge
- 1 T. 11 Std.
- Gemergte PRs (30 T.)
- 203
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus databricks/cli
-
Apps commands only accept relative path to app.ymlEvtl. vergeben @yuri-rod hat das vor 15 Tagen übernommen. OffenCLI
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
databricks/cli#6910 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DABs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
databricks/cli#6670 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 78/100
databricks/cli#7115 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bundle validate does not catch missing trigger.table_update.condition with multiple tablesEvtl. vergeben @yuri-rod hat das vor 1 Tag übernommen. OffenDABs Enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
databricks/cli#7101 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
databricks/cli#7100 ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
[BUG]: Windows GUI package of v1.17.0-rc3 has no GTK DLLsEvtl. vergeben @andrut-ds hat das heute übernommen. Offenbug CI/CD Pactus-GUI Windows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
pactus-project/pactus#2428 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 91/100
Maintainer antworten meist innerhalb von 1 Tag
-
feat
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
ory/hydra-maester#312 · 1 Reaktion ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
rossoctl/context-guru#610 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
Maintainer antworten meist innerhalb von 1 Tag