fix: evaluate jobs.<job_id>.container.volumes #1244

Merged
mfenniak merged 3 commits from aahlenst/runner:container-volume-expressions into main 2025-12-28 01:53:40 +00:00
Member

Fixes #991

  • bug fixes
    • PR: fix: evaluate jobs.<job_id>.container.volumes
Fixes https://code.forgejo.org/forgejo/runner/issues/991 <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/1244): <!--number 1244 --><!--line 0 --><!--description Zml4OiBldmFsdWF0ZSBqb2JzLjxqb2JfaWQ+LmNvbnRhaW5lci52b2x1bWVz-->fix: evaluate jobs.<job_id>.container.volumes<!--description--> <!--end release-notes-assistant-->
aahlenst changed title from fix: evaluate jobs.<job_id>.container.volumes to WIP: fix: evaluate jobs.<job_id>.container.volumes 2025-12-27 15:39:27 +00:00
@ -293,4 +293,0 @@
{workdir, "job-container-non-root", "push", "", platforms, secrets},
{workdir, "job-container-invalid-credentials", "push", "failed to handle credentials: failed to interpolate container.credentials.password", platforms, secrets},
{workdir, "job-container-env-reference", "push", "", platforms, map[string]string{"ALPINE_TAG": "3.22"}},
{workdir, "container-hostname", "push", "", platforms, secrets},
Owner

Just peeking at your WIP in advance -- container-hostname might have been unintentionally removed when you moved these.

Ah, nevermind, I see it's moved into job-container-options.

~~Just peeking at your WIP in advance -- `container-hostname` might have been unintentionally removed when you moved these.~~ Ah, nevermind, I see it's moved into `job-container-options`.
Author
Member

I renamed the test because it's about options. Setting the host name is one of them. If you're not happy with the change, I can revert it.

I renamed the test because it's about options. Setting the host name is one of them. If you're not happy with the change, I can revert it.
aahlenst force-pushed container-volume-expressions from a17f55939d
Some checks failed
checks / integration tests (docker-latest) (pull_request) Failing after 1m58s
checks / integration tests (docker-stable) (pull_request) Failing after 1m56s
/ example-docker-compose (pull_request) Successful in 2m43s
checks / validate pre-commit-hooks file (pull_request) Successful in 1m11s
checks / validate mocks (pull_request) Successful in 1m21s
checks / build and test (pull_request) Successful in 4m28s
checks / runner exec tests (pull_request) Successful in 36s
/ example-lxc-systemd (pull_request) Successful in 9m13s
issue-labels / release-notes (pull_request_target) Successful in 7s
checks / runner integration tests (pull_request) Successful in 8m23s
to 3766ab5242
All checks were successful
checks / validate mocks (pull_request) Successful in 26s
checks / build and test (pull_request) Successful in 37s
checks / validate pre-commit-hooks file (pull_request) Successful in 34s
checks / runner exec tests (pull_request) Successful in 25s
/ example-docker-compose (pull_request) Successful in 1m57s
checks / runner integration tests (pull_request) Successful in 5m26s
/ example-lxc-systemd (pull_request) Successful in 6m40s
checks / integration tests (docker-latest) (pull_request) Successful in 9m7s
checks / integration tests (docker-stable) (pull_request) Successful in 11m7s
cascade / forgejo (pull_request_target) Has been skipped
cascade / debug (pull_request_target) Has been skipped
cascade / end-to-end (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 4s
2025-12-27 21:45:09 +00:00
Compare
aahlenst changed title from WIP: fix: evaluate jobs.<job_id>.container.volumes to fix: evaluate jobs.<job_id>.container.volumes 2025-12-27 22:10:35 +00:00
Author
Member

So, ready to review.

The test failures caught me off guard. I wasn't aware that make integration-test does not include go test -race -timeout 30m ./act/runner/.... Is that something we could add?

On a side note: it would probably be a good idea if we ran the test suite on a system with SELinux. There are code paths in the runner that check for the presence of SELinux. Some tests are failing right now with SELinux enabled. Running the test suite with Podman (without being root) would probably be good, too. I'd be happy to assist.

So, ready to review. The test failures caught me off guard. I wasn't aware that `make integration-test` does not include `go test -race -timeout 30m ./act/runner/...`. Is that something we could add? On a side note: it would probably be a good idea if we ran the test suite on a system with SELinux. There are code paths in the runner that check for the presence of SELinux. Some tests are failing right now with SELinux enabled. Running the test suite with Podman (without being root) would probably be good, too. I'd be happy to assist.
@ -158,0 +157,4 @@
interpolatedVolumes := make([]string, 0, len(container.Volumes))
for _, volume := range container.Volumes {
interpolatedVolumes = append(interpolatedVolumes, rc.ExprEval.Interpolate(ctx, volume))
}
Author
Member

The duplication is not great, but basically the entire method is almost a duplicate of GetServiceBindsAndMounts (and there are more cases like that). However, I don't yet feel comfortable unifying them.

The duplication is not great, but basically the entire method is almost a duplicate of `GetServiceBindsAndMounts` (and there are more cases like that). However, I don't yet feel comfortable unifying them.
mfenniak approved these changes 2025-12-27 22:24:23 +00:00
Owner

@aahlenst wrote in #1244 (comment):

The test failures caught me off guard. I wasn't aware that make integration-test does not include go test -race -timeout 30m ./act/runner/.... Is that something we could add?

I think this is a legacy of act being a separate repo recently, which was smashed together into the runner due to the high interdependence. Some work was done to unify the makefile, but some stuff was copied over into the CI workflows instead.

The ./act/runner/... tests are run in two docker environments in the CI with a matrix build which I'd want to preserve, so merging them would be increasing test resource utilization a bit by taking the 5m make integration-test and doing it twice. But I think it's a minor detail and possibly even one that is justified as a good integration test. So, I'd be 👍 on merging them and eliminating this hidden detail.

On a side note: it would probably be a good idea if we ran the test suite on a system with SELinux. There are code paths in the runner that check for the presence of SELinux. Some tests are failing right now with SELinux enabled. Running the test suite with Podman (without being root) would probably be good, too. I'd be happy to assist.

Adding Podman would be great, for sure. After the second Docker environment was added recently, adding a Podman test run was on my mind but I didn't complete it and I'm not planning to immediately get back to it, but I'd be happy to review it.

SELinux is an area where I know very little about, and I wasn't aware of that specialized case.

@aahlenst wrote in https://code.forgejo.org/forgejo/runner/pulls/1244#issuecomment-70909: > The test failures caught me off guard. I wasn't aware that `make integration-test` does not include `go test -race -timeout 30m ./act/runner/...`. Is that something we could add? I think this is a legacy of `act` being a separate repo recently, which was smashed together into the runner due to the high interdependence. Some work was done to unify the makefile, but some stuff was copied over into the CI workflows instead. The `./act/runner/...` tests are run in two docker environments in the CI with a matrix build which I'd want to preserve, so merging them would be increasing test resource utilization a bit by taking the 5m `make integration-test` and doing it twice. But I think it's a minor detail and possibly even one that is justified as a good integration test. So, I'd be 👍 on merging them and eliminating this hidden detail. > On a side note: it would probably be a good idea if we ran the test suite on a system with SELinux. There are code paths in the runner that check for the presence of SELinux. Some tests are failing right now with SELinux enabled. Running the test suite with Podman (without being root) would probably be good, too. I'd be happy to assist. Adding Podman would be great, for sure. After the second Docker environment was added recently, adding a Podman test run was on my mind but I didn't complete it and I'm not planning to immediately get back to it, but I'd be happy to review it. SELinux is an area where I know very little about, and I wasn't aware of that specialized case.
Contributor

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

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/801
Owner

Thanks for the contribution! 🙂

Thanks for the contribution! 🙂
Sign in to join this conversation.
No reviewers
No milestone
No project
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!1244
No description provided.