Repository navigation
Conversation
filippomc
approved these changes
Nov 10, 2026
Collaborator
|
@copilot fix conflicts |
Co-authored-by: filippomc <46561561+filippomc@users.noreply.github.com>
Co-authored-by: filippomc <46561561+filippomc@users.noreply.github.com>
aranega
force-pushed
the
fix/imgname-space
branch
from
November 10, 2026 18:41
60bdc94 to
6426944
Compare
Member
Author
|
Thanks for catching this @filippo! The issue came from the build context for apps with a nested Dockerfile. The generator was resolving to the app root instead of the Dockerfile's own directory. The previous fix patched the Dockerfile instead of that resolution logic. |
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.
Implemented solution
Four issues surfaced while deploying/testing Codefresh CI against a real project:
Spaces in image name (regression):
CHApp.image_nameinmodel.pybuilt the path asf"{base} / {name}"(an f-string with stray spaces around the/), producing a malformed Docker image reference with literal spaces in it. Fixed tof"{base}/{name}".Codefresh generating build/publish steps for every base image:
_collect_base_image_build_stepsincodefresh.pyiterated over all of a project's base images and generated a build+publish step for each, even ones nothing in the project actually used. Scoped the loop toproject.all_task_images()so only base images actually referenced by a buildable task get a step.Registry doubling in Codefresh build steps:
_collect_build_stepincodefresh.pywas qualifying its ownimage_namewithself.qualify()(prefixing${{REGISTRY}}/). Codefresh'sbuildstep type auto-pushes the built image through whichever registry integrationCODEFRESH_REGISTRYnames, which adds its own host regardless of whetherimage_nameis already qualified. A pre-qualifiedimage_nametherefore got double-prefixed (e.g.us.gcr.io/us.gcr.io/metacellllc/...), which GCR/Artifact Registry rejected with a permission error on push. Fixed by keepingimage_namebare, matching the legacy convention (legacy'scodefresh_app_build the registry tag for this same field, while keeping the separate publish step'scandidate` host-qualified).Build context mismatch in
workflowsDockerfile :applications/workflows/server/DockerfilehasCOPYinstructions written relative to its own directory (server/), butCHApp.build_contextalways resolves to the app root (applications/workflows), one level up. This madeCOPY./requirements.txtandCOPY .fail to find their sources. Fixed by prefixing theCOPYsources withserver/to match the actual build contextroot.How to test this PR
deployment-cli-toolstest suite (tools/deployment-cli-tools):pytest— covers the image-name formatting, base-image step scoping, and build-stepimage_namequalification.harness-deployment cloud-harness . -d <domain> -dtls -n <namespace> -e <env> -i <app>) and confirm:image_namehas no${{REGISTRY}}/prefixfastsurfer) and confirm the pushed image path is single-hosted, not doubled.workflowsand confirm the Docker build context resolvesrequirements.txtand the app source correctly.Sanity checks:
Breaking changes (select one):
breaking-changeis well described abovePossible deployment updates issues (select one):
alert:deploymentTest coverage (select one):
Documentation (select one):
Nice to have (if relevant):