Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Act does not exit correctly when a job in a matrix fails #1518

Closed
KnisterPeter opened this issue Dec 19, 2022 · 3 comments · Fixed by #1519
Closed

Act does not exit correctly when a job in a matrix fails #1518

KnisterPeter opened this issue Dec 19, 2022 · 3 comments · Fixed by #1519
Assignees
Labels
kind/bug Something isn't working

Comments

@KnisterPeter
Copy link
Member

Bug report info

act version:            0.2.34-13-gbef9b5c
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 12
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
	/var/run/docker.sock
Config files:           
	/home/markusw/.actrc:
		-P ubuntu-latest=node:12-buster-slim
		-P ubuntu-20.04=node:12-buster-slim
		-P ubuntu-18.04=node:12-buster-slim
		-P ubuntu-16.04=node:12-stretch-slim
Build info:
	Go version:            go1.19.4
	Module path:           command-line-arguments
	Main version:          
	Main path:             
	Main checksum:         
	Build settings:
		-compiler:            gc
		-ldflags:             -X main.version=0.2.34-13-gbef9b5c
		CGO_ENABLED:          1
		CGO_CFLAGS:           
		CGO_CPPFLAGS:         
		CGO_CXXFLAGS:         
		CGO_LDFLAGS:          
		GOARCH:               amd64
		GOOS:                 linux
		GOAMD64:              v1
Docker Engine:
	Engine version:        20.10.21+dfsg1
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         systemd
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Debian GNU/Linux bookworm/sid
	OS type:               linux
	OS version:            
	OS arch:               x86_64
	OS kernel:             6.0.0-5-amd64
	OS CPU:                12
	OS memory:             31734 MB
	Security options:
		name=apparmor
		name=seccomp,profile=default
		name=cgroupns

Command used with act

act -v

Describe issue

When one job in a matrix of jobs fail, act might still exit with a zero exit code.
I would be expected to fail a job, if one job fails to succeed.

Link to GitHub repository

No response

Workflow content

name: test

on: push

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        val: ["true", "false"]
      fail-fast: false
    steps:
      - run: |
          echo hallo ${{ matrix.val }}
          if [[ "${{ matrix.val }}" = "false" ]] ; then
            exit 1
          fi

Relevant log output

