[PR #1834] [MERGED] Fix bug in processing jobs on platforms without Docker #2148

Closed
opened 2026-03-01 21:54:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1834
Author: @psa
Created: 6/1/2023
Status: Merged
Merged: 6/6/2023
Merged by: @mergify[bot]

Base: masterHead: numcpu-fix


📝 Commits (4)

  • 38ef843 Log incoming jobs.
  • e595267 Ensure that the parallel executor always uses at least one thread.
  • b9f7945 Use runtime.NumCPU for CPU counts.
  • 2b6ac7b Merge branch 'master' into numcpu-fix

📊 Changes

4 files changed (+56 additions, -8 deletions)

View changed files

📝 pkg/common/executor.go (+7 -0)
📝 pkg/common/executor_test.go (+11 -0)
📝 pkg/model/workflow.go (+1 -0)
📝 pkg/runner/runner.go (+37 -8)

📄 Description

The container.GetHostInfo() struct is returned empty on hosts without docker and this results in passing zero parallelism to the parallel executor.

Use Golang's inbuilt runtime.NumCPU() instead. This should be safe on Docker too.

I've also added a fair bit of debug logging to assist with debugging the struct passed to the runner. This is leftover from my original line of inquiry, but it seemed like useful code so I kept it in the change.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/1834 **Author:** [@psa](https://github.com/psa) **Created:** 6/1/2023 **Status:** ✅ Merged **Merged:** 6/6/2023 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `numcpu-fix` --- ### 📝 Commits (4) - [`38ef843`](https://github.com/nektos/act/commit/38ef8432f0c512f400859c28472b93d8e50425ce) Log incoming jobs. - [`e595267`](https://github.com/nektos/act/commit/e59526776cf742a3099b7f1527a3ba2e85419812) Ensure that the parallel executor always uses at least one thread. - [`b9f7945`](https://github.com/nektos/act/commit/b9f7945f9253d0b3557eafcd72fd88b6ed4c9db9) Use runtime.NumCPU for CPU counts. - [`2b6ac7b`](https://github.com/nektos/act/commit/2b6ac7b3589404e8d0283826a32cd0a5158be5d4) Merge branch 'master' into numcpu-fix ### 📊 Changes **4 files changed** (+56 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `pkg/common/executor.go` (+7 -0) 📝 `pkg/common/executor_test.go` (+11 -0) 📝 `pkg/model/workflow.go` (+1 -0) 📝 `pkg/runner/runner.go` (+37 -8) </details> ### 📄 Description The container.GetHostInfo() struct is returned empty on hosts without docker and this results in passing zero parallelism to the parallel executor. Use Golang's inbuilt runtime.NumCPU() instead. This should be safe on Docker too. I've also added a fair bit of debug logging to assist with debugging the struct passed to the runner. This is leftover from my original line of inquiry, but it seemed like useful code so I kept it in the change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:54:13 +03:00
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#2148
No description provided.