Repository navigation
[air] Package code_source without git on PATH - #7625
Open
stevenchen-db wants to merge 2 commits into
Open
stevenchen-db wants to merge 2 commits into
stevenchen-db wants to merge 2 commits into
Conversation
`air run` packaged every code_source with the git binary, so a host without git failed with a raw exec error. A directory outside any repository now packages without git: files come from libs/git's ignore rules, regular files and symlinks are listed (symlinks not followed), and a nested repository is one "dir/" entry. With git on PATH the git listing is unchanged. Known differences of the git-free listing, only used without git: - Rule precedence: the first matching rule from the root down wins, so a root "*.log" excludes nested/keep.log even with "!keep.log" in nested/.gitignore. - include_paths globs use path.Match, where "*" does not cross "/". A code_source inside a repository, or pinned with code_source.git, still needs git. Without it, `air run` fails before config validation and packaging with an actionable error. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: f74898f
Top 4 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
databricks air runno longer needsgiton PATH to package acode_sourcedirectory that isn't in a git repository.libs/git's ignore rules (root and nested.gitignore,info/exclude,core.excludesFile). Symlinks are listed, not followed; a nested repository is one entry, as with git.code_source.gitset, no git: fails before validation, packaging, or any API call, with an actionable error.Known differences of the git-free listing (only used without git; pinned by tests): a root rule wins over a nested negation (
*.logat the root excludesnested/keep.logeven with!keep.loginnested/.gitignore), andinclude_pathsglobs usepath.Match, where*doesn't cross/.Why
Hosts without git (containers, CI images, agent sandboxes) couldn't use
code_sourceat all, though git is only needed for its ignore rules outside a repository. The quickstart lists git as a requirement; a docs follow-up can narrow that to code inside a git repository.No Jira ticket.
Tests
git ls-filesfor whole trees, directory and fileinclude_paths, nested.gitignore, negation, ignored dirs, dotfiles and symlinks; nested repo as one entry; the two known differences; the early error for in-repo and pinned code (with an injected git lookup, also asserting no lookup withoutcode_source).code_sourcerun succeeded and printed its output (run 892749685192587); the in-repo case failed with 0 API calls; a workload withoutcode_sourceis unchanged. With git on PATH, the dry-run file count and request list match main.TestAccept/air/20/20, lint clean,./task checkspasses.TestLogsCommandRepeatsRunLinkAfterStreamingfails the same way on main and is unrelated.This pull request and its description were written by Isaac.