Skip to content

Conversation

@kurlov
Copy link
Member

@kurlov kurlov commented Nov 6, 2025

Add a workflow which automatically restarts Konflux failed -on-push builds up to MAX_RETRIES times for finished CI jobs.
There are two caveats:

  • check_run should be on the base branch to trigger. So I cannot test it from the PR.
  • I hope check_run events works for Konflux CI.

If it works fine, then I will migrate it to https://github.com/stackrox/actions repo for easy-to-share purpose

@kurlov kurlov requested a review from tommartensen November 6, 2025 19:23
@kurlov kurlov requested a review from msugakov November 6, 2025 21:23
Copy link
Contributor

@msugakov msugakov left a comment

Choose a reason for hiding this comment

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

AI-assisted?

@kurlov
Copy link
Member Author

kurlov commented Nov 7, 2025

AI-assisted?

Yes, but I had to tune it because the full AI implementation was wrong even though prompt was quite precise

@msugakov
Copy link
Contributor

msugakov commented Nov 7, 2025

Sorry to put it in the face like this, but: https://github.com/msugakov/msugakov/blob/main/No_I_will_not_review_your_LLM_generated_code.md

The problem I have with this change as it is, I would not write it this way. I'm almost sure you wouldn't either.
For one reason, there's no need in so many small steps. It could all be handled in one step with a single script saving lines on ceremony of passing values between steps.

There are more subtle questions I could ask but I'll hold them for later assuming the change still needs to be edited and validated.

Speaking of which, if you can't run the workflow due to check_run restrictions, could you perhaps change to a different type that can run in PR and test it this way? I'd love to see an example how this workflow executed. Perhaps you could create another PR on top of this one that serves as a demo?

@tommartensen
Copy link
Contributor

Generally, I like the idea and it's similar to https://github.com/stackrox/stackrox/blob/master/.github/workflows/retest_periodic.yml (maybe you can see how things were done differently there).

Speaking of which, if you can't run the workflow due to check_run restrictions, could you perhaps change to a different type that can run in PR and test it this way? I'd love to see an example how this workflow executed. Perhaps you could create another PR on top of this one that serves as a demo?

In general, no new workflow can be triggered from a PR as a security measure from GH.
Specifically, the docs state for check_run state that

This event will only trigger a workflow run if the workflow file exists on the default branch.

I don't know if you can steer the workflow behaviour from different branches, but in any case, a workflow under this name needs to be present in the default branch of the repo.

If you want to test this workflow, I would suggest to create a public repository in your private GitHub org to freely iterate on the workflow.

I am open to reviewing LLM-generated content - I would just ask you to provide atomic commits such that AI's and your thinking and testing is documented. :)

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