Compare commits

..

10 Commits

Author SHA1 Message Date
argoyle 60bec67023 Merge pull request 'fix(graph): stabilize debouncer tests with synctest fake clock' (#741) from fix-flaky-debouncer-test into main
Release / release (push) Successful in 1m15s
schemas / vulnerabilities (push) Successful in 2m43s
schemas / check-release (push) Successful in 4m22s
schemas / check (push) Successful in 6m22s
pre-commit / pre-commit (push) Successful in 12m20s
schemas / build (push) Successful in 9m21s
schemas / deploy-prod (push) Successful in 1m13s
Reviewed-on: #741
2026-02-25 12:49:10 +00:00
argoyle cc33c651cd fix(graph): stabilize debouncer tests with synctest fake clock
schemas / vulnerabilities (pull_request) Successful in 2m17s
schemas / check-release (pull_request) Successful in 4m9s
schemas / check (pull_request) Successful in 4m52s
pre-commit / pre-commit (pull_request) Successful in 9m43s
schemas / build (pull_request) Successful in 6m58s
schemas / deploy-prod (pull_request) Has been skipped
Replace real time.Sleep waits with testing/synctest fake clock to
eliminate CI flakiness caused by timer races on loaded machines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 13:25:18 +01:00
argoyle 38b4ab8ee2 Merge pull request 'chore(release): prepare for v0.9.5' (#740) from next-release into main
Release / release (push) Successful in 1m0s
schemas / vulnerabilities (push) Successful in 4m2s
Goreleaser / release (push) Successful in 5m8s
schemas / check-release (push) Successful in 6m38s
schemas / check (push) Successful in 8m59s
schemas / build (push) Successful in 6m0s
schemas / deploy-prod (push) Has been skipped
pre-commit / pre-commit (push) Successful in 8m14s
Reviewed-on: #740
2026-02-25 11:32:35 +00:00
releaser 1fa91ad573 chore(release): prepare for v0.9.5
schemas / vulnerabilities (pull_request) Successful in 2m48s
schemas / check-release (pull_request) Successful in 5m48s
schemas / check (pull_request) Successful in 5m48s
schemas / build (pull_request) Successful in 12m9s
schemas / deploy-prod (pull_request) Has been skipped
pre-commit / pre-commit (pull_request) Successful in 12m36s
2026-02-25 06:27:43 +00:00
releaser 7182ae2a11 chore(release): prepare for v0.9.5 2026-02-25 06:27:39 +00:00
renovate 19b7f0edb6 chore(deps): update node.js to 7fddd9d (#739)
Release / release (push) Successful in 1m36s
schemas / vulnerabilities (push) Successful in 3m25s
schemas / check-release (push) Successful in 5m10s
schemas / check (push) Successful in 6m21s
pre-commit / pre-commit (push) Successful in 11m40s
schemas / build (push) Successful in 6m36s
schemas / deploy-prod (push) Successful in 1m13s
2026-02-25 06:26:07 +00:00
renovate 0b68cadd24 chore(deps): update node.js to v24.14.0 (#735)
Release / release (push) Successful in 1m5s
schemas / vulnerabilities (push) Successful in 2m51s
schemas / check-release (push) Successful in 3m42s
schemas / check (push) Successful in 6m23s
pre-commit / pre-commit (push) Successful in 10m4s
schemas / build (push) Successful in 7m19s
schemas / deploy-prod (push) Successful in 1m11s
2026-02-25 00:28:09 +00:00
renovate 50087adeac chore(deps): update golang:1.26.0 docker digest to 9835fb4 (#736)
schemas / vulnerabilities (push) Successful in 2m38s
schemas / check (push) Successful in 4m25s
schemas / check-release (push) Successful in 4m34s
Release / release (push) Successful in 1m23s
pre-commit / pre-commit (push) Successful in 17m31s
schemas / build (push) Successful in 26m14s
schemas / deploy-prod (push) Successful in 1m16s
2026-02-24 22:44:21 +00:00
argoyle 03c903cf0e Merge pull request 'fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.256' (#733) from renovate/github.com-wundergraph-graphql-go-tools-v2-2.x into main
Release / release (push) Successful in 2m0s
schemas / vulnerabilities (push) Successful in 4m40s
schemas / check-release (push) Successful in 10m7s
schemas / check (push) Successful in 11m58s
schemas / build (push) Successful in 9m21s
schemas / deploy-prod (push) Successful in 2m12s
pre-commit / pre-commit (push) Successful in 24m26s
Reviewed-on: #733
2026-02-23 16:32:56 +00:00
renovate 59d0d40d4d fix(deps): update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.256
schemas / vulnerabilities (pull_request) Successful in 4m44s
schemas / check-release (pull_request) Successful in 10m55s
schemas / check (pull_request) Successful in 12m29s
pre-commit / pre-commit (pull_request) Successful in 20m0s
schemas / build (pull_request) Successful in 10m4s
schemas / deploy-prod (pull_request) Has been skipped
2026-02-23 16:07:55 +00:00
6 changed files with 58 additions and 34 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
{
"version": "v0.9.4"
"version": "v0.9.5"
}
+12
View File
@@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file.
## [0.9.5] - 2026-02-25
### 🐛 Bug Fixes
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.256
### ⚙️ Miscellaneous Tasks
- *(deps)* Update golang:1.26.0 docker digest to 9835fb4 (#736)
- *(deps)* Update node.js to v24.14.0 (#735)
- *(deps)* Update node.js to 7fddd9d (#739)
## [0.9.4] - 2026-02-23
### 🐛 Bug Fixes
+2 -2
View File
@@ -1,4 +1,4 @@
FROM amd64/golang:1.26.0@sha256:e7479dbd4918090d893b97245fd8c0bcf767677f8ede2e60e7fb2c2f38c94215 as modules
FROM amd64/golang:1.26.0@sha256:9835fb4f8aa06038ca460e300ee3cb8079d0802a1979724cdb455f5784448704 as modules
WORKDIR /build
ADD go.* /build
RUN go mod download
@@ -24,7 +24,7 @@ RUN GOOS=linux GOARCH=amd64 go build \
FROM scratch as export
COPY --from=build /build/coverage.txt /
FROM node:24.13.1-alpine@sha256:4f696fbf39f383c1e486030ba6b289a5d9af541642fc78ab197e584a113b9c03
FROM node:24.14.0-alpine@sha256:7fddd9ddeae8196abf4a3ef2de34e11f7b1a722119f91f28ddf1e99dcafdf114
ENV TZ Europe/Stockholm
# Install wgc CLI globally for Cosmo Router composition
+1 -1
View File
@@ -16,7 +16,7 @@ require (
github.com/sparetimecoders/goamqp v0.3.3
github.com/stretchr/testify v1.11.1
github.com/vektah/gqlparser/v2 v2.5.32
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.255
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.256
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.1
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.4
gitlab.com/unboundsoftware/eventsourced/pg v1.18.4
+2 -2
View File
@@ -198,8 +198,8 @@ github.com/wundergraph/astjson v1.1.0 h1:xORDosrZ87zQFJwNGe/HIHXqzpdHOFmqWgykCLV
github.com/wundergraph/astjson v1.1.0/go.mod h1:h12D/dxxnedtLzsKyBLK7/Oe4TAoGpRVC9nDpDrZSWw=
github.com/wundergraph/go-arena v1.1.0 h1:9+wSRkJAkA2vbYHp6s8tEGhPViRGQNGXqPHT0QzhdIc=
github.com/wundergraph/go-arena v1.1.0/go.mod h1:ROOysEHWJjLQ8FSfNxZCziagb7Qw2nXY3/vgKRh7eWw=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.255 h1:lN+D5OWay3U1mwtRlA+j7kJqP5ksKdRFMvYA+8XLJ1E=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.255/go.mod h1:gfmmrPd2khZONmwYE8RIfnGjwIG+RqL52jYiBzcUST8=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.256 h1:IlLfd3qL4THUkxSXsVRwcDNCAPNXqDrflMI0Hbvlb/Q=
github.com/wundergraph/graphql-go-tools/v2 v2.0.0-rc.256/go.mod h1:gfmmrPd2khZONmwYE8RIfnGjwIG+RqL52jYiBzcUST8=
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.1 h1:X6269JoAzHIKCVmtgMHZH3m7xOpACSp37ca3eODe9iU=
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.1/go.mod h1:EAs0d6Eh0aDiQkUJlSWErHqgHFQdxx0e8I7aG/2FarY=
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.4 h1:+yZkhi9/sTyBEN5vJTfvycyXgGrm07QKGSh3jiWiQdM=
+40 -28
View File
@@ -3,6 +3,7 @@ package graph
import (
"sync/atomic"
"testing"
"testing/synctest"
"time"
"github.com/stretchr/testify/assert"
@@ -10,48 +11,59 @@ import (
)
func TestDebouncer_Coalesces(t *testing.T) {
d := NewDebouncer(50 * time.Millisecond)
var calls atomic.Int32
synctest.Test(t, func(t *testing.T) {
d := NewDebouncer(50 * time.Millisecond)
var calls atomic.Int32
// Fire 10 rapid calls for the same key — only the last should execute.
for range 10 {
d.Debounce("key1", func() {
calls.Add(1)
})
}
// Fire 10 rapid calls for the same key — only the last should execute.
for range 10 {
d.Debounce("key1", func() {
calls.Add(1)
})
}
// Wait for the debounce delay plus some margin.
time.Sleep(150 * time.Millisecond)
// Advance fake clock past the debounce delay and let goroutines settle.
time.Sleep(50 * time.Millisecond)
synctest.Wait()
assert.Equal(t, int32(1), calls.Load(), "rapid calls should coalesce into a single execution")
assert.Equal(t, int32(1), calls.Load(), "rapid calls should coalesce into a single execution")
})
}
func TestDebouncer_DifferentKeys(t *testing.T) {
d := NewDebouncer(50 * time.Millisecond)
var calls atomic.Int32
synctest.Test(t, func(t *testing.T) {
d := NewDebouncer(50 * time.Millisecond)
var calls atomic.Int32
d.Debounce("key-a", func() { calls.Add(1) })
d.Debounce("key-b", func() { calls.Add(1) })
d.Debounce("key-c", func() { calls.Add(1) })
d.Debounce("key-a", func() { calls.Add(1) })
d.Debounce("key-b", func() { calls.Add(1) })
d.Debounce("key-c", func() { calls.Add(1) })
time.Sleep(150 * time.Millisecond)
time.Sleep(50 * time.Millisecond)
synctest.Wait()
assert.Equal(t, int32(3), calls.Load(), "different keys should fire independently")
assert.Equal(t, int32(3), calls.Load(), "different keys should fire independently")
})
}
func TestDebouncer_TimerReset(t *testing.T) {
d := NewDebouncer(100 * time.Millisecond)
var value atomic.Int32
synctest.Test(t, func(t *testing.T) {
d := NewDebouncer(100 * time.Millisecond)
var value atomic.Int32
// First call sets value to 1.
d.Debounce("key", func() { value.Store(1) })
// First call sets value to 1.
d.Debounce("key", func() { value.Store(1) })
// Wait 60ms (less than the 100ms delay), then replace with value 2.
time.Sleep(60 * time.Millisecond)
d.Debounce("key", func() { value.Store(2) })
// Advance 60ms (less than the 100ms delay) — first timer hasn't fired.
time.Sleep(60 * time.Millisecond)
// At 60ms the first timer hasn't fired yet. Wait for the second timer.
time.Sleep(150 * time.Millisecond)
// Replace with value 2 — resets the timer to fire at 60+100 = 160ms.
d.Debounce("key", func() { value.Store(2) })
require.Equal(t, int32(2), value.Load(), "later call should replace the earlier one")
// Advance another 100ms (total 160ms) to fire the reset timer.
time.Sleep(100 * time.Millisecond)
synctest.Wait()
require.Equal(t, int32(2), value.Load(), "later call should replace the earlier one")
})
}