Compare commits

..

1 Commits

Author SHA1 Message Date
renovate 5ac7b37a69 chore(deps): update pre-commit hook golangci/golangci-lint to v2.12.1
renovate/stability-days Updates have met minimum release age requirement
schemas / check (pull_request) Failing after 1m55s
schemas / vulnerabilities (pull_request) Successful in 1m52s
schemas / check-release (pull_request) Successful in 2m49s
schemas / build (pull_request) Has been skipped
schemas / deploy-prod (pull_request) Has been skipped
pre-commit / pre-commit (pull_request) Failing after 6m36s
2026-05-04 16:10:43 +00:00
3 changed files with 11 additions and 22 deletions
+1 -2
View File
@@ -109,8 +109,7 @@ func GenerateCosmoRouterConfigWithExecutor(subGraphs []*model.SubGraph, executor
// Execute wgc router compose
// wgc is installed globally in the Docker image
outputFile := filepath.Join(tmpDir, "config.json")
output, err := executor.Execute(
"wgc", "router", "compose",
output, err := executor.Execute("wgc", "router", "compose",
"--input", inputFile,
"--out", outputFile,
"--suppress-warnings",
+9 -18
View File
@@ -178,8 +178,7 @@ func (r *mutationResolver) UpdateSubGraph(ctx context.Context, input model.Input
// same org+ref only trigger one config generation.
r.Debouncer.Debounce(orgId+":"+input.Ref, func() {
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,
"orgId", orgId,
"lastUpdate", lastUpdate,
@@ -211,8 +210,7 @@ func (r *mutationResolver) UpdateSubGraph(ctx context.Context, input model.Input
CosmoRouterConfig: &cosmoConfig,
}
r.Logger.Info(
"Publishing schema update to subscribers",
r.Logger.Info("Publishing schema update to subscribers",
"ref", update.Ref,
"id", update.ID,
"subGraphsCount", len(update.SubGraphs),
@@ -248,8 +246,7 @@ func (r *queryResolver) Supergraph(ctx context.Context, ref string, isAfter *str
orgId := middleware.OrganizationFromContext(ctx)
userId := middleware.UserFromContext(ctx)
r.Logger.Info(
"Supergraph query",
r.Logger.Info("Supergraph query",
"ref", ref,
"orgId", orgId,
"userId", userId,
@@ -315,8 +312,7 @@ func (r *queryResolver) LatestSchema(ctx context.Context, ref string) (*model.Sc
orgId := middleware.OrganizationFromContext(ctx)
userId := middleware.UserFromContext(ctx)
r.Logger.Info(
"LatestSchema query",
r.Logger.Info("LatestSchema query",
"ref", ref,
"orgId", orgId,
"userId", userId,
@@ -346,8 +342,7 @@ func (r *queryResolver) LatestSchema(ctx context.Context, ref string) (*model.Sc
// Get current services and schema
services, lastUpdate := r.Cache.Services(orgId, ref, "")
r.Logger.Info(
"Fetching latest schema",
r.Logger.Info("Fetching latest schema",
"ref", ref,
"orgId", orgId,
"lastUpdate", lastUpdate,
@@ -386,8 +381,7 @@ func (r *queryResolver) LatestSchema(ctx context.Context, ref string) (*model.Sc
CosmoRouterConfig: &cosmoConfig,
}
r.Logger.Info(
"Latest schema fetched",
r.Logger.Info("Latest schema fetched",
"ref", update.Ref,
"id", update.ID,
"subGraphsCount", len(update.SubGraphs),
@@ -401,8 +395,7 @@ func (r *queryResolver) LatestSchema(ctx context.Context, ref string) (*model.Sc
func (r *subscriptionResolver) SchemaUpdates(ctx context.Context, ref string) (<-chan *model.SchemaUpdate, error) {
orgId := middleware.OrganizationFromContext(ctx)
r.Logger.Info(
"SchemaUpdates subscription started",
r.Logger.Info("SchemaUpdates subscription started",
"ref", ref,
"orgId", orgId,
)
@@ -419,8 +412,7 @@ func (r *subscriptionResolver) SchemaUpdates(ctx context.Context, ref string) (<
// Send initial state immediately
go func() {
services, lastUpdate := r.Cache.Services(orgId, ref, "")
r.Logger.Info(
"Preparing initial schema update",
r.Logger.Info("Preparing initial schema update",
"ref", ref,
"orgId", orgId,
"lastUpdate", lastUpdate,
@@ -452,8 +444,7 @@ func (r *subscriptionResolver) SchemaUpdates(ctx context.Context, ref string) (<
CosmoRouterConfig: &cosmoConfig,
}
r.Logger.Info(
"Sending initial schema update",
r.Logger.Info("Sending initial schema update",
"ref", update.Ref,
"id", update.ID,
"subGraphsCount", len(update.SubGraphs),
+1 -2
View File
@@ -9,8 +9,7 @@ const charset = "abcdefghijklmnopqrstuvwxyz" +
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
var seededRand *rand.Rand = rand.New(
rand.NewSource(time.Now().UnixNano()),
)
rand.NewSource(time.Now().UnixNano()))
func StringWithCharset(length int, charset string) string {
b := make([]byte, length)