Conversation
Commit 399c363 passed each pipeline directory with its own --pipeline-dir flag. `melange compile` treats that flag as a single string, so repeated flags collapse to the last one. For enterprise packages, that leaves only ./pipelines/os. A package that uses a pipeline from ./pipelines/ still fails with "unable to load pipeline", which is the error commit 399c363 set out to fix. chainguard-dev/melange#2656 adds --pipeline-dirs to `melange compile`. This flag takes a comma-separated list, the same format `melange build` already uses. Pass the directories through --pipeline-dirs instead. The fallback for unknown directories uses the same flag, so one code path covers both cases. This fix needs the melange:latest image to include that change. An older image rejects --pipeline-dirs as an unknown flag, and the hook then fails for every package. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
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.
The problem
Commit 399c363 (#36) tried to let the hook find pipelines that live outside a package's own directory. It did this by passing several
--pipeline-dirflags tomelange compile. Butmelange compiledeclares--pipeline-diras a single string. Repeated flags collapse to the last one. For an enterprise package, that last flag is./pipelines/os. A package that uses a pipeline from./pipelines/still fails, with the errorunable to load pipeline: open pipelines/test/manylinux.yaml: file does not exist. This was verified against chainguard-dev/stereo#330877 with melange v0.60.0:The change
chainguard-dev/melange#2656 is merged. It adds
--pipeline-dirstomelange compile, the same comma-separated list flag thatmelange buildalready has._pipeline_dirs_fornow returns one--pipeline-dirs=a,b,cflag, and the fallback for unknown directories uses the same flag.Do not merge before the image has the flag
The hook runs
cgr.dev/chainguard/melange:latest. Until that image includes melange#2656,melange compilerejects--pipeline-dirsas an unknown flag, and the hook fails for every package. Check with:Evidence
This was tested with a melange binary built from #2656. Running
melange compile --pipeline-dirs=./enterprise-packages/pipelines/,./pipelines/,./pipelines/os enterprise-packages/libvpx.yamlcompiles the package from stereo#330877 that fails today. The function's output for each package tier:🤖 Generated with Claude Code