woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.07k stars 351 forks source link

Restart only one workflow #1886

Open gioele opened 1 year ago

gioele commented 1 year ago

Clear and concise description of the problem

Pressing the "Restart" button will restart all workflows. This can quite time-consuming. Often what one wants is just to restart one or two workflows and not wait (nor waste resources) while waiting for all other workflows to run.

Suggested solution

It would be nice to have an additional button for "Restart this workflow".

Alternative

No response

Additional context

This report is based on the version of Woodpecker next currently used by Codeberg CI.

Validations

6543 commented 1 year ago

would this skip depends_on filter etc ...?

I would argue to use normal restart and #1731 instead

6543 commented 1 year ago

@gioele would that solve the issue :point_up: ?

gioele commented 1 year ago

@6543: Just by looking at the code and with no screenshots, it's hard to grasp what the UX implied by #1731 is. The way I understand it is that users will be able to manually select the tests that they want to skip, instead of selecting what they want to run again.

IMO that seems a quite convoluted way to achieve the same result.

For example, in case a test failed because of a temporary hiccup, I'd say that the desire of the user would be expressed as "run again the test that failed", not "run again all tests excluding those who have not failed".

pat-s commented 1 year ago

I was just going to propose the same: "Rerun failed workflows" or similar. Especially when there is a large matrix going on and some builds failed for any reason (happens quite often in our use cases), it would be neat to be able to rerun just these without commenting parts of the yaml and then reverting again.

E.g. in my specific case all builds rely on some external config which can be adjusted async and then I would just need to hit "rerun failed" in WP.

This would probably require a button which adds a filter based on workflow exist status. Then the question is, if the second+ run is grouped under the previous run index or just gets the next increment index value?

6543 commented 1 year ago

Well it is importand that no depends on checks get ignored as they can do some gatekeaping, witch could be a securety issue if we just not check souch cases

zc-devs commented 2 months ago

While this issue and #2763 talk about workflow restarting, I would like to endorse

when there is a large matrix going on and some builds failed for any reason (happens quite often in our use cases), it would be neat to be able to rerun just these without commenting parts of the yaml and then reverting again

If we have pipeline

matrix:
  arch:
    - amd64
    - arm64
  os:
    - linux
    - darwin

steps:
  build
  image: golang
  commands:
      - go build # < suppose, this is half hour compilation

and for example darwin/amd64 pipeline failed, it would be nice to rerun only this one and do not waste 1.5 hours of time and resources.

In that case there are no problems with volumes and workflow dependencies.

P.S. didn't open new issue, cause it is mentioned here. Let me know, it you want separate one.