`trigger deploy`: wrong git metadata and build context from a git worktree
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #5105 di @princejain756 — chiusa senza merge
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- git, typescript
Direzione di ricerca
Start in the trigger.dev CLI code that sets config.workspaceDir, calls createGitMeta and getOriginUrl, and creates the native build context with createContextArchive. Trace how those paths are derived for local deploys, then check the relevant CLI tests for workspace and remote metadata. Done means a deploy from a nested or external git worktree uses that worktree’s root, commit, branch, dirty status, remote URL, and build context.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version: trigger.dev CLI 4.7.7, local deploys (not GitHub Actions or the GitHub App).
config.workspaceDir comes from pkg-types findWorkspaceDir, which looks for the nearest .git/config file. A linked worktree has a .git file, not a directory, so the lookup misses it. Two things then go wrong.
1. A worktree nested inside another checkout (for example repo/.worktrees/release): workspaceDir resolves to the outer checkout.
createGitMetarunsgit logandgit statusthere, so the deployment records the outer checkout's commit, branch, and dirty flag. We saw a deploy built from a clean worktree atae22adffrecorded as23422c6f,main, dirty.- On the native build path,
createContextArchive(config.workspaceDir, …)tars the outer checkout, not the worktree being deployed.
2. A worktree outside any checkout: workspaceDir is the worktree itself, which is correct. But getOriginUrl(join(directory, ".git/config")) reads that path as a file, and in a worktree it doesn't exist. So remoteUrl is always missing. GIT_DIR and GIT_WORK_TREE don't help, because this value never goes through git.
Suggested fix: take both values from git in the project directory: git rev-parse --show-toplevel for the workspace, and git config --get remote.origin.url for the remote. That handles worktrees and respects GIT_DIR. Today we work around the first problem by exporting GIT_DIR and GIT_WORK_TREE and refusing nested-worktree deploys. The second has no workaround short of faking a .git/config.
- Lingua principale
- TypeScript
- Stelle
- 16.5k
- Fork
- 1.5k
- Merge medio
- 1g 15h
- PR unite (30g)
- 17
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di triggerdotdev/trigger.dev
-
bug: retry.fetch ignores the caller's abort signal and retries aborted requestsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
triggerdotdev/trigger.dev#5116 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug: Chat transport crashes on Safari < 17.4: AbortSignal.any is not a functionForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
triggerdotdev/trigger.dev#5098 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug: Side menu items lose their active state on detail pagesForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
triggerdotdev/trigger.dev#5088 ·
I maintainer di solito rispondono entro 1 giorno
-
bug: RBAC loader logs "plugin found but failed to load" when @triggerdotdev/plugins is simply not installedForse di nuovo libera @itsfaryal l’ha presa 17 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
triggerdotdev/trigger.dev#5083 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
triggerdotdev/trigger.dev#5072 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di triggerdotdev/trigger.dev
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug platform-android
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Termix-SSH/Mobile#146 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
devswha/herdr-web-ui#3875 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
area: runtime chore cli consistency dependencies developer-experience difficulty: easy discovery documentation enhancement good first issue help wanted hygiene json-output packaging priority: P3 tests version
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno