fix: jobparser: do not crash on invalid workflow_{dispatch,call} #193

Merged
earl-warren merged 1 commit from earl-warren/act:wip-jobparser into main 2025-07-25 11:30:48 +00:00
Contributor

An invalid workflow_{dispatch,call} key with a type that is not a map may attempt to use a nil map. It happens randomly as the order of the key maps is not guaranteed. Without this fix, the tests will fail 100% of the time with:

go test -count=500 -run=TestParseRawOn/on:___workflow_ -v ./pkg/jobparser/

Regression from #45

An invalid workflow_{dispatch,call} key with a type that is not a map may attempt to use a nil map. It happens randomly as the order of the key maps is not guaranteed. Without this fix, the tests will fail 100% of the time with: `go test -count=500 -run=TestParseRawOn/on:___workflow_ -v ./pkg/jobparser/` Regression from https://code.forgejo.org/forgejo/act/pulls/45
fix: jobparser: do not crash on invalid workflow_{dispatch,call}
Some checks failed
checks / unit (pull_request) Successful in 2m52s
checks / integration (pull_request) Successful in 1m55s
/ cascade (pull_request_target) Failing after 40s
7ada80b8a3
An invalid workflow_{dispatch,call} key with a type that is not
a map may attempt to use a nil map. It happens randomly as the
order of the key maps is not guaranteed. Without this fix, the tests
will fail 100% of the time with:

go test -count=500 -run=TestParseRawOn/on:___workflow_ -v ./pkg/jobparser/

Regression from #45
Contributor

cascading-pr updated at forgejo/runner#731

cascading-pr updated at https://code.forgejo.org/forgejo/runner/pulls/731
viceice approved these changes 2025-07-25 09:47:45 +00:00
Owner

🙈

🙈
earl-warren deleted branch wip-jobparser 2025-07-25 11:30:48 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No milestone
No project
No assignees
3 participants
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
forgejo/act!193
No description provided.