1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-16 18:01:34 +00:00
forgejo-runner/act/runner
Earl Warren e049c82d9c
chore: cancel context used in CI when running workflows (#831)
the context obtained from context.Background() may otherwise survive the test instead. It is equivalent to t.Context() which is only available in go >= v1.24

---

It is suspected to be the cause of

```
2025-08-10T13:01:08.5866723Z [services/Reproduction of failing Services interpolation] [DEBUG] Writing entry to tarball workflow/event.json len:2
2025-08-10T13:01:08.5866772Z [services/Reproduction of failing Services interpolation] [DEBUG] Writing entry to tarball workflow/envs.txt len:0
2025-08-10T13:01:08.5866818Z [services/Reproduction of failing Services interpolation] [DEBUG] Extracting content to '/var/run/act/'
2025-08-10T13:01:08.5866868Z [services/Reproduction of failing Services interpolation] service [postgres]: container health check a6b5d1443dd78f3d3aa244aeccabe72542f1c1ee33200f74a9ea33ae736f01f0 (code.forgejo.org/oci/postgres:16) is starting, waiting 10s
2025-08-10T13:01:08.5866919Z panic: test timed out after 10m0s
2025-08-10T13:01:08.5866984Z 	running tests:
2025-08-10T13:01:08.5867024Z 		TestRunner_RunWithService (2s)
2025-08-10T13:01:08.5867081Z
2025-08-10T13:01:08.5867142Z goroutine 55693 [running]:
2025-08-10T13:01:08.5867206Z testing.(*M).startAlarm.func1()
2025-08-10T13:01:08.5867250Z 	/go_path/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.12.linux-amd64/src/testing/testing.go:2373 +0x385
2025-08-10T13:01:08.5867300Z created by time.goFunc
2025-08-10T13:01:08.5867368Z 	/go_path/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.12.linux-amd64/src/time/sleep.go:215 +0x2d
...
2025-08-10T13:01:08.5878289Z goroutine 55692 [select]:
2025-08-10T13:01:08.5878350Z code.forgejo.org/forgejo/runner/v9/act/runner.waitForServiceContainer({0xf12e50, 0xc0006bbe30}, {0xf1e120, 0xc0003643c0})
2025-08-10T13:01:08.5878402Z 	/home/debian/.cache/act/7ffa26f4231b52fa/hostexecutor/act/runner/run_context.go:757 +0xd7
2025-08-10T13:01:08.5878460Z code.forgejo.org/forgejo/runner/v9/act/runner.(*RunContext).waitForServiceContainers.func1.1({0xf12e50?, 0xc0006bbe30?})
2025-08-10T13:01:08.5878524Z 	/home/debian/.cache/act/7ffa26f4231b52fa/hostexecutor/act/runner/run_context.go:770 +0x25
2025-08-10T13:01:08.5878592Z code.forgejo.org/forgejo/runner/v9/act/runner.(*RunContext).waitForServiceContainers.func1.NewParallelExecutor.2.1(0xc00015a5b0, 0xc00015a700)
2025-08-10T13:01:08.5878684Z 	/home/debian/.cache/act/7ffa26f4231b52fa/hostexecutor/act/common/executor.go:107 +0x52
2025-08-10T13:01:08.5878729Z created by code.forgejo.org/forgejo/runner/v9/act/runner.(*RunContext).waitForServiceContainers.func1.NewParallelExecutor.2 in goroutine 55682
2025-08-10T13:01:08.5878777Z 	/home/debian/.cache/act/7ffa26f4231b52fa/hostexecutor/act/common/executor.go:105 +0xf4
2025-08-10T13:01:08.5878821Z

...
```

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/831): <!--number 831 --><!--line 0 --><!--description Y2hvcmU6IGNhbmNlbCBjb250ZXh0IHVzZWQgaW4gQ0kgd2hlbiBydW5uaW5nIHdvcmtmbG93cyBbc2tpcCBjYXNjYWRlXQ==-->chore: cancel context used in CI when running workflows [skip cascade]<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/831
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-08-10 15:10:30 +00:00
..
hashfiles [RDNF #11] fix: skipped jobs have no result & fix: favor command-line over files & chore: fix some comments (#143) 2025-06-09 10:25:43 +00:00
res Add super-linter + fix lint issues (#650) 2021-05-03 09:52:03 -07:00
testdata test: fix failures caused by node24 usage in hello-world-javascript-action [skip cascade] (#830) 2025-08-10 12:03:50 +00:00
action.go fix: log the URL of the action when it fails schema validation (#810) 2025-08-04 13:20:22 +00:00
action_cache.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
action_cache_offline_mode.go feat: offline mode for new action cache (#2173) 2025-04-12 14:03:12 +00:00
action_cache_test.go chore(tests): add coverage for ./pkg/runner (#202) 2025-07-28 06:18:46 +00:00
action_composite.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
action_test.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
command.go feat: log parsed commands and step summary (#824) 2025-08-07 21:03:44 +00:00
command_test.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
container_mock_test.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
expression.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
expression_test.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
job_executor.go fix: longer timeouts on job cleanup without waiting (v2) (#798) 2025-08-03 07:01:46 +00:00
job_executor_test.go fix: log the URL of the action when it fails schema validation (#810) 2025-08-04 13:20:22 +00:00
local_repository_cache.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
logger.go fix: valueMasker concurrent map write (#825) 2025-08-07 21:36:28 +00:00
lxc-helpers-lib.sh upgrade lxc-helpers (#806) 2025-08-04 08:06:31 +00:00
lxc-helpers.sh chore(upgrade): sync lxc-helpers v1.0.3 2025-01-29 10:30:12 +01:00
reusable_workflow.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
run_context.go chore: run_context: add GITHUB_RUN_ATTEMPT (#2458) (#817) 2025-08-07 08:02:28 +00:00
run_context_test.go feat: wait for services to be healthy before starting a job (#805) 2025-08-07 04:36:26 +00:00
runner.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
runner_test.go chore: cancel context used in CI when running workflows (#831) 2025-08-10 15:10:30 +00:00
step.go feat: log parsed commands and step summary (#824) 2025-08-07 21:03:44 +00:00
step_action_local.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
step_action_local_test.go feat: log parsed commands and step summary (#824) 2025-08-07 21:03:44 +00:00
step_action_remote.go fix: log the URL of the action when it fails schema validation (#810) 2025-08-04 13:20:22 +00:00
step_action_remote_test.go feat: log parsed commands and step summary (#824) 2025-08-07 21:03:44 +00:00
step_docker.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
step_docker_test.go feat: log parsed commands and step summary (#824) 2025-08-07 21:03:44 +00:00
step_factory.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
step_factory_test.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
step_run.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
step_run_test.go feat: log parsed commands and step summary (#824) 2025-08-07 21:03:44 +00:00
step_test.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00