[GH-ISSUE #1848] Events not sorted consistently #895

Closed
opened 2026-03-01 21:47:14 +03:00 by kerem · 1 comment
Owner

Originally created by @Anu48 on GitHub (Jun 7, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1848

Bug report info

act version:            0.2.46
GOOS:                   darwin
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock
Config files:           
	/Users/ashetty/.actrc:
		-P ubuntu-latest=catthehacker/ubuntu:act-latest
		-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
		-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
		-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
	Go version:            go1.20.4
	Module path:           command-line-arguments
	Main version:          
	Main path:             
	Main checksum:         
	Build settings:
		-buildmode:           exe
		-compiler:            gc
		-ldflags:             -X main.version=0.2.46
		CGO_ENABLED:          1
		CGO_CFLAGS:           
		CGO_CPPFLAGS:         
		CGO_CXXFLAGS:         
		CGO_LDFLAGS:          
		GOARCH:               amd64
		GOOS:                 darwin
		GOAMD64:              v1
Docker Engine:
	Engine version:        20.10.20
	Engine runtime:        runc
	Cgroup version:        1
	Cgroup driver:         cgroupfs
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Alpine Linux v3.16
	OS type:               linux
	OS version:            3.16.4
	OS arch:               x86_64
	OS kernel:             5.15.96-0-virt
	OS CPU:                2
	OS memory:             7958 MB
	Security options:
		name=seccomp,profile=default

Command used with act

act -l

Describe issue

The order of events of two workflow files with the same event definition is inconsistent.

The order should ideally be based on how it appears in the file.

github.com/Anu48/testing123@a3b125f55e

Workflow content

https://github.com/Anu48/testing123/blob/a3b125f55ea819e05e8de0cea6652b5c41efcf8a/.github/workflows/ci.yml


name: Testing CI
# If you update paths, make sure to update them in e2e-test.yml and no-ci.yml as well
on:
  push:
    paths:
      - '*.md'
  pull_request:
    paths:
      - '*.md'

permissions:
  contents: read

concurrency:
  group: ${{ github.workflow_ref }}
  cancel-in-progress: true

jobs:
  test-and-coverage:
    name: With ci
    runs-on: ubuntu-latest
    steps:
      - name: with ci
        run: |
            git ls-files -z "*.md" | xargs -0 wc -l | tail -1 | perl -ne 'm/\s*(\d+)/; exit $1 % 2'
        shell: bash

github.com/Anu48/testing123@a3b125f55e/.github/workflows/no-ci.yml

name: Testing CI
# If you update paths, make sure to update them in e2e-test.yml and no-ci.yml as well
on:
  push:
    paths-ignore:
      - '*.md'
  pull_request:
    paths-ignore:
      - '*.md'

permissions:
  contents: read

concurrency:
  group: ${{ github.workflow_ref }}
  cancel-in-progress: true

jobs:
  test-and-coverage:
    name: With no-ci
    runs-on: ubuntu-latest
    steps:
      - name: with ci
        run: "true"


### Relevant log output

```sh
time="2023-06-07T12:53:43-04:00" level=debug msg="Loading environment from /Users/ashetty/code/testing123/.env"
time="2023-06-07T12:53:43-04:00" level=debug msg="Loading action inputs from /Users/ashetty/code/testing123/.input"
time="2023-06-07T12:53:43-04:00" level=debug msg="Loading secrets from /Users/ashetty/code/testing123/.secrets"
time="2023-06-07T12:53:43-04:00" level=debug msg="Conditional GET for notices etag=f72fe684-bc62-4934-bafd-fd79f3581ec3"
time="2023-06-07T12:53:43-04:00" level=debug msg="Evaluated matrix inclusions: map[]"
time="2023-06-07T12:53:43-04:00" level=debug msg="Loading workflows from '/Users/ashetty/code/testing123/.github/workflows'"
time="2023-06-07T12:53:43-04:00" level=debug msg="Loading workflows recursively"
time="2023-06-07T12:53:43-04:00" level=debug msg="Found workflow 'ci.yml' in '/Users/ashetty/code/testing123/.github/workflows/ci.yml'"
time="2023-06-07T12:53:43-04:00" level=debug msg="Found workflow 'no-ci.yml' in '/Users/ashetty/code/testing123/.github/workflows/no-ci.yml'"
time="2023-06-07T12:53:43-04:00" level=debug msg="Reading workflow '/Users/ashetty/code/testing123/.github/workflows/ci.yml'"
time="2023-06-07T12:53:43-04:00" level=debug msg="Reading workflow '/Users/ashetty/code/testing123/.github/workflows/no-ci.yml'"
time="2023-06-07T12:53:43-04:00" level=debug msg="Preparing plan with all jobs"
Stage  Job ID             Job name    Workflow name  Workflow file  Events           
0      test-and-coverage  With ci     Testing CI     ci.yml         push,pull_request
0      test-and-coverage  With no-ci  Testing CI     no-ci.yml      push,pull_request

Detected multiple jobs with the same job name, use `-W` to specify the path to the specific workflow.
time="2023-06-07T12:53:43-04:00" level=debug msg="Saving notices etag=f72fe684-bc62-4934-bafd-fd79f3581ec3"
time="2023-06-07T12:53:43-04:00" level=debug msg="No new notices"

Additional information

It seems like the order of the events is caused by using a hashtable.

Originally created by @Anu48 on GitHub (Jun 7, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1848 ### Bug report info ```plain text act version: 0.2.46 GOOS: darwin GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock Config files: /Users/ashetty/.actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.20.4 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -X main.version=0.2.46 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: amd64 GOOS: darwin GOAMD64: v1 Docker Engine: Engine version: 20.10.20 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Alpine Linux v3.16 OS type: linux OS version: 3.16.4 OS arch: x86_64 OS kernel: 5.15.96-0-virt OS CPU: 2 OS memory: 7958 MB Security options: name=seccomp,profile=default ``` ### Command used with act ```sh act -l ``` ### Describe issue The order of events of two workflow files with the same event definition is inconsistent. The order should ideally be based on how it appears in the file. ### Link to GitHub repository https://github.com/Anu48/testing123/tree/a3b125f55ea819e05e8de0cea6652b5c41efcf8a ### Workflow content ```yml https://github.com/Anu48/testing123/blob/a3b125f55ea819e05e8de0cea6652b5c41efcf8a/.github/workflows/ci.yml name: Testing CI # If you update paths, make sure to update them in e2e-test.yml and no-ci.yml as well on: push: paths: - '*.md' pull_request: paths: - '*.md' permissions: contents: read concurrency: group: ${{ github.workflow_ref }} cancel-in-progress: true jobs: test-and-coverage: name: With ci runs-on: ubuntu-latest steps: - name: with ci run: | git ls-files -z "*.md" | xargs -0 wc -l | tail -1 | perl -ne 'm/\s*(\d+)/; exit $1 % 2' shell: bash ``` https://github.com/Anu48/testing123/blob/a3b125f55ea819e05e8de0cea6652b5c41efcf8a/.github/workflows/no-ci.yml ``` name: Testing CI # If you update paths, make sure to update them in e2e-test.yml and no-ci.yml as well on: push: paths-ignore: - '*.md' pull_request: paths-ignore: - '*.md' permissions: contents: read concurrency: group: ${{ github.workflow_ref }} cancel-in-progress: true jobs: test-and-coverage: name: With no-ci runs-on: ubuntu-latest steps: - name: with ci run: "true" ``` ``` ### Relevant log output ```sh time="2023-06-07T12:53:43-04:00" level=debug msg="Loading environment from /Users/ashetty/code/testing123/.env" time="2023-06-07T12:53:43-04:00" level=debug msg="Loading action inputs from /Users/ashetty/code/testing123/.input" time="2023-06-07T12:53:43-04:00" level=debug msg="Loading secrets from /Users/ashetty/code/testing123/.secrets" time="2023-06-07T12:53:43-04:00" level=debug msg="Conditional GET for notices etag=f72fe684-bc62-4934-bafd-fd79f3581ec3" time="2023-06-07T12:53:43-04:00" level=debug msg="Evaluated matrix inclusions: map[]" time="2023-06-07T12:53:43-04:00" level=debug msg="Loading workflows from '/Users/ashetty/code/testing123/.github/workflows'" time="2023-06-07T12:53:43-04:00" level=debug msg="Loading workflows recursively" time="2023-06-07T12:53:43-04:00" level=debug msg="Found workflow 'ci.yml' in '/Users/ashetty/code/testing123/.github/workflows/ci.yml'" time="2023-06-07T12:53:43-04:00" level=debug msg="Found workflow 'no-ci.yml' in '/Users/ashetty/code/testing123/.github/workflows/no-ci.yml'" time="2023-06-07T12:53:43-04:00" level=debug msg="Reading workflow '/Users/ashetty/code/testing123/.github/workflows/ci.yml'" time="2023-06-07T12:53:43-04:00" level=debug msg="Reading workflow '/Users/ashetty/code/testing123/.github/workflows/no-ci.yml'" time="2023-06-07T12:53:43-04:00" level=debug msg="Preparing plan with all jobs" Stage Job ID Job name Workflow name Workflow file Events 0 test-and-coverage With ci Testing CI ci.yml push,pull_request 0 test-and-coverage With no-ci Testing CI no-ci.yml push,pull_request Detected multiple jobs with the same job name, use `-W` to specify the path to the specific workflow. time="2023-06-07T12:53:43-04:00" level=debug msg="Saving notices etag=f72fe684-bc62-4934-bafd-fd79f3581ec3" time="2023-06-07T12:53:43-04:00" level=debug msg="No new notices" ``` ### Additional information It seems like the order of the events is caused by using a hashtable.
kerem 2026-03-01 21:47:14 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 5, 2023):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1839778242 --> @github-actions[bot] commented on GitHub (Dec 5, 2023): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#895
No description provided.