Skip to content

Commit 0158188

Browse files
[BazelBot] Push message on failure (#825)
If the bot fails, push a status commit message indicating the bot failed so that people can see that the bot failed rather than just the initial (incorrect) message that the bot is still working on a fix.
1 parent 40d869d commit 0158188

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

google-bazel-bot/bazel-bot/bazelbot_server.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ def process_failure_with_ai(self, build_data):
187187

188188
if not self.validate_before_publishing():
189189
logger.info("Validation before publishing failed.")
190+
self.git_repo.create_branch_for_fix(build_data.commit)
191+
self.git_repo.commit(
192+
f"AI failed to fix the build for {build_data.commit[:7]}. You "
193+
"will need to fix it manually"
194+
)
195+
self.git_repo.push_fix(build_data.commit, False)
190196
return False
191197

192198
self.git_repo.commit(f"Fix Bazel build for {build_data.commit[:7]}")

0 commit comments

Comments
 (0)