Fixes #38904 - Fix build status on SSH error#10768
Open
ShimShtein wants to merge 1 commit intotheforeman:developfrom
Open
Fixes #38904 - Fix build status on SSH error#10768ShimShtein wants to merge 1 commit intotheforeman:developfrom
ShimShtein wants to merge 1 commit intotheforeman:developfrom
Conversation
The PR changes the way the build status is calculated, so the build will be considered failed if errors present regardless the waiting condition. The second part is that the host is adding a build error once the SSH times out.
d5347b1 to
e387cc7
Compare
ekohl
reviewed
Nov 14, 2025
| else | ||
| if build_errors? | ||
| BUILD_FAILED | ||
| if waiting_for_build? |
Member
There was a problem hiding this comment.
Can you use elsif waiting_for_build? to avoid a level of nesting?
chris1984
reviewed
Dec 2, 2025
Member
chris1984
left a comment
There was a problem hiding this comment.
Since build_errors? now takes precedence in build_status.rb, are we sure that build_errors is properly cleared when a host is re-built?
| rescue => e | ||
| failure _("Failed to login via SSH to %{name}: %{e}") % { :name => name, :e => e }, e | ||
| error_message = _("Failed to login via SSH to %{name}: %{e}") % { :name => name, :e => e } | ||
| self.build_errors = "#{build_errors}\n#{error_message}" |
Member
There was a problem hiding this comment.
"Minor nitpick: If build_errors is nil, this interpolation results in a leading newline character. It might be cleaner to use an array join:"
Suggested change
| self.build_errors = "#{build_errors}\n#{error_message}" | |
| self.build_errors = [build_errors, error_message].compact.join("\n") |
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 PR changes the way the build status is calculated, so the build will be considered failed if errors present regardless the waiting condition. The second part is that the host is adding a build error once the SSH times out.