DEBU[0000] Loading environment from /tmp/act-test/.env  
DEBU[0000] Loading secrets from /tmp/act-test/.secrets  
DEBU[0000] Loading workflows from '/tmp/act-test/.github/workflows' 
DEBU[0000] Loading workflows recursively                
DEBU[0000] Found workflow 'ci.yml' in '/tmp/act-test/.github/workflows/ci.yml' 
DEBU[0000] Reading workflow '/tmp/act-test/.github/workflows/ci.yml' 
DEBU[0000] Preparing plan with all jobs                 
DEBU[0000] Using the only detected workflow event: push 
DEBU[0000] Planning jobs for event: push                
DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce' 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce' 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] false                                        
DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce' 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] Loading slug from git directory '/tmp/act-test/.git' 
DEBU[0000] Loading revision from git directory '/tmp/act-test/.git' 
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
DEBU[0000] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce' 
DEBU[0000] using github ref: refs/heads/main            
DEBU[0000] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce 
[test/test-2] [DEBUG] evaluating expression 'success()'
[test/test-1] [DEBUG] evaluating expression 'success()'
[test/test-1] [DEBUG] expression 'success()' evaluated to 'true'
[test/test-2] [DEBUG] expression 'success()' evaluated to 'true'
[test/test-1] 🚀  Start image=node:12-buster-slim
[test/test-2] 🚀  Start image=node:12-buster-slim
[test/test-1]   🐳  docker pull image=node:12-buster-slim platform= username= forcePull=false
[test/test-1] [DEBUG]   🐳  docker pull node:12-buster-slim
[test/test-2]   🐳  docker pull image=node:12-buster-slim platform= username= forcePull=false
[test/test-2] [DEBUG]   🐳  docker pull node:12-buster-slim
[test/test-2] [DEBUG] Image exists? true
[test/test-1] [DEBUG] Image exists? true
[test/test-1]   🐳  docker create image=node:12-buster-slim platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[test/test-1] [DEBUG] Common container.Config ==> &{Hostname: Domainname: User: AttachStdin:false AttachStdout:false AttachStderr:false ExposedPorts:map[] Tty:true OpenStdin:false StdinOnce:false Env:[RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8] Cmd:[] Healthcheck:<nil> ArgsEscaped:false Image:node:12-buster-slim Volumes:map[] WorkingDir:/tmp/act-test Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout:<nil> Shell:[]}
[test/test-1] [DEBUG] Common container.HostConfig ==> &{Binds:[/var/run/docker.sock:/var/run/docker.sock] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode:host PortBindings:map[] RestartPolicy:{Name: MaximumRetryCount:0} AutoRemove:false VolumeDriver: VolumesFrom:[] CapAdd:[] CapDrop:[] CgroupnsMode: DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:false PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[] UTSMode: UsernsMode: ShmSize:0 Sysctls:map[] Runtime: ConsoleSize:[0 0] Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DeviceRequests:[] KernelMemory:0 KernelMemoryTCP:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness:<nil> OomKillDisable:<nil> PidsLimit:<nil> Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[{Type:volume Source:act-toolcache Target:/toolcache ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>} {Type:volume Source:act-test-test-1-env Target:/var/run/act ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>} {Type:volume Source:act-test-test-1 Target:/tmp/act-test ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>}] MaskedPaths:[] ReadonlyPaths:[] Init:<nil>}
[test/test-1] [DEBUG] Created container name=act-test-test-1 id=ee53168aeb5d2391d4f3fab7760a3daf1158d7d73d038e2ebbf27b4bf1e8c22a from image node:12-buster-slim (platform: )
[test/test-1] [DEBUG] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8]
[test/test-1]   🐳  docker run image=node:12-buster-slim platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[test/test-1] [DEBUG] Starting container: ee53168aeb5d2391d4f3fab7760a3daf1158d7d73d038e2ebbf27b4bf1e8c22a
[test/test-2] [DEBUG] Removed container: 7626864bb03a75d79afc6a8d2d5ed053ee7a4a9608bc2cf7aeaac9eda88457b2
[test/test-2] [DEBUG]   🐳  docker volume rm act-test-test-2
[test/test-2] [DEBUG]   🐳  docker volume rm act-test-test-2-env
[test/test-2]   🐳  docker create image=node:12-buster-slim platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[test/test-2] [DEBUG] Common container.Config ==> &{Hostname: Domainname: User: AttachStdin:false AttachStdout:false AttachStderr:false ExposedPorts:map[] Tty:true OpenStdin:false StdinOnce:false Env:[RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8] Cmd:[] Healthcheck:<nil> ArgsEscaped:false Image:node:12-buster-slim Volumes:map[] WorkingDir:/tmp/act-test Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout:<nil> Shell:[]}
[test/test-2] [DEBUG] Common container.HostConfig ==> &{Binds:[/var/run/docker.sock:/var/run/docker.sock] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode:host PortBindings:map[] RestartPolicy:{Name: MaximumRetryCount:0} AutoRemove:false VolumeDriver: VolumesFrom:[] CapAdd:[] CapDrop:[] CgroupnsMode: DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:false PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[] UTSMode: UsernsMode: ShmSize:0 Sysctls:map[] Runtime: ConsoleSize:[0 0] Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DeviceRequests:[] KernelMemory:0 KernelMemoryTCP:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness:<nil> OomKillDisable:<nil> PidsLimit:<nil> Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[{Type:volume Source:act-test-test-2-env Target:/var/run/act ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>} {Type:volume Source:act-test-test-2 Target:/tmp/act-test ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>} {Type:volume Source:act-toolcache Target:/toolcache ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil>}] MaskedPaths:[] ReadonlyPaths:[] Init:<nil>}
[test/test-2] [DEBUG] Created container name=act-test-test-2 id=8273ba9f984c8b3b765a3c09c28532b7edfb05e57ce453ab41247d82c1b6bba2 from image node:12-buster-slim (platform: )
[test/test-2] [DEBUG] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8]
[test/test-2]   🐳  docker run image=node:12-buster-slim platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[test/test-2] [DEBUG] Starting container: 8273ba9f984c8b3b765a3c09c28532b7edfb05e57ce453ab41247d82c1b6bba2
[test/test-1] [DEBUG] Started container: ee53168aeb5d2391d4f3fab7760a3daf1158d7d73d038e2ebbf27b4bf1e8c22a
[test/test-2] [DEBUG] Started container: 8273ba9f984c8b3b765a3c09c28532b7edfb05e57ce453ab41247d82c1b6bba2
[test/test-1] [DEBUG] Writing entry to tarball workflow/event.json len:2
[test/test-1] [DEBUG] Writing entry to tarball workflow/envs.txt len:0
[test/test-1] [DEBUG] Extracting content to '/var/run/act/'
[test/test-2] [DEBUG] Writing entry to tarball workflow/event.json len:2
[test/test-2] [DEBUG] Writing entry to tarball workflow/envs.txt len:0
[test/test-2] [DEBUG] Extracting content to '/var/run/act/'
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
)'
[test/test-1] 🧪  Matrix: map[val:true]
[test/test-1] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
)'
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
)'
[test/test-2] 🧪  Matrix: map[val:false]
[test/test-2] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
)'
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] setupEnv => map[ACT:true CI:true GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:test GITHUB_REF:refs/heads/main GITHUB_REF_NAME:main GITHUB_REF_TYPE:branch GITHUB_REPOSITORY:file:///tmp/ GITHUB_REPOSITORY_OWNER:file: GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3fbf608129ab7703b44a4d8d36ea432f9f5f46ce GITHUB_TOKEN: GITHUB_WORKFLOW:test GITHUB_WORKSPACE:/tmp/act-test ImageOS:ubuntu20 NODE_VERSION:12.22.12 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: YARN_VERSION:1.22.18]
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] evaluating expression ''
[test/test-1] [DEBUG] expression '' evaluated to 'true'
[test/test-1] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
)'
[test/test-1] ⭐ Run Main echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
[test/test-1] [DEBUG] Writing entry to tarball workflow/outputcmd.txt len:0
[test/test-1] [DEBUG] Writing entry to tarball workflow/statecmd.txt len:0
[test/test-1] [DEBUG] Writing entry to tarball workflow/pathcmd.txt len:0
[test/test-1] [DEBUG] Extracting content to '/var/run/act'
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] setupEnv => map[ACT:true CI:true GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:test GITHUB_REF:refs/heads/main GITHUB_REF_NAME:main GITHUB_REF_TYPE:branch GITHUB_REPOSITORY:file:///tmp/ GITHUB_REPOSITORY_OWNER:file: GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:3fbf608129ab7703b44a4d8d36ea432f9f5f46ce GITHUB_TOKEN: GITHUB_WORKFLOW:test GITHUB_WORKSPACE:/tmp/act-test ImageOS:ubuntu20 NODE_VERSION:12.22.12 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: YARN_VERSION:1.22.18]
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] evaluating expression ''
[test/test-2] [DEBUG] expression '' evaluated to 'true'
[test/test-2] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
)'
[test/test-2] ⭐ Run Main echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
[test/test-2] [DEBUG] Writing entry to tarball workflow/outputcmd.txt len:0
[test/test-2] [DEBUG] Writing entry to tarball workflow/statecmd.txt len:0
[test/test-2] [DEBUG] Writing entry to tarball workflow/pathcmd.txt len:0
[test/test-2] [DEBUG] Extracting content to '/var/run/act'
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
)'
[test/test-1] [DEBUG] Wrote command 

echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi


 to 'workflow/0'
[test/test-1] [DEBUG] Writing entry to tarball workflow/0 len:63
[test/test-1] [DEBUG] Extracting content to '/var/run/act'
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
)'
[test/test-2] [DEBUG] Wrote command 

echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi


 to 'workflow/0'
[test/test-2] [DEBUG] Writing entry to tarball workflow/0 len:65
[test/test-2] [DEBUG] Extracting content to '/var/run/act'
[test/test-1]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0] user= workdir=
[test/test-1] [DEBUG] Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0]'
[test/test-1] [DEBUG] Working directory '/tmp/act-test'
[test/test-2]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0] user= workdir=
[test/test-2] [DEBUG] Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0]'
[test/test-2] [DEBUG] Working directory '/tmp/act-test'
| hallo true
[test/test-1]   ✅  Success - Main echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
| hallo false
[test/test-2]   ❌  Failure - Main echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
[test/test-2] exitcode '1': failure
[test/test-2] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-2] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo false
if [[ "false" = "false" ]] ; then
  exit 1
fi
)'
[test/test-2] 🏁  Job failed
[test/test-2] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-2] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-2] [DEBUG] using github ref: refs/heads/main
[test/test-2] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] expression 'echo hallo ${{ matrix.val }}
if [[ "${{ matrix.val }}" = "false" ]] ; then
  exit 1
