Repository navigation
feat(cli): send the git repositories cloned inside a project - #26
Merged
Merged
Conversation
git lists a directory with its own .git as one entry, which spawner up
skipped as a submodule: a workspace holding clones of its services sent
none of them, so a compose file building ../api passed the local check
and failed on the server (compose.path_not_found), and each clone
needed a source in spawner.yaml and a --source at every spawner up.
- Such a repository is now listed by its own git, by the same rules
(tracked files, untracked ones that are not ignored, the default
excludes, upload.include), under its path, and so are the
repositories cloned inside it. The upload limits count them all.
- Submodules that .gitmodules declares are still skipped, and so are
the other worktrees of the same repository checked out inside it
("git worktree (not sent)"); a worktree of another repository is
sent.
- The upload.include globs are rewritten for git in each cloned
repository; every path it lists is still checked against the whole
glob.
spawner up now runs git in every repository cloned inside a project, whose config could name a core.fsmonitor command that git ls-files runs. - git runs with core.fsmonitor off. - spawner up names the clones it sends in its progress line, and spawner up --json in uploads[].repositories.
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.
What and why
spawner upskipped the git repositories cloned inside a project. git lists a directory with its own.gitas one entry, andcollectFiles()took every such entry for a submodule. A workspace repository holding clones of its services (api/,web/...) therefore sent none of them: a compose file building../apipassed the local check, where the directory exists, and failed on the server withcompose.path_not_found. The way around was a source per clone inspawner.yamland a--source <name>=<dir>at everyspawner up.collectFiles()now goes down such a directory and lists it with its owngit ls-files, by the same rules (tracked files, untracked ones that are not ignored, no untrackednode_modules/,vendor/,.envor secrets,upload.include), under its path, recursively:.gitmodulesdeclares is still skipped, with the same reason, in a monorepo's directory too;.claude/worktrees/xthat is not ignored) is skipped asgit worktree (not sent), instead of sending a second copy of the project; a worktree of another repository is sent;upload.includeglobs, relative to the project, are rewritten for git in each cloned repository (globUnder), and every path git lists is still checked against the whole glob;A clone that the project's
.gitignoreignores stays home, as any ignored path. A deploy from git (--ref, a branch in the dashboard) still has only what the repository commits:docs/cli.mdsays so.Tried on a real workspace holding five clones: 1,387 files, 11 MiB, listed in 0.2 s, no
node_modules.Checks
CHANGELOG.mdupdated when the behaviour changespnpm lint,pnpm typecheckandpnpm testpass locally (CLI: 119 tests, 15 new, all failing on the previousarchive.ts). The end-to-end tests run in CI.