Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a66f0000a | |||
| 34b84644b5 | |||
| 01a5e1ea67 | |||
| be9a64a41b |
@@ -30,7 +30,7 @@ repos:
|
|||||||
- id: go-test
|
- id: go-test
|
||||||
- id: gofumpt
|
- id: gofumpt
|
||||||
- repo: https://github.com/golangci/golangci-lint
|
- repo: https://github.com/golangci/golangci-lint
|
||||||
rev: v2.12.0
|
rev: v2.12.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: golangci-lint-full
|
- id: golangci-lint-full
|
||||||
- repo: https://github.com/gitleaks/gitleaks
|
- repo: https://github.com/gitleaks/gitleaks
|
||||||
|
|||||||
@@ -2,6 +2,41 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [0.9.7] - 2026-05-05
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- *(deps)* Update module gitlab.com/unboundsoftware/eventsourced/pg to v1.18.6 (#790)
|
||||||
|
- *(deps)* Update module github.com/alecthomas/kong to v1.15.0 (#791)
|
||||||
|
- *(deps)* Update opentelemetry-go monorepo (#793)
|
||||||
|
- *(deps)* Update module go.opentelemetry.io/contrib/bridges/otelslog to v0.18.0 (#797)
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.268 (#798)
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.269 (#802)
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0-rc.270 (#804)
|
||||||
|
- *(deps)* Update module github.com/auth0/go-jwt-middleware/v3 to v3.1.0 (#805)
|
||||||
|
- *(deps)* Update module golang.org/x/crypto to v0.50.0 (#807)
|
||||||
|
- *(deps)* Update module gitlab.com/unboundsoftware/eventsourced/pg to v1.18.7 (#810)
|
||||||
|
- *(deps)* Update module github.com/pressly/goose/v3 to v3.27.1 (#814)
|
||||||
|
- *(deps)* Update module github.com/vektah/gqlparser/v2 to v2.5.33 (#816)
|
||||||
|
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.90 (#818)
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.0.0 (#820)
|
||||||
|
- *(deps)* Update module github.com/wundergraph/graphql-go-tools/v2 to v2.1.0 (#823)
|
||||||
|
|
||||||
|
### 🎨 Styling
|
||||||
|
|
||||||
|
- Apply gofumpt formatting (#828)
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- *(deps)* Update golang:1.26.1 docker digest to 5ba1126 (#795)
|
||||||
|
- *(deps)* Update golang docker tag to v1.26.2 (#800)
|
||||||
|
- *(deps)* Update node.js to 8510330 (#809)
|
||||||
|
- *(deps)* Update node.js to v24.15.0 (#811)
|
||||||
|
- *(deps)* Update golang:1.26.2 docker digest to e1203b8 (#812)
|
||||||
|
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.25.0 (#822)
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.12.0 (#826)
|
||||||
|
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.12.1 (#827)
|
||||||
|
|
||||||
## [0.9.6] - 2026-03-29
|
## [0.9.6] - 2026-03-29
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|||||||
+2
-1
@@ -109,7 +109,8 @@ func GenerateCosmoRouterConfigWithExecutor(subGraphs []*model.SubGraph, executor
|
|||||||
// Execute wgc router compose
|
// Execute wgc router compose
|
||||||
// wgc is installed globally in the Docker image
|
// wgc is installed globally in the Docker image
|
||||||
outputFile := filepath.Join(tmpDir, "config.json")
|
outputFile := filepath.Join(tmpDir, "config.json")
|
||||||
output, err := executor.Execute("wgc", "router", "compose",
|
output, err := executor.Execute(
|
||||||
|
"wgc", "router", "compose",
|
||||||
"--input", inputFile,
|
"--input", inputFile,
|
||||||
"--out", outputFile,
|
"--out", outputFile,
|
||||||
"--suppress-warnings",
|
"--suppress-warnings",
|
||||||
|
|||||||
@@ -178,7 +178,8 @@ func (r *mutationResolver) UpdateSubGraph(ctx context.Context, input model.Input
|
|||||||
// same org+ref only trigger one config generation.
|
// same org+ref only trigger one config generation.
|
||||||
r.Debouncer.Debounce(orgId+":"+input.Ref, func() {
|
r.Debouncer.Debounce(orgId+":"+input.Ref, func() {
|
||||||
services, lastUpdate := r.Cache.Services(orgId, input.Ref, "")
|
services, lastUpdate := r.Cache.Services(orgId, input.Ref, "")
|
||||||
r.Logger.Info("Publishing schema update after subgraph change",
|
r.Logger.Info(
|
||||||
|
"Publishing schema update after subgraph change",
|
||||||
"ref", input.Ref,
|
"ref", input.Ref,
|
||||||
"orgId", orgId,
|
"orgId", orgId,
|
||||||
"lastUpdate", lastUpdate,
|
"lastUpdate", lastUpdate,
|
||||||
@@ -210,7 +211,8 @@ func (r *mutationResolver) UpdateSubGraph(ctx context.Context, input model.Input
|
|||||||
CosmoRouterConfig: &cosmoConfig,
|
CosmoRouterConfig: &cosmoConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
r.Logger.Info("Publishing schema update to subscribers",
|
r.Logger.Info(
|
||||||
|
"Publishing schema update to subscribers",
|
||||||
"ref", update.Ref,
|
"ref", update.Ref,
|
||||||
"id", update.ID,
|
"id", update.ID,
|
||||||
"subGraphsCount", len(update.SubGraphs),
|
"subGraphsCount", len(update.SubGraphs),
|
||||||
@@ -246,7 +248,8 @@ func (r *queryResolver) Supergraph(ctx context.Context, ref string, isAfter *str
|
|||||||
orgId := middleware.OrganizationFromContext(ctx)
|
orgId := middleware.OrganizationFromContext(ctx)
|
||||||
userId := middleware.UserFromContext(ctx)
|
userId := middleware.UserFromContext(ctx)
|
||||||
|
|
||||||
r.Logger.Info("Supergraph query",
|
r.Logger.Info(
|
||||||
|
"Supergraph query",
|
||||||
"ref", ref,
|
"ref", ref,
|
||||||
"orgId", orgId,
|
"orgId", orgId,
|
||||||
"userId", userId,
|
"userId", userId,
|
||||||
@@ -312,7 +315,8 @@ func (r *queryResolver) LatestSchema(ctx context.Context, ref string) (*model.Sc
|
|||||||
orgId := middleware.OrganizationFromContext(ctx)
|
orgId := middleware.OrganizationFromContext(ctx)
|
||||||
userId := middleware.UserFromContext(ctx)
|
userId := middleware.UserFromContext(ctx)
|
||||||
|
|
||||||
r.Logger.Info("LatestSchema query",
|
r.Logger.Info(
|
||||||
|
"LatestSchema query",
|
||||||
"ref", ref,
|
"ref", ref,
|
||||||
"orgId", orgId,
|
"orgId", orgId,
|
||||||
"userId", userId,
|
"userId", userId,
|
||||||
@@ -342,7 +346,8 @@ func (r *queryResolver) LatestSchema(ctx context.Context, ref string) (*model.Sc
|
|||||||
|
|
||||||
// Get current services and schema
|
// Get current services and schema
|
||||||
services, lastUpdate := r.Cache.Services(orgId, ref, "")
|
services, lastUpdate := r.Cache.Services(orgId, ref, "")
|
||||||
r.Logger.Info("Fetching latest schema",
|
r.Logger.Info(
|
||||||
|
"Fetching latest schema",
|
||||||
"ref", ref,
|
"ref", ref,
|
||||||
"orgId", orgId,
|
"orgId", orgId,
|
||||||
"lastUpdate", lastUpdate,
|
"lastUpdate", lastUpdate,
|
||||||
@@ -381,7 +386,8 @@ func (r *queryResolver) LatestSchema(ctx context.Context, ref string) (*model.Sc
|
|||||||
CosmoRouterConfig: &cosmoConfig,
|
CosmoRouterConfig: &cosmoConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
r.Logger.Info("Latest schema fetched",
|
r.Logger.Info(
|
||||||
|
"Latest schema fetched",
|
||||||
"ref", update.Ref,
|
"ref", update.Ref,
|
||||||
"id", update.ID,
|
"id", update.ID,
|
||||||
"subGraphsCount", len(update.SubGraphs),
|
"subGraphsCount", len(update.SubGraphs),
|
||||||
@@ -395,7 +401,8 @@ func (r *queryResolver) LatestSchema(ctx context.Context, ref string) (*model.Sc
|
|||||||
func (r *subscriptionResolver) SchemaUpdates(ctx context.Context, ref string) (<-chan *model.SchemaUpdate, error) {
|
func (r *subscriptionResolver) SchemaUpdates(ctx context.Context, ref string) (<-chan *model.SchemaUpdate, error) {
|
||||||
orgId := middleware.OrganizationFromContext(ctx)
|
orgId := middleware.OrganizationFromContext(ctx)
|
||||||
|
|
||||||
r.Logger.Info("SchemaUpdates subscription started",
|
r.Logger.Info(
|
||||||
|
"SchemaUpdates subscription started",
|
||||||
"ref", ref,
|
"ref", ref,
|
||||||
"orgId", orgId,
|
"orgId", orgId,
|
||||||
)
|
)
|
||||||
@@ -412,7 +419,8 @@ func (r *subscriptionResolver) SchemaUpdates(ctx context.Context, ref string) (<
|
|||||||
// Send initial state immediately
|
// Send initial state immediately
|
||||||
go func() {
|
go func() {
|
||||||
services, lastUpdate := r.Cache.Services(orgId, ref, "")
|
services, lastUpdate := r.Cache.Services(orgId, ref, "")
|
||||||
r.Logger.Info("Preparing initial schema update",
|
r.Logger.Info(
|
||||||
|
"Preparing initial schema update",
|
||||||
"ref", ref,
|
"ref", ref,
|
||||||
"orgId", orgId,
|
"orgId", orgId,
|
||||||
"lastUpdate", lastUpdate,
|
"lastUpdate", lastUpdate,
|
||||||
@@ -444,7 +452,8 @@ func (r *subscriptionResolver) SchemaUpdates(ctx context.Context, ref string) (<
|
|||||||
CosmoRouterConfig: &cosmoConfig,
|
CosmoRouterConfig: &cosmoConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
r.Logger.Info("Sending initial schema update",
|
r.Logger.Info(
|
||||||
|
"Sending initial schema update",
|
||||||
"ref", update.Ref,
|
"ref", update.Ref,
|
||||||
"id", update.ID,
|
"id", update.ID,
|
||||||
"subGraphsCount", len(update.SubGraphs),
|
"subGraphsCount", len(update.SubGraphs),
|
||||||
|
|||||||
+2
-1
@@ -9,7 +9,8 @@ const charset = "abcdefghijklmnopqrstuvwxyz" +
|
|||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||||
|
|
||||||
var seededRand *rand.Rand = rand.New(
|
var seededRand *rand.Rand = rand.New(
|
||||||
rand.NewSource(time.Now().UnixNano()))
|
rand.NewSource(time.Now().UnixNano()),
|
||||||
|
)
|
||||||
|
|
||||||
func StringWithCharset(length int, charset string) string {
|
func StringWithCharset(length int, charset string) string {
|
||||||
b := make([]byte, length)
|
b := make([]byte, length)
|
||||||
|
|||||||
Reference in New Issue
Block a user