fix(preview): the sticky comment had no host - #6236
Merged
Merged
Conversation
The comment shipped as "Preview: https://" with nothing after it. When the build was split into package/docker/publish, the comment steps moved into publish and their host reference changed from steps.meta to needs.package. That replacement also hit the declaration inside package itself, so the job ended up reading its own output through needs — which always resolves to empty. The tag survived because its line was not part of that replacement, which is why the comment showed a correct image tag next to an empty URL. Nothing fails when this happens: the expression is empty, the step succeeds, and the workflow is green. So helm-test now rejects any job whose outputs reference needs.<itself>.
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 preview comment on #6233 shipped as:
No host.
Cause
When #6211 split the build into
package/docker/publish, the comment steps moved intopublishand their host reference changed fromsteps.meta.outputs.hosttoneeds.package.outputs.host. That replacement also hit the declaration insidepackage:A job cannot read its own outputs through
needs. The expression resolves to empty, the step succeeds, and the workflow stays green.The tag survived because its line was not part of that replacement — which is why the comment showed a correct image tag beside an empty URL, and why nothing looked broken until someone read it.
Assertion
helm-test.ymlnow rejects any job whoseoutputsreferenceneeds.<itself>. Verified against the pre-fix workflow: it flagspackage.outputs -> needs.package, and passes here.This is the second failure of this shape today — an expression that evaluates to nothing, produces no error, and leaves a green run. The first was
preview.namespaceLabelsnever being passed, which rendered a namespace with no gateway label.Impact
Cosmetic but load bearing: the sticky comment is how a reviewer gets the URL. Everything else about #6233 is fine; the environment is reachable at the address the ApplicationSet computed independently.
Summary by cubic
Fixes the preview sticky comment showing an empty host. Before: the comment rendered "Preview: https://". Now: it includes the correct host. Adds a CI guard so this class of mistake fails fast.
Changes
package.outputs.hostnow reads from${{ steps.meta.outputs.host }}instead ofneeds.package.outputsreferenceneeds.<same job>.Rollout
needs.<same job>, update them to read from the producing step; otherwise CI will fail.Written for commit ed78e36. Summary will update on new commits.