WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@ShimShtein
Copy link
Member

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.

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.
@ShimShtein ShimShtein force-pushed the set_error_on_ssh_failure branch from d5347b1 to e387cc7 Compare November 13, 2025 16:51
else
if build_errors?
BUILD_FAILED
if waiting_for_build?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use elsif waiting_for_build? to avoid a level of nesting?

Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants