fix: fail jobs, steps if expression interpolation fails #1646

Merged
mfenniak merged 11 commits from aahlenst/runner:expression-error into main 2026-07-25 20:02:25 +00:00
Member

Forgejo Runner supports expressions in workflows, for example, format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat'). If Forgejo Runner encounters an invalid expression, it logs an error, but otherwise progresses as if nothing had happened. That can cause unpredictable or even unwanted results. This change turns invalid expressions into a hard error that stops normal execution and fails the respective step.

Resolves #1596.

  • bug fixes
    • PR: fix: fail jobs, steps if expression interpolation fails
Forgejo Runner supports expressions in workflows, for example, `format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat')`. If Forgejo Runner encounters an invalid expression, it logs an error, but otherwise progresses as if nothing had happened. That can cause unpredictable or even unwanted results. This change turns invalid expressions into a hard error that stops normal execution and fails the respective step. Resolves https://code.forgejo.org/forgejo/runner/issues/1596. <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/1646): <!--number 1646 --><!--line 0 --><!--description Zml4OiBmYWlsIGpvYnMsIHN0ZXBzIGlmIGV4cHJlc3Npb24gaW50ZXJwb2xhdGlvbiBmYWlscw==-->fix: fail jobs, steps if expression interpolation fails<!--description--> <!--end release-notes-assistant-->
Contributor

cascading-pr updated at actions/setup-forgejo#1058

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/1058
aahlenst force-pushed expression-error from e4fb563cec
Some checks failed
cascade / debug (pull_request_target) Has been skipped
cascade / forgejo (pull_request_target) Has been skipped
test-multi-platform / Build Forgejo Runner (pull_request) Has been skipped
test-multi-platform / Build unsupported platforms (pull_request) Has been skipped
test-multi-platform / runner exec tests (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-latest) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-stable) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Podman (pull_request) Has been skipped
test-multi-platform / validate mocks (pull_request) Has been skipped
test-multi-platform / validate pre-commit-hooks file (pull_request) Has been skipped
checks / Build Forgejo Runner (pull_request) Failing after 26s
checks / runner exec tests (pull_request) Has been skipped
checks / Build unsupported platforms (pull_request) Has been skipped
checks / Run integration tests with Podman (pull_request) Has been skipped
checks / Run integration tests with Docker (docker-stable) (pull_request) Has been skipped
checks / Run integration tests with Docker (docker-latest) (pull_request) Has been skipped
checks / validate mocks (pull_request) Successful in 31s
checks / validate pre-commit-hooks file (pull_request) Successful in 37s
test-multi-platform / arm64 (pull_request) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 4s
cascade / end-to-end (pull_request_target) Has been cancelled
to 46f6e5ca31
Some checks failed
cascade / debug (pull_request_target) Has been skipped
cascade / forgejo (pull_request_target) Has been skipped
test-multi-platform / Build Forgejo Runner (pull_request) Has been skipped
test-multi-platform / Build unsupported platforms (pull_request) Has been skipped
test-multi-platform / runner exec tests (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-latest) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-stable) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Podman (pull_request) Has been skipped
test-multi-platform / validate mocks (pull_request) Has been skipped
test-multi-platform / validate pre-commit-hooks file (pull_request) Has been skipped
test-multi-platform / arm64 (pull_request) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 5s
checks / validate mocks (pull_request) Successful in 26s
checks / Build Forgejo Runner (pull_request) Failing after 31s
checks / Run integration tests with Docker (docker-stable) (pull_request) Has been skipped
checks / Run integration tests with Docker (docker-latest) (pull_request) Has been skipped
checks / runner exec tests (pull_request) Has been skipped
checks / Run integration tests with Podman (pull_request) Has been skipped
checks / Build unsupported platforms (pull_request) Has been skipped
checks / validate pre-commit-hooks file (pull_request) Successful in 39s
cascade / end-to-end (pull_request_target) Successful in 28m31s
2026-07-23 20:35:53 +00:00
Compare
Contributor

cascading-pr updated at actions/setup-forgejo#1058

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/1058
aahlenst force-pushed expression-error from 46f6e5ca31
Some checks failed
cascade / debug (pull_request_target) Has been skipped
cascade / forgejo (pull_request_target) Has been skipped
test-multi-platform / Build Forgejo Runner (pull_request) Has been skipped
test-multi-platform / Build unsupported platforms (pull_request) Has been skipped
test-multi-platform / runner exec tests (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-latest) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-stable) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Podman (pull_request) Has been skipped
test-multi-platform / validate mocks (pull_request) Has been skipped
test-multi-platform / validate pre-commit-hooks file (pull_request) Has been skipped
test-multi-platform / arm64 (pull_request) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 5s
checks / validate mocks (pull_request) Successful in 26s
checks / Build Forgejo Runner (pull_request) Failing after 31s
checks / Run integration tests with Docker (docker-stable) (pull_request) Has been skipped
checks / Run integration tests with Docker (docker-latest) (pull_request) Has been skipped
checks / runner exec tests (pull_request) Has been skipped
checks / Run integration tests with Podman (pull_request) Has been skipped
checks / Build unsupported platforms (pull_request) Has been skipped
checks / validate pre-commit-hooks file (pull_request) Successful in 39s
cascade / end-to-end (pull_request_target) Successful in 28m31s
to b776bbd5e7
All checks were successful
cascade / debug (pull_request_target) Has been skipped
cascade / forgejo (pull_request_target) Has been skipped
test-multi-platform / Build Forgejo Runner (pull_request) Has been skipped
test-multi-platform / Build unsupported platforms (pull_request) Has been skipped
test-multi-platform / runner exec tests (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-latest) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-stable) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Podman (pull_request) Has been skipped
test-multi-platform / validate mocks (pull_request) Has been skipped
test-multi-platform / validate pre-commit-hooks file (pull_request) Has been skipped
test-multi-platform / arm64 (pull_request) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 4s
checks / validate mocks (pull_request) Successful in 18s
checks / validate pre-commit-hooks file (pull_request) Successful in 30s
checks / Build Forgejo Runner (pull_request) Successful in 31s
checks / runner exec tests (pull_request) Successful in 1m2s
checks / Build unsupported platforms (pull_request) Successful in 1m56s
checks / Run integration tests with Docker (docker-latest) (pull_request) Successful in 11m14s
checks / Run integration tests with Podman (pull_request) Successful in 13m19s
checks / Run integration tests with Docker (docker-stable) (pull_request) Successful in 14m3s
cascade / end-to-end (pull_request_target) Successful in 36m20s
2026-07-24 11:58:36 +00:00
Compare
Contributor

