LOW: GetBuildDir parameter named appID but always called with app.Name #123
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
deploy.Service.GetBuildDir(appID string)is documented as taking an app ID, but all call sites passapp.Name:cloneRepository()usesfilepath.Join(svc.config.DataDir, "builds", app.Name)inlinecleanupCancelledDeploy()callssvc.GetBuildDir(app.Name)The builds directory structure uses app names, not ULIDs. If anyone calls
GetBuildDirwith an actual app ID, the path will not match.Files
internal/service/deploy/deploy.go:88- GetBuildDir definitioninternal/service/deploy/deploy.go- cloneRepository and cleanupCancelledDeployFix
Rename parameter to
appNameand update doc comment, or makecloneRepositoryuseGetBuildDirinstead of constructing the path inline.