feat: stream project failure text to job page#6414
Merged
chenrui333 merged 1 commit intoJun 27, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ensures that when a project plan/apply fails before any Terraform output is streamed, the per-project Atlantis job page is no longer blank by streaming a clear error/failure banner into the job output prior to the operation-complete signal.
Changes:
- Stream
Error:and/orFailure:banners to the job output stream when a project command returns an error or failure. - Add/extend unit tests to assert the ordering and content of streamed job messages (banners before
OperationComplete).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
server/events/project_command_runner.go |
Streams failure/error text into the job output stream on the failure branch of project status updates. |
server/events/project_command_runner_test.go |
Adds test cases and assertions verifying banners are streamed (and ordered) correctly before completion. |
lukemassa
previously approved these changes
May 7, 2026
lukemassa
left a comment
Contributor
There was a problem hiding this comment.
Nice, looks good to me!
86449e8 to
5508679
Compare
Contributor
Author
|
@lukemassa thanks! i don't have permission to run the workflows but hopefully someone can :) |
5508679 to
ba4c55d
Compare
3131f1f to
3ea846b
Compare
When a plan or apply fails before producing any terraform output (e.g. lock contention, depends_on, requirement checks), the Atlantis job page linked from the GitHub commit status was blank because nothing was streamed to the output buffer before OperationComplete. Emit a labeled Error:/Failure: banner to the job output stream from ProjectOutputWrapper.updateProjectPRStatus on the failure branch so the job page ends with a visible final status. This is especially valuable for users with silence_pr_comments enabled, who otherwise lose all visibility into these failures. Refs: runatlantis#4386 Signed-off-by: Éamon Ryan <eamon.ryan@grafana.com> Signed-off-by: Rui Chen <rui@chenrui.dev>
3ea846b to
bc0ec9e
Compare
chenrui333
approved these changes
Jun 27, 2026
Member
|
Thanks @eamonryan for your first contribution! |
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.
When a plan or apply fails before producing any terraform output (e.g. lock contention, depends_on, requirement checks), the Atlantis job page linked from the GitHub commit status is blank because nothing is streamed to the output buffer before OperationComplete.
This is (normally) fine because the error is posted as a GitHub comment, but if you are someone who likes/needs to use
silence_pr_commentsbecause you have a lot of environments managed by Atlantis, then it's an issue becausesilence_pr_commentshides these errors.This PR aims to fix that!
Solution: Emit a labeled Error:/Failure: banner to the job output stream from ProjectOutputWrapper.updateProjectPRStatus on the failure branch so the job page ends with a visible final status.
what
why
silence_pr_commentsenabled, they miss these errors, so this fixes thatsilence_pr_commentssince it simply means the error will be in both a comment and in the streamed outputtests
references
Refs: This was noted last year by a commenter here and obviously, also affects me or I wouldn't be submitting this ;)