Skip to content

[AIR] CNXT-2686: warn when a pushed image sets WORKDIR - #7867

Merged
vinchenzo-db merged 11 commits into
mainfrom
vinchenzo-db/cnxt-2686
Nov 24, 2026
Merged

vinchenzo-db merged 11 commits into
mainfrom
vinchenzo-db/cnxt-2686

Conversation

@vinchenzo-db

@vinchenzo-db vinchenzo-db commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Changes

databricks air images push now reads Config.WorkingDir from the existing docker image inspect call (combined format string). When it is set to anything other than /, it prints a warning that the source image sets WORKDIR, that commands and scripts should use absolute paths, and links the public AI Runtime command docs (AWS and Azure) for how command paths work. The warning makes no claim about how AI Runtime treats WORKDIR, because the backend owns that behavior and can change it without a CLI release; the docs carry the reason. The push itself is unchanged: the warning is informational and never blocks.

Why

In the CUJ PE64 runthrough (Jira CNXT-2686), an image whose scripts relied on relative paths from its WORKDIR worked under docker run but failed on AI Runtime with file-not-found errors. Neither air images push nor air run mentioned this, so users only found out from a failed run.

Push time is the earliest point where the CLI sees the image config, and the check reuses the inspect call the platform check already makes, so there is no extra Docker invocation. No public docs page covers the runtime working directory specifically, so the warning links the command section of the AI Runtime YAML config reference instead.

