reactor / reactor-core

Non-Blocking Reactive Foundation for the JVM
http://projectreactor.io
Apache License 2.0
4.87k stars 1.18k forks source link

Don't cleanup docs zip in case of build errors #3818

Closed pderop closed 4 weeks ago

pderop commented 1 month ago

The publication process triggered by the CI (controlled by publish.yml) may occasionally fail (like when having some flaky tests). In such cases, the cleanup job always runs and deletes any previously uploaded docs zip files created by the build-docs-zip job. However, it's inconvenient to remove the docs-zip when certain jobs fail because if we attempt to rerun the failed jobs later, we lose access to the docs-zip attached to the workflow run.

Ideally, the docs-zip should only be removed when the publish process succeeds. If errors occur, such as flaky tests, the docs-zip should not be removed. This ensures that we can rerun the publish jobs successfully.

It's important to note that the docs-zip is set to be retained for 1 day. If a failed jobs is not rerun within this timeframe, the docs-zip will then be automatically removed from the workflow run after one day.

pderop commented 1 month ago

in commit https://github.com/reactor/reactor-core/pull/3818/commits/0a911a64d8a3f61b3c9da2f53ce97ac289b7e096:

@chemicL , can you please take a look ?

pderop commented 1 month ago

notice that I tried to shorten the cleanup condition like this:

cleanup:
  needs: [ deploySnapshot, tagRelease, tagMilestone ]
  if: always() && contains(needs.*.result, 'success')

but this simply just does not work, see https://github.com/actions/runner/issues/1540

pderop commented 4 weeks ago

Thanks @chemicL for the review and for the merge.