Repository navigation
Conversation
…ide the bundle When code_source.root_path resolved outside the bundle directory, for example the getting-started Ray recipes that snapshot their parent directory with root_path: .., convert-to-dabs suggested setting sync.paths in a databricks.yml that it had not written. The error now names the resolved code directory and, for working-tree snapshots, the --output-dir value that converts the workload. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Sibling workloads that snapshot the same parent directory were all sent to it, so converting a second one there replaced the first bundle once the user passed --force. The hint now says when that directory already holds a databricks.yml instead of offering it, quotes the suggested path for the shell, and states the actual limit: the bundle convert-to-dabs writes packages only code inside its directory. The tests assert the full remedy text. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: 025d2ab
Top 3 slowest tests (at least 2 minutes):
|
…ry bundle file name - Move quoteArg from cmd/aitools to libs/shellquote as Arg, unchanged apart from the name, and use it for the suggested --output-dir. Bash quoting broke a pasted cmd.exe command on Windows; a path that no quoting keeps literal, such as one with a control character, gets generic wording. - Treat a parent holding any bundle file DABs accepts (databricks.yml, databricks.yaml, bundle.yml, bundle.yaml) as already holding a bundle. - Test a parent whose path has a space, and each bundle file name. Co-authored-by: Isaac <no-reply@databricks.com>
This branch has not been deployed
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.
Changes
air convert-to-dabs: whencode_source.root_pathresolves outside the bundle directory, the error names the resolved code directory and, for working-tree snapshots, the--output-dirthat converts the workload: the code directory's parent, quoted for the user's shell (cmd.exe or PowerShell on Windows, a POSIX shell elsewhere). It no longer suggests settingsync.pathsin adatabricks.ymlit has not written.databricks.yml,databricks.yaml,bundle.ymlorbundle.yaml), the error says so instead of suggesting it. Sibling workloads that share a code directory would otherwise each be sent there and replace one another's bundle.quoteArgmoves fromcmd/aitoolstolibs/shellquoteasArg, unchanged apart from the name, so both commands quote printed paths the same way.Why
The getting-started Ray recipes in the AI Runtime cookbook snapshot their parent directory (
root_path: ..) to include a shared bootstrap. Runningconvert-to-dabs workload.yamlfrom a recipe directory failed with advice to setsync.pathsin adatabricks.ymlthe command had not written; the conversion works with--output-dir ../.., which no message mentioned. Four recipes share that parent, so the hint must not steer a second conversion into the first one's bundle.Replaces #7640, opened from a fork where CI could not get its OIDC token.
Tests
TestConvertToDabsCodeOutsideBundleSuggestsOutputDir: the error names the resolved code directory,--output-dir <parent>and the fallback, notsync.paths; converting with that directory succeeds with the expected artifactpathandinclude.TestConvertToDabsCodeOutsideBundleSkipsParentWithBundle: for each bundle file name, the error says the parent holds a bundle and does not suggest it.TestConvertToDabsCodeOutsideBundleQuotesOutputDir: a parent path with a space is quoted for the platform's shell.TestConvertToDabsGitPinOutsideBundleDoesNotSuggestOutputDir: git-pinned snapshots get only the move-the-code remedy.TestArgcovers the moved helper.go test ./cmd/air/... ./libs/shellquote/...,go test ./acceptance -run TestAccept/air, and./task test-exp-aitoolspass, andgolangci-lint runreports no issues on the changed packages.--force, and--forcestill replaces a bundle with a differentbundle.name. Both belong to a follow-up that compares bundle names.This pull request and its description were written by Isaac.