[GH-ISSUE #1029] Problems with skipping non-existing includes keys #598

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

Originally created by @ziyue-pan on GitHub (Mar 9, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1029

#763 Introduced an fix (skip non-existing includes keys and hard fail on non-existing excludes keys), which seems to behave differently with GitHub Actions. GitHub Actions allow non-existing includes keys in matrix product (check this run defined by this configuration)

I reproduced it through debugging with act's source code v0.2.25 and the above configuration file.

System information

  • Operating System: Linux
  • Architecture: x64 (64-bit)
  • Docker version: 20.10.12
  • Docker image used in act: did not actually execute the CI process, just parse the configuration file
  • act version: 0.2.25

Expected behaviour

  conda:
    name: conda
    runs-on: ${{matrix.os}}-latest
    strategy:
      fail-fast: false
      matrix:
        include:
          - {os: ubuntu, version: 1.8.16, channel: conda-forge, rust: stable}
          - {os: windows, version: 1.8.17, channel: conda-forge, rust: stable}
          - {os: macos, version: 1.8.18, channel: anaconda, rust: stable}
          - {os: ubuntu, version: 1.8.20, channel: anaconda, rust: beta}
          - {os: ubuntu, version: 1.10.1, channel: anaconda, rust: nightly}
...

GetMatrixes() is expected to return the matrix with multiple sets.

Actual behaviour

GetMatrixes() returns []

image

Workflow and/or repository

https://github.com/aldanor/hdf5-rust/blob/master/.github/workflows/ci.yml

act output

No log is printed. I built act from the source code.

More

One possible workaround for this is to remove the non-existing keys check. Yet my solution may not be sound enough.

@@ -252,12 +252,7 @@ func (j *Job) GetMatrixes() []map[string]interface{} {
 					}
 				case interface{}:
 					v := v.(map[string]interface{})
-					for k := range v {
-						if _, ok := m[k]; ok {
-							includes = append(includes, v)
-							break
-						}
-					}
+					includes = append(includes, v)
 				}
 			}
 			delete(m, "include")
Originally created by @ziyue-pan on GitHub (Mar 9, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1029 <!-- - Make sure you are able to reproduce it on the [latest version](https://github.com/nektos/act/releases) - Search the existing issues. - Refer to [README](https://github.com/nektos/act/blob/master/README.md). --> #763 Introduced an fix (skip non-existing includes keys and hard fail on non-existing excludes keys), which seems to behave differently with GitHub Actions. GitHub Actions allow non-existing includes keys in matrix product (check [this run](https://github.com/aldanor/hdf5-rust/actions/runs/1953042047) defined by [this configuration](https://github.com/aldanor/hdf5-rust/blob/27a59c2811b877d4729d50f9ffd5a2f3386f7f9f/.github/workflows/ci.yml#L83)) I reproduced it through debugging with act's source code v0.2.25 and the above configuration file. ## System information - Operating System: Linux - Architecture: x64 (64-bit) - Docker version: 20.10.12 - Docker image used in `act`: did not actually execute the CI process, just parse the configuration file - `act` version: 0.2.25 ## Expected behaviour <!-- - Describe how whole process should go and finish --> ```yml conda: name: conda runs-on: ${{matrix.os}}-latest strategy: fail-fast: false matrix: include: - {os: ubuntu, version: 1.8.16, channel: conda-forge, rust: stable} - {os: windows, version: 1.8.17, channel: conda-forge, rust: stable} - {os: macos, version: 1.8.18, channel: anaconda, rust: stable} - {os: ubuntu, version: 1.8.20, channel: anaconda, rust: beta} - {os: ubuntu, version: 1.10.1, channel: anaconda, rust: nightly} ... ``` `GetMatrixes()` is expected to return the matrix with multiple sets. ## Actual behaviour `GetMatrixes()` returns `[]` ![image](https://user-images.githubusercontent.com/50222787/157391380-44887133-ca8a-4e1b-9b71-ddee124c2211.png) ## Workflow and/or repository https://github.com/aldanor/hdf5-rust/blob/master/.github/workflows/ci.yml ## `act` output No log is printed. I built act from the source code. ## More One possible workaround for this is to remove the non-existing keys check. Yet my solution may not be sound enough. ```diff @@ -252,12 +252,7 @@ func (j *Job) GetMatrixes() []map[string]interface{} { } case interface{}: v := v.(map[string]interface{}) - for k := range v { - if _, ok := m[k]; ok { - includes = append(includes, v) - break - } - } + includes = append(includes, v) } } delete(m, "include") ```
kerem 2026-03-01 21:44:51 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@catthehacker commented on GitHub (Mar 9, 2022):

duplicate of #769

<!-- gh-comment-id:1062932291 --> @catthehacker commented on GitHub (Mar 9, 2022): duplicate of #769
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#598
No description provided.