fi
' rewritten to 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] evaluating expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)'
[test/test-1] [DEBUG] expression 'format('echo hallo {0}
if [[ "{1}" = "false" ]] ; then
  exit 1
fi
', matrix.val, matrix.val)' evaluated to '%!t(string=echo hallo true
if [[ "true" = "false" ]] ; then
  exit 1
fi
)'
[test/test-1] [DEBUG] Removed container: ee53168aeb5d2391d4f3fab7760a3daf1158d7d73d038e2ebbf27b4bf1e8c22a
[test/test-1] [DEBUG]   🐳  docker volume rm act-test-test-1
[test/test-1] [DEBUG]   🐳  docker volume rm act-test-test-1-env
[test/test-1] 🏁  Job succeeded
[test/test-1] [DEBUG] Loading slug from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Loading revision from git directory '/tmp/act-test/.git'
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce
[test/test-1] [DEBUG] HEAD points to '3fbf608129ab7703b44a4d8d36ea432f9f5f46ce'
[test/test-1] [DEBUG] using github ref: refs/heads/main
[test/test-1] [DEBUG] Found revision: 3fbf608129ab7703b44a4d8d36ea432f9f5f46ce

Additional information

No response

@KnisterPeter KnisterPeter added the kind/bug Something isn't working label Dec 19, 2022
@ChristopherHX
Copy link
Contributor

I want to add that continue-on-error is also not working for a job matrix. Here my test of my act clone, which fails in act

on: push
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        test: [0,1,2]
    continue-on-error: true
    steps:
    - run: exit 1
  assert:
    needs:
    - test
    if: always() && ( needs.test.result != 'success' || !success() )
    runs-on: ubuntu-latest
    steps:
    - run: exit 1

@KnisterPeter KnisterPeter self-assigned this Dec 19, 2022
@KnisterPeter
Copy link
Member Author

continue-on-error on job level is not implemented at all. That would be a new feature and should not be part of this bug report.
But sure, you are right, it is a missing feature and not working currently.

@ChristopherHX
Copy link
Contributor

ok, in my own codebase is the handling of merging job results / outputs of matrix legs next to continue-on-error handling so this came up to my mind.

You are right, it seems like continue-on-error would be a new feature

KnisterPeter added a commit that referenced this issue Dec 19, 2022
There is just one job field for the job result. This is also true for
matrix jobs. We need to preserve the failure state of a job to
have the whole job failing in case of one permuation of the matrix failed.

Closes #1518
github-actions bot pushed a commit to xing/act that referenced this issue Dec 20, 2022
There is just one job field for the job result. This is also true for
matrix jobs. We need to preserve the failure state of a job to
have the whole job failing in case of one permuation of the matrix failed.

Closes nektos#1518
github-actions bot pushed a commit to xing/act that referenced this issue Dec 21, 2022
There is just one job field for the job result. This is also true for
matrix jobs. We need to preserve the failure state of a job to
have the whole job failing in case of one permuation of the matrix failed.

Closes nektos#1518
github-actions bot pushed a commit to xing/act that referenced this issue Dec 21, 2022
There is just one job field for the job result. This is also true for
matrix jobs. We need to preserve the failure state of a job to
have the whole job failing in case of one permuation of the matrix failed.

Closes nektos#1518
github-actions bot pushed a commit to xing/act that referenced this issue Dec 26, 2022
There is just one job field for the job result. This is also true for
matrix jobs. We need to preserve the failure state of a job to
have the whole job failing in case of one permuation of the matrix failed.

Closes nektos#1518
github-actions bot pushed a commit to xing/act that referenced this issue Jan 2, 2023
There is just one job field for the job result. This is also true for
matrix jobs. We need to preserve the failure state of a job to
have the whole job failing in case of one permuation of the matrix failed.

Closes nektos#1518
@mergify mergify bot closed this as completed in #1519 Jan 10, 2023
mergify bot added a commit that referenced this issue Jan 10, 2023
* fix: preserve job result state in case of failure

There is just one job field for the job result. This is also true for
matrix jobs. We need to preserve the failure state of a job to
have the whole job failing in case of one permuation of the matrix failed.

Closes #1518

* test: remove continue-on-error on job level

This feature is not yet supported by act and if implemented
would make this test invalid

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants