Skip to content

Commit 69f0446

Browse files
Fix windows builds (#208)
1 parent 6255be4 commit 69f0446

5 files changed

Lines changed: 43 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.7.1] - 2026-05-22
11+
12+
### Fixed
13+
14+
- `workflows`: Fixed Windows builds by using platform-specific task runner shutdown signals.
15+
1016
## [0.7.0] - 2026-05-22
1117

1218
### Added
@@ -112,8 +118,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
112118
- Added support for Tilebox Observability, including logging and tracing helpers.
113119
- Added examples for using the library.
114120

115-
[Unreleased]: https://github.com/tilebox/tilebox-go/compare/v0.7.0...HEAD
116-
[0.6.0]: https://github.com/tilebox/tilebox-go/compare/v0.6.0...v0.7.0
121+
[Unreleased]: https://github.com/tilebox/tilebox-go/compare/v0.7.1...HEAD
122+
[0.7.1]: https://github.com/tilebox/tilebox-go/compare/v0.7.0...v0.7.1
123+
[0.7.0]: https://github.com/tilebox/tilebox-go/compare/v0.6.0...v0.7.0
117124
[0.6.0]: https://github.com/tilebox/tilebox-go/compare/v0.5.0...v0.6.0
118125
[0.5.0]: https://github.com/tilebox/tilebox-go/compare/v0.4.0...v0.5.0
119126
[0.4.0]: https://github.com/tilebox/tilebox-go/compare/v0.3.2...v0.4.0

workflows/v1/runner.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"reflect"
1313
"strings"
1414
"sync"
15-
"syscall"
1615
"time"
1716

1817
"github.com/avast/retry-go/v4"
@@ -196,7 +195,7 @@ func (t *TaskRunner) RunAll(ctx context.Context) {
196195

197196
func (t *TaskRunner) run(ctx context.Context, stopWhenIdling bool) {
198197
// Catch signals to gracefully shutdown
199-
ctxSignal, stop := signal.NotifyContext(context.Background(), syscall.SIGTERM, syscall.SIGINT, syscall.SIGTSTP, syscall.SIGQUIT)
198+
ctxSignal, stop := signal.NotifyContext(context.Background(), runnerShutdownSignals()...)
200199
defer stop()
201200

202201
identifiers := make([]*workflowsv1.TaskIdentifier, 0, len(t.taskDefinitions))

workflows/v1/signals_other.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//go:build !unix && !windows
2+
3+
package workflows
4+
5+
import "os"
6+
7+
func runnerShutdownSignals() []os.Signal {
8+
return []os.Signal{os.Interrupt}
9+
}

workflows/v1/signals_unix.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//go:build unix
2+
3+
package workflows
4+
5+
import (
6+
"os"
7+
"syscall"
8+
)
9+
10+
func runnerShutdownSignals() []os.Signal {
11+
return []os.Signal{syscall.SIGTERM, syscall.SIGINT, syscall.SIGTSTP, syscall.SIGQUIT}
12+
}

workflows/v1/signals_windows.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//go:build windows
2+
3+
package workflows
4+
5+
import (
6+
"os"
7+
"syscall"
8+
)
9+
10+
func runnerShutdownSignals() []os.Signal {
11+
return []os.Signal{syscall.SIGTERM, syscall.SIGINT}
12+
}

0 commit comments

Comments
 (0)