cascading-pr updated at actions/setup-forgejo#1058

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/1058
aahlenst force-pushed expression-error from b776bbd5e7
All checks were successful
cascade / debug (pull_request_target) Has been skipped
cascade / forgejo (pull_request_target) Has been skipped
test-multi-platform / Build Forgejo Runner (pull_request) Has been skipped
test-multi-platform / Build unsupported platforms (pull_request) Has been skipped
test-multi-platform / runner exec tests (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-latest) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-stable) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Podman (pull_request) Has been skipped
test-multi-platform / validate mocks (pull_request) Has been skipped
test-multi-platform / validate pre-commit-hooks file (pull_request) Has been skipped
test-multi-platform / arm64 (pull_request) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 4s
checks / validate mocks (pull_request) Successful in 18s
checks / validate pre-commit-hooks file (pull_request) Successful in 30s
checks / Build Forgejo Runner (pull_request) Successful in 31s
checks / runner exec tests (pull_request) Successful in 1m2s
checks / Build unsupported platforms (pull_request) Successful in 1m56s
checks / Run integration tests with Docker (docker-latest) (pull_request) Successful in 11m14s
checks / Run integration tests with Podman (pull_request) Successful in 13m19s
checks / Run integration tests with Docker (docker-stable) (pull_request) Successful in 14m3s
cascade / end-to-end (pull_request_target) Successful in 36m20s
to f77f54dd1a
All checks were successful
cascade / debug (pull_request_target) Has been skipped
test-multi-platform / Build Forgejo Runner (pull_request) Has been skipped
test-multi-platform / Build unsupported platforms (pull_request) Has been skipped
test-multi-platform / Run exec tests with Docker (docker-latest) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-latest) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Docker (docker-stable) (pull_request) Has been skipped
test-multi-platform / Run integration tests with Podman (pull_request) Has been skipped
test-multi-platform / validate mocks (pull_request) Has been skipped
test-multi-platform / validate pre-commit-hooks file (pull_request) Has been skipped
checks / Build Forgejo Runner (pull_request) Successful in 30s
checks / validate mocks (pull_request) Successful in 30s
checks / validate pre-commit-hooks file (pull_request) Successful in 36s
example / docker-build-push-action-in-lxc (pull_request) Successful in 1m35s
checks / Run exec tests with Docker (docker-latest) (pull_request) Successful in 29s
/ example-docker-compose (pull_request) Successful in 2m1s
checks / Build unsupported platforms (pull_request) Successful in 1m10s
/ example-on-demand (pull_request) Successful in 4m44s
Integration tests for the release process / release-simulation (pull_request) Successful in 5m3s
/ example-lxc-systemd (pull_request) Successful in 7m36s
checks / Run integration tests with Docker (docker-latest) (pull_request) Successful in 13m32s
issue-labels / release-notes (pull_request_target) Successful in 4s
checks / Run integration tests with Podman (pull_request) Successful in 14m50s
checks / Run integration tests with Docker (docker-stable) (pull_request) Successful in 11m0s
test-multi-platform / arm64 (pull_request) Has been skipped
cascade / end-to-end (pull_request_target) Successful in 6s
cascade / forgejo (pull_request_target) Successful in 29s
2026-07-24 18:56:55 +00:00
Compare
Contributor

cascading-pr updated at actions/setup-forgejo#1058

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/1058
aahlenst changed title from WIP: fix: fail jobs, steps if expression interpolation fails to fix: fail jobs, steps if expression interpolation fails 2026-07-24 19:04:19 +00:00
mfenniak approved these changes 2026-07-25 20:02:07 +00:00
mfenniak left a comment

Painful work! But it looks great to me, and very thoughtful work in specific areas like secret management.

I've run this development branch against a few test systems and have not encountered any problems. Plus end-to-end tests without any failure, and very few test changes required here... it seems to build a lot of confidence that it's going to be generally low impact. 👍

Thank you!

Painful work! But it looks great to me, and very thoughtful work in specific areas like secret management. I've run this development branch against a few test systems and have not encountered any problems. Plus end-to-end tests without any failure, and very few test changes required here... it seems to build a lot of confidence that it's going to be generally low impact. 👍 Thank you!
Author
Member

Thanks a lot for performing additional tests!

Thanks a lot for performing additional tests!
mfenniak referenced this pull request from a commit 2026-08-24 21:22:44 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
3 participants
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
forgejo/runner!1646
No description provided.