Commit Graph

11 Commits

Author SHA1 Message Date
silverwind
4fdf9ab904 Fix executor_test.go: ErrorIs arg order, wrong target, and data races
- TestNewParallelExecutorFailed: fix assert.ErrorIs argument order
- TestNewParallelExecutorCanceled: check for context.Canceled (not the
  executor error) since NewParallelExecutor returns ctx.Err() when
  context is cancelled; use atomic counter to fix data race
- TestNewParallelExecutor: use atomic counters to fix data race with
  concurrent goroutines

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:06:05 +01:00
Christopher Homberger
bffc600775 fixes 2026-02-22 21:12:25 +01:00
Christopher Homberger
a27473e6a8 fixes 2026-02-22 21:04:33 +01:00
Christopher Homberger
a77f10683d assert => require 2026-02-22 21:00:42 +01:00
Christopher Homberger
d187ac2fc1 auto adjust code 2026-02-22 20:58:46 +01:00
Casey Lee
7172fc31d1 chore: upgrade dependencies (#2589)
* chore: upgrade dependencies

* fix: linter errors

* chore: bump version of golangci-lint

* chore: go mod tidy

* fix: failing test

* fix: update version of upload-artifact to v4

* chore: format test output with gotestfmt

* fix: typo in test exec

* fix: failing tests

* fix: windows unit test execution

* fix: windows unit test execution

* fix: whitespace
2024-12-24 13:12:24 -08:00
psa
3ac2b726f2 Fix bug in processing jobs on platforms without Docker (#1834)
* Log incoming jobs.

Log the full contents of the job protobuf to make debugging jobs easier

* Ensure that the parallel executor always uses at least one thread.

The caller may mis-calculate the number of CPUs as zero, in which case
ensure that at least one thread is spawned.

* Use runtime.NumCPU for CPU counts.

For hosts without docker, GetHostInfo() returns a blank struct which
has zero CPUs and causes downstream trouble.

---------

Co-authored-by: Paul Armstrong <psa@users.noreply.gitea.com>
Co-authored-by: Jason Song <i@wolfogre.com>
2023-06-06 03:00:54 +00:00
Markus Wolf
18792f9620 feat: run jobs in parallel (#1003)
* feat: run jobs in parallel

This changes fixes and restructures the parallel execution of jobs.
The previous changes limiting the parallel execution did break this
and allowed only one job in parallel.

While we run #CPU jobs in parallel now, the jobs added per job-matrix
add to this. So we might over-commit to the capacity, but at least
it is limited.

* fix: correctly build job pipeline

The job pipeline should just append all required pipeline steps.
The parallelism will be handled by the ParallelExecutor and we
shouldn't handle it during building the pipelines.

Also this adds a test, that the ParallelExecutor does run
a limited amount of parallel goroutines.

* test: correct test implementation

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-25 18:47:16 +00:00
KADOTA, Kyohei
010e459e95 Clean the repository cache if it is in incomplete state (#595) 2021-04-06 06:43:02 -07:00
Casey Lee
532af98aef successfully able to run simple workflows
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:25 -05:00
Casey Lee
8c49ba0cec initial load of yaml working 2020-02-04 16:38:41 -08:00