Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action should fail if CLI failed #418

Open
vorburger opened this issue Mar 3, 2025 · 1 comment
Open

Action should fail if CLI failed #418

vorburger opened this issue Mar 3, 2025 · 1 comment

Comments

@vorburger
Copy link
Contributor

E.g. this had a failure:

[main] INFO org.virtuslab.bazelsteward.core.common.CommandRunner - /usr/bin/git push --quiet --set-upstream origin bazel-steward/rules_go/0.53.0 --force
[main] ERROR org.virtuslab.bazelsteward.app.PullRequestManager - Failed to create branch bazel-steward/rules_go/0.53.0
java.lang.RuntimeException: /usr/bin/git push --quiet --set-upstream origin bazel-steward/rules_go/0.53.0 --force
remote: Permission to enola-dev/enola.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/enola-dev/enola/': The requested URL returned error: 403
	at org.virtuslab.bazelsteward.core.common.CommandRunner$Companion.runForOutput(CommandRunner.kt:28)
	at org.virtuslab.bazelsteward.core.common.CommandRunner$Companion$runForOutput$2.invokeSuspend(CommandRunner.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at org.virtuslab.bazelsteward.app.Main$Companion.main(Main.kt:14)
	at org.virtuslab.bazelsteward.app.Main.main(Main.kt)
[main] INFO org.virtuslab.bazelsteward.core.common.CommandRunner - /usr/bin/git checkout --quiet main

yet the GitHub Action still reported as GREEN - all good.

In a perfect world, in order to noticed problems, it would be neat if error exit code propagation worked.

I'm not sure yet if the issue is that the CLI doesn't return != 0, or if it does but then the action does not notice that.

@lukaszwawrzyk
Copy link
Collaborator

I agree with you. Bazel Steward operates on --keep_going like semantics to bump whatever it can despite milion of things that can go wrong, sometimes transiently. Yet, what is definitely missing is collecting all errors and reporting a failure at the end. I won't be able to fix it quickly, I believe it is some significant refactoring to collect failures from all places and report them at the end.
For now it is just required to look through the logs if something looks wrong. After initial setup, when everything is stable, new problems shouldn't arise and if something fails transiently, it should be fixed on next run.

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

No branches or pull requests

2 participants