Repository navigation
Conversation
…king directory For a root_path outside any git repository, snapshotFiles ran git ls-files without -C, so git resolved include_paths and printed file names relative to the CLI's working directory. Run from a subdirectory of root_path, such as the workload's own directory with root_path .., the snapshot silently dropped files or packed same-named files from root_path, and could be empty. Pass -C repoPath, as the git-repository listing already does. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 1 tests: regression=1 unreleased=0 coverage=0 failing=0
TestAccept/air/run: branch ✅ | main (20fef7c) ❌ | latest (v1.26.0) ❌main (20fef7c): latest (v1.26.0): |
Collaborator
✅ Integration test reportCommit: 506378e
Top 3 slowest tests (at least 2 minutes):
|
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 runlists the files of acode_source.root_paththat isn't in a git repository by runninggit ls-filesagainst a temporary git directory. That call now passes-C <root_path>, as the call for git repositories already does, so the listing no longer depends on the directory the CLI runs from.Follow-up to #7643, which notes this in its description. The two changes are independent and can merge in either order.
Why
Without
-C, git resolvesinclude_pathsand prints file names relative to the working directory. Run from a subdirectory ofroot_path, for example the workload's own directory withroot_path: .., the snapshot silently drops files or packs a same-named file fromroot_pathinstead:include_paths: [ray_bootstrap.sh, train], run fromtrain/, v1.26.0 uploads an empty snapshot. The run then fails on the node withCould not determine top-level component from tarball. Onmain, the empty-snapshot check rejects the upload instead, with an error that names paths that exist.include_paths, run fromtrain/, onlytrain/'s files are listed, and each is read fromroot_path: the snapshot holds the root'sREADME.mdinstead oftrain/README.md.This affects copies of a project that aren't git checkouts, such as a downloaded archive of the AI Runtime cookbook, whose getting-started Ray recipes use
root_path: ..and are run from their own directories. Git checkouts already list relative toroot_path.Tests
TestSnapshotFiles_NonGitRootFromSubdirectoryruns fromroot/sub, wheresub/main.pyshadowsmain.py. Withinclude_paths: [main.py, data]it now selectsdata/x.csvandmain.py(before:main.pyonly); withoutinclude_pathsit selects all three files (before:main.pyonly).acceptance/air/runadds a dry run from a subdirectory of a non-gitroot_path, which reports 2 files (before: 1).go test ./cmd/air/...andgo test ./acceptance -run TestAccept/airpass, andgolangci-lintreports no issues oncmd/air.TestLogsCommandRepeatsRunLinkAfterStreamingneedsDATABRICKS_WORKSPACE_IDunset locally, as onmain.This pull request and its description were written by Isaac.