diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a2423b..8cda372 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.7.1] - 2026-05-22 + +### Fixed + +- `workflows`: Fixed Windows builds by using platform-specific task runner shutdown signals. + ## [0.7.0] - 2026-05-22 ### Added @@ -112,8 +118,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added support for Tilebox Observability, including logging and tracing helpers. - Added examples for using the library. -[Unreleased]: https://github.com/tilebox/tilebox-go/compare/v0.7.0...HEAD -[0.6.0]: https://github.com/tilebox/tilebox-go/compare/v0.6.0...v0.7.0 +[Unreleased]: https://github.com/tilebox/tilebox-go/compare/v0.7.1...HEAD +[0.7.1]: https://github.com/tilebox/tilebox-go/compare/v0.7.0...v0.7.1 +[0.7.0]: https://github.com/tilebox/tilebox-go/compare/v0.6.0...v0.7.0 [0.6.0]: https://github.com/tilebox/tilebox-go/compare/v0.5.0...v0.6.0 [0.5.0]: https://github.com/tilebox/tilebox-go/compare/v0.4.0...v0.5.0 [0.4.0]: https://github.com/tilebox/tilebox-go/compare/v0.3.2...v0.4.0 diff --git a/workflows/v1/runner.go b/workflows/v1/runner.go index cd46b8f..23ef485 100644 --- a/workflows/v1/runner.go +++ b/workflows/v1/runner.go @@ -12,7 +12,6 @@ import ( "reflect" "strings" "sync" - "syscall" "time" "github.com/avast/retry-go/v4" @@ -196,7 +195,7 @@ func (t *TaskRunner) RunAll(ctx context.Context) { func (t *TaskRunner) run(ctx context.Context, stopWhenIdling bool) { // Catch signals to gracefully shutdown - ctxSignal, stop := signal.NotifyContext(context.Background(), syscall.SIGTERM, syscall.SIGINT, syscall.SIGTSTP, syscall.SIGQUIT) + ctxSignal, stop := signal.NotifyContext(context.Background(), runnerShutdownSignals()...) defer stop() identifiers := make([]*workflowsv1.TaskIdentifier, 0, len(t.taskDefinitions)) diff --git a/workflows/v1/signals_other.go b/workflows/v1/signals_other.go new file mode 100644 index 0000000..1d6d6f2 --- /dev/null +++ b/workflows/v1/signals_other.go @@ -0,0 +1,9 @@ +//go:build !unix && !windows + +package workflows + +import "os" + +func runnerShutdownSignals() []os.Signal { + return []os.Signal{os.Interrupt} +} diff --git a/workflows/v1/signals_unix.go b/workflows/v1/signals_unix.go new file mode 100644 index 0000000..966eecc --- /dev/null +++ b/workflows/v1/signals_unix.go @@ -0,0 +1,12 @@ +//go:build unix + +package workflows + +import ( + "os" + "syscall" +) + +func runnerShutdownSignals() []os.Signal { + return []os.Signal{syscall.SIGTERM, syscall.SIGINT, syscall.SIGTSTP, syscall.SIGQUIT} +} diff --git a/workflows/v1/signals_windows.go b/workflows/v1/signals_windows.go new file mode 100644 index 0000000..bef9353 --- /dev/null +++ b/workflows/v1/signals_windows.go @@ -0,0 +1,12 @@ +//go:build windows + +package workflows + +import ( + "os" + "syscall" +) + +func runnerShutdownSignals() []os.Signal { + return []os.Signal{syscall.SIGTERM, syscall.SIGINT} +}