The warning is advisory, so it skips images with no WORKDIR or WORKDIR / (Docker's default), where relative paths don't depend on a directory the image chose. It lives in images push because that is where the CLI already inspects the image config. air run only gets the image name, so checking there would add a registry lookup. The inspect format reads WORKDIR through {{with .Config}}, so an image with no config still pushes.

Hard-coded values

~/loop/bin/cli-check flags one line: the existing AIR requires linux/amd64 platform error in cmd/air/image.go. It is already on main; this PR only moves it, because the inspect call now returns the platform and WORKDIR together.

The warning also hard-codes two docs URLs, the AWS and Azure yaml-config#command pages (the same links cli#7865 adds, repeated here because #7865 isn't merged). They are CLI-owned docs pointers, like the docker-images links in this command's help text, not backend rules. No backend rule is hard-coded.

Tests

  • Acceptance test acceptance/air/image-push covers all three cases through its fake docker: no WORKDIR (default mode, no warning), WORKDIR / (workdir-root mode, no warning) and WORKDIR /app (workdir mode, warning while the push proceeds). Golden output regenerated.
  • TestRunImagePushTagsAndPushesLocalImage asserts the combined inspect format.
  • go test ./acceptance -run TestAccept/air/image-push, task lint-q and task check-changelog pass locally.

This pull request and its description were written by Isaac.

AI Runtime does not honor the Docker WORKDIR directive, so commands that
rely on relative paths fail at runtime with file-not-found errors, and
nothing warned at push time. `air images push` now inspects the source
image's Config.WorkingDir and prints a warning telling the user to use
absolute paths. The push itself is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
@vinchenzo-db
vinchenzo-db requested review from a team as code owners November 21, 2026 04:11
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the AIR Databricks AI Runtime CLI label Nov 21, 2026
@vinchenzo-db

Copy link
Copy Markdown
Contributor Author

/review

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at 3031cd9. Each finding was verified against the code.

Not ready yet: 1 blocking issue(s), tagged [blocking].

This PR adds a WORKDIR warning to databricks air images push by inspecting the image config after the platform check. Two issues stand out: the "warning" can actually abort the push when the inspect subprocess fails, contradicting the stated non-blocking intent; and images that set WORKDIR / (effectively the default) trigger a misleading warning about relative paths.

Comment thread cmd/air/image.go Resolved
Comment thread cmd/air/image.go Resolved
An inspect failure now logs a warning instead of aborting, and WORKDIR /
(the Docker default) no longer triggers the warning.

Co-authored-by: Isaac <no-reply@databricks.com>
@vinchenzo-db

Copy link
Copy Markdown
Contributor Author

/review

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at 42e16c3. Each finding was verified against the code.

No blocking issues found. 1 non-blocking comment(s) below.

This PR adds an informational WORKDIR warning to databricks air images push by inspecting the image config after the platform check. The implementation is correct and well-tested, but the new check spawns a second docker image inspect subprocess on the same image that was just inspected, when a single call with a combined format string would suffice.

Comment thread cmd/air/image.go Resolved
Co-authored-by: Isaac <no-reply@databricks.com>
@vinchenzo-db

Copy link
Copy Markdown
Contributor Author

/review

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at d48fc7f. Each finding was verified against the code.

No blocking issues found.

This PR adds a WORKDIR warning to databricks air images push by extending the existing docker image inspect format string to also retrieve Config.WorkingDir, then printing an informational warning when a non-trivial WORKDIR is set. The change is small, well-scoped, and covered by new and updated unit tests. No correctness issues survive verification.

Co-authored-by: Isaac <no-reply@databricks.com>
@vinchenzo-db

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 3ff28d1c1 | Workflow run

Regression test report

Selected 1 changed tests (limit=20, 0 not selected)

1 tests: regression=1 unreleased=0 coverage=0 failing=0
test branch main (b0fd4e6) latest (v1.28.0)
TestAccept/air/image-push ✅ ❌ ❌
TestAccept/air/image-push: branch ✅ | main (b0fd4e6) ❌ | latest (v1.28.0) ❌

main (b0fd4e6):

acceptance_test.go:1402: Diff:
        --- air/image-push/output.txt
        +++ /tmp/TestAcceptairimage-push2193821929/002/output.txt
        @@ -8,273 +8,6 @@
         Updated Docker config: [TEST_TMP_DIR]/home/docker/config.json
         Installed Docker credential helper: [TEST_TMP_DIR]/home/bin/docker-credential-databricks
         Using local source image nvidia/cuda:13.4.1
        -Tagging image as [WORKSPACE_ID].container.us-west-2.localhost/my-catalog.my-schema.cuda:13.4.1-cudnn-devel-ubuntu26.04
        -Pushing image to [WORKSPACE_ID].container.us-west-2.localhost/my-catalog.my-schema.cuda:13.4.1-cudnn-devel-ubuntu26.04
        -Docker push progress
        -Pushed image.
        -Now you can set `environment.unity_catalog_image = my-catalog.my-schema.cuda:13.4.1-cudnn-devel-ubuntu26.04` in your YAML config and create a workload with `databricks air run -f config.yaml`.
        +Error: source image nvidia/cuda:13.4.1 has platform "linux/amd64|"; AIR requires linux/amd64: use --pull to fetch a compatible image, or rebuild the source for linux/amd64
         
        -=== inferred region and workspace ID requests
        -
        ->>> print_requests.py --get //api
        -{
        -  "method": "GET",
        -  "path": "/api/2.0/preview/scim/v2/Me",
        -  "q": {
        -    "excludedAttributes": "entitlements"
        -  }
        -}
        -{
        -  "method": "GET",
        -  "path": "/api/2.1/unity-catalog/metastore_summary"
        -}
        -
        -=== docker commands
        -image ls --quiet nvidia/cuda:13.4.1
        -image inspect --format {{.Os}}/{{.Architecture}}|{{with .Config}}{{.WorkingDir}}{{end}} nvidia/cuda:13.4.1
        -tag nvidia/cuda:13.4.1 [WORKSPACE_ID].container.us-west-2.localhost/my-catalog.my-schema.cuda:13.4.1-cudnn-devel-ubuntu26.04
        -push [WORKSPACE_ID].container.us-west-2.localhost/my-catalog.my-schema.cuda:13.4.1-cudnn-devel-ubuntu26.04
        -
        -=== missing image is pulled for AIR; destination defaults to source
        -
        ->>> databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training
        -Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features.
        -Pushing example/image:v1 as main.training.image:v1 using profile docker-test
        -Configured Docker credential helper for [WORKSPACE_ID].container.us-west-2.localhost
        -Updated Docker config: [TEST_TMP_DIR]/home/docker/config.json
        -Installed Docker credential helper: [TEST_TMP_DIR]/home/bin/docker-credential-databricks
        -Pulling source image example/image:v1 for linux/amd64
        -Docker pull progress
        -Tagging image as [WORKSPACE_ID].container.us-west-2.localhost/main.training.image:v1
        -Pushing image to [WORKSPACE_ID].container.us-west-2.localhost/main.training.image:v1
        -Docker push progress
        -Pushed image.
        -Now you can set `environment.unity_catalog_image = main.training.image:v1` in your YAML config and create a workload with `databricks air run -f config.yaml`.
        -
        -=== forced pull and JSON output
        -
        ->>> databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training --pull -o json
        -Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features.
        -Pushing example/image:v1 as main.training.image:v1 using profile docker-test
        -Configured Docker credential helper for [WORKSPACE_ID].container.us-west-2.localhost
        -Updated Docker config: [TEST_TMP_DIR]/home/docker/config.json
        -Installed Docker credential helper: [TEST_TMP_DIR]/home/bin/docker-credential-databricks
        -Pulling source image example/image:v1 for linux/amd64
        -Docker pull progress
        -Tagging image as [WORKSPACE_ID].container.us-west-2.localhost/main.training.image:v1
        -Pushing image to [WORKSPACE_ID].container.us-west-2.localhost/main.training.image:v1
        -Docker push progress
        -Pushed image.
        -
        ->>> jq -e {v, data} [TEST_TMP_DIR]/home/result.json
        -{
        -  "v": 1,
        -  "data": {
        -    "unity_catalog_image": "main.training.image:v1",
        -    "registry_image": "[WORKSPACE_ID].container.us-west-2.localhost/main.training.image:v1"
        -  }
        -}
        -
        -=== image with WORKDIR warns but is pushed
        -
        ->>> databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training
        -Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features.
        -Pushing example/image:v1 as main.training.image:v1 using profile docker-test
        -Configured Docker credential helper for [WORKSPACE_ID].container.us-west-2.localhost
        -Updated Docker config: [TEST_TMP_DIR]/home/docker/config.json
        -Installed Docker credential helper: [TEST_TMP_DIR]/home/bin/docker-credential-databricks
        -Using local source image example/image:v1
        -Warning: source image example/image:v1 sets WORKDIR /app. Use absolute paths in your command and scripts. See how AI Runtime command paths work:
        -  AWS: https://docs.databricks.com/aws/en/machine-learning/ai-runtime/connecting/cli/yaml-config#command
        -  Azure: https://learn.microsoft.com/azure/databricks/machine-learning/ai-runtime/connecting/cli/yaml-config#command
        -Tagging image as [WORKSPACE_ID].container.us-west-2.localhost/main.training.image:v1
        -Pushing image to [WORKSPACE_ID].container.us-west-2.localhost/main.training.image:v1
        -Docker push progress
        -Pushed image.
        -Now you can set `environment.unity_catalog_image = main.training.image:v1` in your YAML config and create a workload with `databricks air run -f config.yaml`.
        -
        -=== image with WORKDIR / does not warn
        -
        ->>> databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training
        -Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features.
        -Pushing example/image:v1 as main.training.image:v1 using profile docker-test
        -Configured Docker credential helper for [WORKSPACE_ID].container.us-west-2.localhost
        -Updated Docker config: [TEST_TMP_DIR]/home/docker/config.json
        -Installed Docker credential helper: [TEST_TMP_DIR]/home/bin/docker-credential-databricks
        -Using local source image example/image:v1
        -Tagging image as [WORKSPACE_ID].container.us-west-2.localhost/main.training.image:v1
        -Pushing image to [WORKSPACE_ID].container.us-west-2.localhost/main.training.image:v1
        -Docker push progress
        -Pushed image.
        -Now you can set `environment.unity_catalog_image = main.training.image:v1` in your YAML config and create a workload with `databricks air run -f config.yaml`.
        -
        -=== daemon failure must not pull
        -
        ->>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training
        -Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features.
        -Pushing example/image:v1 as main.training.image:v1 using profile docker-test
        -Configured Docker credential helper for [WORKSPACE_ID].container.us-west-2.localhost
        -Updated Docker config: [TEST_TMP_DIR]/home/docker/config.json
        -Installed Docker credential helper: [TEST_TMP_DIR]/home/bin/docker-credential-databricks
        -Cannot connect to the Docker daemon
        -Error: check local source image example/image:v1 (ensure Docker is running and accessible): exit status 1
        -
        -=== inspect failure must not pull
        -
        ->>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training
        -Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features.
        -Pushing example/image:v1 as main.training.image:v1 using profile docker-test
        -Configured Docker credential helper for [WORKSPACE_ID].container.us-west-2.localhost
        -Updated Docker config: [TEST_TMP_DIR]/home/docker/config.json
        -Installed Docker credential helper: [TEST_TMP_DIR]/home/bin/docker-credential-databricks
        -Using local source image example/image:v1
        -Docker inspect failed
        -Error: inspect source image example/image:v1: exit status 1
        -
        -=== incompatible local image must not be pushed
        -
        ->>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training
        -Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features.
        -Pushing example/image:v1 as main.training.image:v1 using profile docker-test
        -Configured Docker credential helper for [WORKSPACE_ID].container.us-west-2.localhost
        -Updated Docker config: [TEST_TMP_DIR]/home/docker/config.json
        -Installed Docker credential helper: [TEST_TMP_DIR]/home/bin/docker-credential-databricks
        -Using local source image example/image:v1
        -Error: source image example/image:v1 has platform "linux/arm64"; AIR requires linux/amd64: use --pull to fetch a compatible image, or rebuild the source for linux/amd64
        -
        -=== incompatible pulled image must not be pushed
        -
        ->>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training --pull
        -Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features.
        -Pushing example/image:v1 as main.training.image:v1 using profile docker-test
        -Configured Docker credential helper for [WORKSPACE_ID].container.us-west-2.localhost
        -Updated Docker config: [TEST_TMP_DIR]/home/docker/config.json
        -Installed Docker credential helper: [TEST_TMP_DIR]/home/bin/docker-credential-databricks
        -Pulling source image example/image:v1 for linux/amd64
        -Docker pull progress
        -Error: source image example/image:v1 has platform "linux/arm64"; AIR requires linux/amd64: use --pull to fetch a compatible image, or rebuild the source for linux/amd64
        -
        -=== pull failure must not be pushed
        -
        ->>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training --pull
        -Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features.
        -Pushing example/image:v1 as main.training.image:v1 using profile docker-test
        -Configured Docker credential helper for [WORKSPACE_ID].container.us-west-2.localhost
        -Updated Docker config: [TEST_TMP_DIR]/home/docker/config.json
        -Installed Docker credential helper: [TEST_TMP_DIR]/home/bin/docker-credential-databricks
        -Pulling source image example/image:v1 for linux/amd64
        -Docker pull failed
        -Error: pull source image example/image:v1: exit status 1
        -
        -=== invalid destination and removed flags
        -
        ->>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema training --artifact invalid.name
        -Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features.
        -Error: invalid artifact name "invalid.name": use lowercase letters and digits separated by one or two underscores or one or more hyphens
        -
        ->>> musterr databricks air images push -p docker-test -s example/image:v1 --catalog main --schema team_-training
        -Warning: This feature is in Preview. APIs may change, and the workspace must enable the Preview features.
        -Error: invalid schema "team_-training": use lowercase letters and digits separated by one or two underscores or one or more hyphens
        -
        ->>> musterr databricks air images push --region us-west-2
        -Error: unknown flag: --region
        -
        -Usage:
        -  databricks air images push [flags]
        -
        -Flags:
        -      --artifact string     Destination ARTIFACT[:TAG]; defaults to the source image name and tag (latest if untagged); maximum 255 characters for catalog.schema.artifact and 128 for the tag
        -      --catalog string      Destination Unity Catalog catalog; use lowercase letters and digits separated by one or two underscores or one or more hyphens
        -  -h, --help[=true|false]   help for push
        -      --pull[=true|false]   Pull the source image even when it is already available locally
        -      --schema string       Destination Unity Catalog schema; use lowercase letters and digits separated by one or two underscores or one or more hyphens
        -  -s, --source string       Source container image to push (NAME[:TAG] or NAME@DIGEST)
        -
        -Global Flags:
        -      --debug[=true|false]   enable debug logging
        -  -o, --output type          output type: text or json (default text)
        -  -p, --profile string       ~/.databrickscfg profile
        -  -t, --target string        bundle target to use (if applicable)
        -
        -
        ->>> musterr databricks air images push --image artifact
        -Error: unknown flag: --image
        -
... (81 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.28.0): same output as main (b0fd4e6)

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at 0f620d5. Each finding was verified against the code.

No blocking issues found.

This PR adds an informational warning to databricks air images push when the source image sets a non-default WORKDIR, since AI Runtime ignores it at runtime. The implementation correctly extends the existing docker image inspect format string with a pipe-delimited field and parses it with strings.Cut on the first |. The warning condition (workingDir != "" && workingDir != "/") is sound, the comment on line 209 explains the rationale, and the unit and acceptance tests cover the key cases (unset, /, /app). No correctness issues found.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 3ff28d1

Run: 45488539306

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 272 20 4:57
💚​ aws-windows-latest-4core-16gb 1 274 18 4:00
💚​ azure linux-2core-8gb 1 271 20 4:26
💚​ azure-windows-latest-4core-16gb 1 273 18 3:35
💚​ gcp linux-2core-8gb 1 272 20 5:23
💚​ gcp-windows-latest-4core-16gb 1 274 18 3:48
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:02 gcp linux-2core-8gb TestAccept
3:57 aws-windows-latest-4core-16gb TestAccept
3:46 gcp-windows-latest-4core-16gb TestAccept
3:38 aws linux-2core-8gb TestAccept
3:33 azure-windows-latest-4core-16gb TestAccept
3:23 azure linux-2core-8gb TestAccept

The CLI shouldn't state how AI Runtime behaves, since the backend can
change that. Say the image sets WORKDIR and that commands should use
absolute paths.

Co-authored-by: Isaac <no-reply@databricks.com>
@vinchenzo-db

Copy link
Copy Markdown
Contributor Author

/review

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at ec6a35c. Each finding was verified against the code.

No blocking issues found. 2 non-blocking comment(s) below.

This PR makes databricks air images push read Config.WorkingDir from the existing docker image inspect call and print an informational warning when the source image sets a WORKDIR other than /. The push still goes through. The parsing and platform check look correct: the format string always includes |, so strings.Cut splits reliably, and the platform error behaves as before. I have two small points: the new unit test mostly repeats the acceptance coverage, and the comment above the skip condition says more than the code knows.

Comment thread cmd/air/image_test.go Resolved
Comment thread cmd/air/image.go Resolved
The acceptance test now runs the unset, / and /app cases, so the unit
test only repeated it. Reword the skip comment to say what is decided
without describing AI Runtime.

Co-authored-by: Isaac <no-reply@databricks.com>
@vinchenzo-db

Copy link
Copy Markdown
Contributor Author

/review

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at 679fc58. Each finding was verified against the code.

No blocking issues found. 2 non-blocking comment(s) and 1 question(s) below.

This PR has air images push read Config.WorkingDir from the same docker image inspect call it already makes for the platform check, and print a warning when it is set to anything other than /. The push itself is otherwise unchanged. I found one real issue: the new template field can make the inspect call fail for images with no config, which turns an advisory warning into a failed push. There is also a small mismatch in the changelog wording.

Questions

  1. The warning skips images with no WORKDIR or WORKDIR /. The comment at cmd/air/image.go:209 justifies that by how docker run behaves, yet the description says the CLI doesn't know which directory AI Runtime starts in. It also fires for images whose commands use only absolute paths. Should the skip state its assumption about AI Runtime explicitly, or warn in every case? Or would the check fit better in air run, next to missingTorchWarning, where the configured command and launch paths are known and the warning could fire only for relative paths? (non-blocking)

Comment thread cmd/air/image.go Resolved
Read WORKDIR through {{with .Config}} so an image without a config
inspects cleanly instead of failing the push, and say in the changelog
that WORKDIR / doesn't warn.

Co-authored-by: Isaac <no-reply@databricks.com>
@vinchenzo-db

Copy link
Copy Markdown
Contributor Author

/review

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at cd68335. Each finding was verified against the code.

No blocking issues found. 3 non-blocking comment(s) below.

This PR changes databricks air images push to read Config.WorkingDir in the same docker image inspect call as the platform check, and to print an advisory when the image sets a WORKDIR other than /. I traced the strings.Cut split for an unset WORKDIR, for /, for /app and for a nil Config. The platform check still rejects the same inputs it did before, and the acceptance test covers all three WORKDIR cases. What's left is wording: the warning, the comment above it and the changelog entry.

Comment thread cmd/air/image.go Resolved
Comment thread cmd/air/image.go Resolved
Say that relative paths depend on the working directory, without
describing where AI Runtime starts commands, and tighten the comment
and changelog wording.

Co-authored-by: Isaac <no-reply@databricks.com>
@vinchenzo-db

Copy link
Copy Markdown
Contributor Author

/review

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at c2b858c. Each finding was verified against the code.

No blocking issues found. 1 non-blocking comment(s) below.

This PR changes air images push to read Config.WorkingDir from the existing docker image inspect call and print an advisory when the image sets a WORKDIR other than /. The push itself is unchanged. The combined-format parsing is correct: the platform check is preserved, and the WORKDIR / and unset cases are covered by acceptance tests. One wording issue remains: the warning doesn't tell users why their paths might break.

Comment thread cmd/air/image.go Resolved
Explain that relative paths only resolve against WORKDIR when the
command runs from it, without saying where AI Runtime runs commands.

Co-authored-by: Isaac <no-reply@databricks.com>
@vinchenzo-db

Copy link
Copy Markdown
Contributor Author

/review

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at ce2b896. Each finding was verified against the code.

No blocking issues found. 2 non-blocking comment(s) below.

This PR makes air images push read Config.WorkingDir from the existing docker image inspect call and print an advisory warning when the image sets a WORKDIR other than /. The parsing and platform gate are fine: the format always emits the |, and the platform comparison works the same as before. Two small things remain: the warning text doesn't tell users why they should switch to absolute paths, and the {{with .Config}} guard has no comment explaining why it's there.

Comment thread cmd/air/image.go Resolved
Comment thread cmd/air/image.go Resolved
Give the reason through the public docs instead of describing the
runtime, and comment why the inspect format guards .Config.

Co-authored-by: Isaac <no-reply@databricks.com>
@vinchenzo-db

Copy link
Copy Markdown
Contributor Author

/review

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review at 3ff28d1. Each finding was verified against the code.

No blocking issues found.

This PR makes databricks air images push read Config.WorkingDir from the docker image inspect call it already runs. When the source image sets a WORKDIR other than /, it prints a warning with links to the AI Runtime command docs, and the push still goes ahead. The combined format string is parsed correctly for real Docker output. The platform check and its error are unchanged, and the acceptance test covers no WORKDIR, WORKDIR / and WORKDIR /app. I found no defect that should block the merge.

@vinchenzo-db
vinchenzo-db added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit c639f9d Nov 24, 2026
28 checks passed
@vinchenzo-db
vinchenzo-db deleted the vinchenzo-db/cnxt-2686 branch November 24, 2026 21:42
vinchenzo-db added a commit that referenced this pull request Nov 24, 2026
Resolve conflicts with the WORKDIR warning from #7867: one docker image
inspect call now returns the platform, the size and the working
directory, so the size line and the WORKDIR warning both print. The
image-push acceptance output is regenerated.

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIR Databricks AI Runtime CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants