dagger / dagger-for-github

GitHub Action for Dagger
https://github.com/marketplace/actions/dagger-for-github
Apache License 2.0
120 stars 25 forks source link

🐞 Engine stop is not called when the pipeline fails #110

Open sagikazarmark opened 5 months ago

sagikazarmark commented 5 months ago

What is the issue?

When the Dagger command fails for any reason, engine stop is not called.

The GitHub snippet in the documentation has an added condition to make sure engine stop runs even if the command before it fails:

      - name: Stop Engine
        run: docker stop -t 300 $(docker ps --filter name="dagger-engine-*" -q)
        if: always()

Dagger version

dagger v0.9.7 (registry.dagger.io/engine) darwin/arm64

Steps to reproduce

No response

Log output

No response

kpenfound commented 4 months ago

Yeah, the proper fix is to update the action to a "real" action instead of a composite action. Composite actions aren't allowed to have post steps for some reason.

A post step for the engine stop handles the cases where:

jpadams commented 3 months ago
  • A step fails
  • Multiple uses of this action are called in a pipeline and we only want to stop the engine once at the very end

Looks like a lot of GH Actions users want pre/post steps. https://github.com/actions/runner/issues/1478