dagger / dagger-for-github

GitHub Action for Dagger

Home Page:https://github.com/marketplace/actions/dagger-for-github

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🐞 Engine stop is not called when the pipeline fails

sagikazarmark opened this issue · comments

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

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:

  • 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
  • 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.
actions/runner#1478