Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion module/services/accounts/code/pkg/adapters/connect_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@ package adapters

/* -----------------------------------------------------------------

⚠️ This code is generated by the agent. Do not edit this file!
STOPGAP (codefly-dev/service-go-grpc#223): this file is hand-maintained.
It is not the go-grpc agent's output, although its name and layout follow the
agent's template. The agent renders these adapters only for a service whose
proto declares a single AccountsService. Accounts serves many proto services
and declares no AccountsService, so the agent's Sync never writes this file
(go-grpc 0.1.72, generatedScaffoldTargets). It stays hand-maintained until #223
lets the agent render this service's shape; adopt the generated file then,
keeping the CUSTOM lines. main.go and plugins/registry.go carry the same
stopgap.

It has not taken the agent's Connect-face bounds (go-grpc 0.1.63 to 0.1.67:
the message bound, the body-read bound and ReadHeaderTimeout). Run serves
Connect on a plain http.Server. #223 tracks adopting them.

Registers every Connect (connectrpc.com/connect) service handler derived
from the proto package. Actual per-service adapter types live in
Expand Down
10 changes: 9 additions & 1 deletion module/services/accounts/code/pkg/adapters/cors_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ import (

/* -----------------------------------------------------------------

⚠️ This code is generated by the agent. Do not edit this file!
STOPGAP (codefly-dev/service-go-grpc#223): this file is hand-maintained.
It is not the go-grpc agent's output, although its name and layout follow the
agent's template. The agent renders these adapters only for a service whose
proto declares a single AccountsService. Accounts serves many proto services
and declares no AccountsService, so the agent's Sync never writes this file
(go-grpc 0.1.72, generatedScaffoldTargets). It stays hand-maintained until #223
lets the agent render this service's shape; adopt the generated file then,
keeping the CUSTOM lines. main.go and plugins/registry.go carry the same
stopgap.

----------------------------------------------------------------- */

Expand Down
10 changes: 9 additions & 1 deletion module/services/accounts/code/pkg/adapters/grpc_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ package adapters

/* -----------------------------------------------------------------

⚠️ This code is generated by the agent. Do not edit this file!
STOPGAP (codefly-dev/service-go-grpc#223): this file is hand-maintained.
It is not the go-grpc agent's output, although its name and layout follow the
agent's template. The agent renders these adapters only for a service whose
proto declares a single AccountsService. Accounts serves many proto services
and declares no AccountsService, so the agent's Sync never writes this file
(go-grpc 0.1.72, generatedScaffoldTargets). It stays hand-maintained until #223
lets the agent render this service's shape; adopt the generated file then,
keeping the CUSTOM lines. main.go and plugins/registry.go carry the same
stopgap.

Recommendation: create a `rpcs.go` file in the same directory as this file and
implement your APIs there.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ func reflectionRegistered(server *grpc.Server) bool {
}

// TestReflectionRegisteredOnlyLocally pins the environment gate on gRPC server
// reflection. grpc_gen.go is generated, so a regeneration that emits an
// reflection. grpc_gen.go is to be adopted from the agent (service-go-grpc#223),
// so a regeneration that emits an
// unconditional reflection.Register would re-expose the full service surface to
// any mesh-internal caller in production; this test fails if that gate is lost.
func TestReflectionRegisteredOnlyLocally(t *testing.T) {
Expand Down
7 changes: 4 additions & 3 deletions module/services/accounts/code/pkg/adapters/rest_extras.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ package adapters
// an HMAC header. These are registered here and wrapped into the same
// HTTP listener via combineHandlers().
//
// Why not edit rest_gen.go: that file is regenerated by the go-grpc
// agent. This file is hand-written and survives regeneration. The
// one edit to rest_gen.go is a single call to combineHandlers().
// Why not edit rest_gen.go: it is hand-maintained only until the go-grpc
// agent can render it (service-go-grpc#223), and then it is adopted from the
// agent. This file is hand-written and survives that. The one edit to
// rest_gen.go is a single call to combineHandlers().

import (
"bytes"
Expand Down
10 changes: 9 additions & 1 deletion module/services/accounts/code/pkg/adapters/rest_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ package adapters

/* -----------------------------------------------------------------

⚠️ This code is generated by the agent. Do not edit this file!
STOPGAP (codefly-dev/service-go-grpc#223): this file is hand-maintained.
It is not the go-grpc agent's output, although its name and layout follow the
agent's template. The agent renders these adapters only for a service whose
proto declares a single AccountsService. Accounts serves many proto services
and declares no AccountsService, so the agent's Sync never writes this file
(go-grpc 0.1.72, generatedScaffoldTargets). It stays hand-maintained until #223
lets the agent render this service's shape; adopt the generated file then,
keeping the CUSTOM lines. main.go and plugins/registry.go carry the same
stopgap.

----------------------------------------------------------------- */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
// TestRESTServeMuxKeepsTheIdentityHeaderMatcher is the REST half of the
// identity-projection gate.
//
// rest_gen.go is generated ("Do not edit this file!"), and the single option
// that carries the caller's credential and the canonical identity headers
// across the transcoding hop lives inside that generated constructor. A
// regeneration that drops it does not break a build or a route: REST simply
// rest_gen.go is to be adopted from the go-grpc agent once it can render it
// (service-go-grpc#223), and the single option that carries the caller's
// credential and the canonical identity headers across the transcoding hop
// lives inside that constructor. A regeneration that drops it does not break a build or a route: REST simply
// stops forwarding the acting-as subject, and an impersonated request silently
// authorizes as the admin instead of the target — the exact defect the matcher
// exists to close, reintroduced fail-open.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ func forwardThroughTranscoder(t *testing.T, option runtime.ServeMuxOption, heade
return recorder
}

// rest_gen.go is generated; its CUSTOM lines survive regeneration only by
// being preserved. Parsed, not string-matched (as the incoming matcher's
// rest_gen.go is to be adopted from the agent (service-go-grpc#223); its
// CUSTOM lines survive that only by being preserved. Parsed, not string-matched (as the incoming matcher's
// lockstep test does), so a commented-out or renamed option fails here and the
// prefixed cookie cannot come back silently.
func TestTheRESTMuxIsBuiltWithTheOutgoingHeaderMatcher(t *testing.T) {
Expand Down
11 changes: 9 additions & 2 deletions module/services/accounts/code/pkg/adapters/server_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ package adapters

/* -----------------------------------------------------------------

⚠️ This code is generated by the agent. Do not edit this file!

STOPGAP (codefly-dev/service-go-grpc#223): this file is hand-maintained.
It is not the go-grpc agent's output, although its name and layout follow the
agent's template. The agent renders these adapters only for a service whose
proto declares a single AccountsService. Accounts serves many proto services
and declares no AccountsService, so the agent's Sync never writes this file
(go-grpc 0.1.72, generatedScaffoldTargets). It stays hand-maintained until #223
lets the agent render this service's shape; adopt the generated file then,
keeping the CUSTOM lines. main.go and plugins/registry.go carry the same
stopgap.

----------------------------------------------------------------- */

Expand Down
Loading