fix(deployments): resolve local clone credentials for Docker builds on local host - #655
Closed
chbndrhnns wants to merge 1 commit into
Closed
fix(deployments): resolve local clone credentials for Docker builds on local host#655chbndrhnns wants to merge 1 commit into
chbndrhnns wants to merge 1 commit into
Conversation
Member
|
fixed alread sorry |
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.
Summary
Fixes #654
When a Docker deployment targets the local host ("This Server" row in self-hosted mode /
platform.localHost === true),DockerRuntimeconnects over the local Unix socket (/var/run/docker.sock). Because it has no SSH executor, it cannot clone on the server and must create the build context on the API host viacreateDockerBuildContext.Previously,
resolveClonePlantreated any server deploy withserverId+repoIsGithub: trueasrunsOnServer = trueandcloneBuildStrategy = "server". When the host machine had ambientghcredentials,resolveBuildGitTokenreturned{ ambient: { via: "gh" } }without resolving a token (gitToken = undefined).DockerRuntime.buildthen fell through tocreateDockerBuildContext, which failed withfatal: Authentication failedinside the API container becausegitTokenwas undefined.Changes
clone-plan.ts:isLocalHost?: booleantoClonePlanInput.isLocalDockerBuild = !input.runtimeIsBare && (isLocalHost || (input.buildStrategy === "local" && input.cloneStrategy !== "server")).isLocalDockerBuildis true, setsrunsOnServer = false,dockerServerSide = false, andcloneBuildStrategy = "local".build-pipeline.ts: ThreadedisLocalHost: resolved.platform.localHostintoresolveClonePlan.preflight.ts: ResolvedisLocalTargetviaisLocalHostRowand passedisLocalHost: isLocalTargetintoresolveClonePlan.clone-plan.test.ts: Added reproduction test cases for Docker builds onlocalHostandbuildStrategy="local"withrepoIsGithub: true.ssh-manager.ts: Fixed relative import paths.Verification
bun x vitest run apps/api/src/modules/deployments/clone-plan.test.ts apps/api/test/modules/deployments/clone-plan.test.ts(19/19 passing)bun x vitest run apps/api/test/modules/deployments/(32/32 files, 345/345 passing)