Conversation
Signed-off-by: CodeLoopdroid <214800619+CodeLoopdroid@users.noreply.github.com>
|
Hi maintainers, I looked into this and was able to reproduce it. The failure comes from the
I put together a fix that keeps that path as raw YAML model data instead of rebinding it into I also verified it with:
On the patched build, the repro passes for me instead of throwing the decode error. |
glours
left a comment
There was a problem hiding this comment.
Sounds good to me, thanks for the fix 🙏
Signed-off-by: CodeLoopdroid <214800619+CodeLoopdroid@users.noreply.github.com>
Signed-off-by: CodeLoopdroid <214800619+CodeLoopdroid@users.noreply.github.com>
glours
left a comment
There was a problem hiding this comment.
The fallback pattern in the last commit silently discards errors from LoadWithContext, any real config error would go unnoticed and fall through to the raw model path. The two paths also produce different YAML representations, making the secret scanner's behavior inconsistent.
The 3rd commit (LoadModelWithContext only) is the right direction. The sensitive data detection issue should be fixed at a higher level rather than papering over it with a fragile try/fallback.
What I did
Fixed
docker compose publishso it works with short-form port mappings like${DASHBOARD_PORT:-3000}:3000.The issue was in the publish scan path. It was loading a non-interpolated Compose file back into
types.Project, and that caused short-form port entries to fail decoding. This change keeps that path as raw YAML model data instead.I also added:
pkg/compose/publish_test.gopkg/e2e/publish_test.goRelated issue
Fixes #13672
(not mandatory) A picture of a cute animal, if possible in relation to what you did)