Skip to content

Commit 79cff8b

Browse files
chore(gateway): remove PR-number breadcrumbs from basePath comments
1 parent 5f5129b commit 79cff8b

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

gateway/gateway-controller/pkg/transform/restapi.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ func (t *RestAPITransformer) addUpstreamCluster(
465465
// unconditionally (see the upstreamDefinition cluster loop in Transform), so a per-op
466466
// route reuses it rather than minting its own cluster. One cluster per definition
467467
// serves both the main and sandbox vhosts — the key carries no env component. Reuse
468-
// also means the route inherits the definition's authoritative basePath (#2065),
468+
// also means the route inherits the definition's authoritative basePath,
469469
// avoiding the URL-derived-basePath divergence a separate per-op cluster would have.
470470
func perOpDefinitionClusterKey(kind, uuid string, target *api.RestAPIOperationUpstreamTarget, upstreamDefinitions *[]api.UpstreamDefinition) (string, error) {
471471
def, err := upstreamref.FindByName(target.Ref, upstreamDefinitions)
@@ -489,7 +489,7 @@ func resolveUpstreamURL(name string, up *api.Upstream, defs *[]api.UpstreamDefin
489489
refName := strings.TrimSpace(*up.Ref)
490490
// Resolve through the shared upstreamref helper (one source of truth for ref
491491
// lookup, shared with the per-op transformer and the xDS translator), and return
492-
// the definition's base path (from basePath, #2065) so the caller rewrites the
492+
// the definition's base path (from basePath) so the caller rewrites the
493493
// upstream path correctly. The "no URLs" check stays here since FindByName
494494
// resolves the definition, not its endpoints.
495495
def, err := upstreamref.FindByName(refName, defs)

gateway/gateway-controller/pkg/xds/translator.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ func (t *Translator) translateAPIConfig(cfg *models.StoredConfig, allConfigs []*
836836
}
837837
// Reuse the referenced upstreamDefinition's cluster (built unconditionally
838838
// below) instead of minting a per-op cluster. routeURLPath carries the
839-
// definition's base path (#2065) so the route's static rewrite prepends it
839+
// definition's base path so the route's static rewrite prepends it
840840
// exactly once. Keep cluster_header ON with that cluster as the default so a
841841
// dynamic-endpoint policy can still steer this operation. Precedence:
842842
// op-policy > api-policy > per-op ref > api-level upstream.
@@ -917,7 +917,7 @@ func (t *Translator) translateAPIConfig(cfg *models.StoredConfig, allConfigs []*
917917
return nil, nil, fmt.Errorf("per-op sandbox upstream for %s %s: %w", string(op.Method), op.Path, err)
918918
}
919919
// Reuse the referenced upstreamDefinition's cluster; routeURLPath carries
920-
// its base path (#2065). Keep cluster_header ON so a sandbox dynamic-endpoint
920+
// its base path. Keep cluster_header ON so a sandbox dynamic-endpoint
921921
// policy can override the per-op default — consistent with the API-level
922922
// sandbox routing fixed in #2059 (no static-pin bypass).
923923
sbRouteCluster = defClusterName
@@ -1063,7 +1063,7 @@ func (t *Translator) resolveUpstreamCluster(apiID, upstreamName string, up *api.
10631063
// (upstream_<kind>_<apiID>_<defName>) and base path. The definition's cluster is
10641064
// created unconditionally for every definition, so a per-op route reuses it rather
10651065
// than minting its own — one cluster per definition serves both vhosts (no env in
1066-
// the key). The base path comes from the definition's basePath field (#2065); the
1066+
// the key). The base path comes from the definition's basePath field; the
10671067
// caller passes it as the route's upstream path so the static rewrite prepends it.
10681068
func (t *Translator) resolvePerOpDefinitionCluster(kind, apiID string, target *api.RestAPIOperationUpstreamTarget, upstreamDefinitions *[]api.UpstreamDefinition) (string, string, *resolvedTimeout, error) {
10691069
refName := strings.TrimSpace(target.Ref)

0 commit comments

Comments
 (0)