convert-to-dabs calls tgz artifact, drop aicode mutator entirely - #6532
Merged
Merged
Conversation
… drop the aicode mutator A relative-directory code_source_path is no longer auto-packaged at bundle deploy. convert-to-dabs now emits an explicit tgz artifact for every code_source (previously only for a git/include_paths snapshot), so packaging is expressed in the generated databricks.yml rather than synthesized at deploy time. - convert-to-dabs: codeArtifactFor emits the tgz artifact for the plain whole-dir case too (path = the dir's parent, include = its basename); git / include_paths continue to map onto the artifact's git / include. - Remove bundle/config/mutator/aicode (PackageCodeSource + Validate) and its two initialize-phase wirings. - Drop the local-dir packaging acceptance tests; regenerate the convert-to-dabs golden to show the emitted artifact block. Reverts the user-facing local-dir shorthand from #6110 / #6494. Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
Integration test reportCommit: b045b7e
Top 6 slowest tests (at least 2 minutes):
|
ben-hansen-db
approved these changes
Sep 4, 2026
ben-hansen-db
left a comment
Contributor
There was a problem hiding this comment.
LGTM as a git revert
vinchenzo-db
enabled auto-merge
September 5, 2026 04:29
vinchenzo-db
disabled auto-merge
September 5, 2026 04:31
pietern
approved these changes
Sep 7, 2026
janniklasrose
pushed a commit
that referenced
this pull request
Sep 15, 2026
Basically, remove the aicode mutator entirely. That way `convert-to-dabs` just calls the `artifacts` block. Clean up the code. Reverts the user-facing local-dir shorthand from #6110 / #6494. ## Changes <!-- Brief summary of your changes that is easy to understand --> ## Why We should simplify the UJ to limit ways to upload code. ## Tests Setup ``` # v.chen at ip-10-90-19-147 in ~ (git:) [19:17:23] $ cd ~/.worktrees/cli-rm-aicode && go build -o /tmp/dbcli-rmaicode . # v.chen at ip-10-90-19-147 in ~/.worktrees/cli-rm-aicode (git:vchen/air-rm-aicode-mutator) [19:17:24] $ mkdir -p ~/air-rmaicode-e2e/src && cd ~/air-rmaicode-e2e cat > run.yaml <<'EOF' experiment_name: rmaicode-e2e command: cd "$CODE_SOURCE_PATH" && python train.py compute: accelerator_type: GPU_1xA10 num_accelerators: 1 environment: version: 5 dependencies: - numpy code_source: type: snapshot snapshot: root_path: ./src EOF cat > src/train.py <<'EOF' import os, mlflow print("hello from delivered code_source", flush=True) print("CODE_SOURCE_PATH=" + os.environ.get("CODE_SOURCE_PATH", "<unset>"), flush=True) mlflow.log_metric("ok", 1) print("done", flush=True) EOF ``` Run convert-to-dabs: ``` $ /tmp/dbcli-rmaicode experimental air convert-to-dabs run.yaml --force cat databricks.yml Wrote a Databricks Asset Bundle to .: databricks.yml generated_artifacts/training_config.yaml generated_artifacts/command.sh To deploy and run this workload as a bundle: 1. /tmp/dbcli-rmaicode bundle validate 2. /tmp/dbcli-rmaicode bundle deploy 3. /tmp/dbcli-rmaicode bundle run rmaicode-e2e --no-wait bundle deploy uploads the code source and launch scripts automatically. To see what it deployed and where: /tmp/dbcli-rmaicode bundle summary Unlike `air run` (which submits an ephemeral run), bundle deploy creates a persistent job that is not garbage-collected. When you are done, remove the job and its uploaded files with: /tmp/dbcli-rmaicode bundle destroy bundle: name: rmaicode-e2e sync: paths: - generated_artifacts artifacts: code_source: type: tgz path: . include: - src files: - source: ./dist/code_source.tgz targets: dev: mode: development default: true resources: jobs: rmaicode-e2e: name: rmaicode-e2e tasks: - task_key: rmaicode-e2e environment_key: default max_retries: 3 ai_runtime_task: experiment: rmaicode-e2e deployments: - command_path: ./generated_artifacts/command.sh compute: accelerator_type: GPU_1xA10 accelerator_count: 1 code_source_path: ./dist/code_source.tgz environments: - environment_key: default spec: environment_version: "5" dependencies: - numpy ``` Validate and deploy: ``` $ /tmp/dbcli-rmaicode bundle validate -t dev -p e2-dogfood /tmp/dbcli-rmaicode bundle deploy -t dev -p e2-dogfood Name: rmaicode-e2e Target: dev Workspace: User: v.chen@databricks.com Path: /Workspace/Users/v.chen@databricks.com/.bundle/rmaicode-e2e/dev Validation OK! Building code_source... Uploading dist/code_source.tgz... Uploading bundle files to /Workspace/Users/v.chen@databricks.com/.bundle/rmaicode-e2e/dev/files... Files: 2 uploaded, 0 deleted Resources: 0 created, 0 changed, 0 deleted, 1 unchanged ``` Run: ``` # v.chen at ip-10-90-19-147 in ~/air-rmaicode-e2e (git:) [19:20:10] $ JOBID=$(/tmp/dbcli-rmaicode bundle summary -t dev -p e2-dogfood -o json | grep -oE '"id":[^,]*' | head -1 | grep -oE '[0-9]+') /tmp/dbcli-rmaicode jobs get $JOBID -p e2-dogfood | grep -oE '"code_source_path":[^,]*' "code_source_path": "/Workspace/Users/v.chen@databricks.com/.bundle/rmaicode-e2e/dev/artifacts/.internal/code_source.tgz" # v.chen at ip-10-90-19-147 in ~/air-rmaicode-e2e (git:) [19:20:16] $ /tmp/dbcli-rmaicode bundle run rmaicode-e2e -t dev -p e2-dogfood --no-wait Run URL: https://e2-dogfood.staging.cloud.databricks.com/jobs/1103803560415808/runs/174957625358063?o=6051921418418893 ``` <img width="1517" height="698" alt="image" src="https://github.com/user-attachments/assets/bdb5ec8d-5445-4b55-9e75-a0b4db7b45b1" /> <img width="1524" height="754" alt="image" src="https://github.com/user-attachments/assets/de66dc59-ee2d-44f2-9a97-65ed1c7e3d99" /> Co-authored-by: Isaac <no-reply@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basically, remove the aicode mutator entirely. That way
convert-to-dabsjust calls theartifactsblock. Clean up the code.Reverts the user-facing local-dir shorthand from #6110 / #6494.
Changes
Why
We should simplify the UJ to limit ways to upload code.
Tests
Setup
Run convert-to-dabs:
Validate and deploy:
Run: