Repository navigation
Consolidate shared environment names and OIDC startup handling - #16929
Merged
Merged
Conversation
6 tasks
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
lpcox
marked this pull request as ready for review
November 20, 2026 17:48
Contributor
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE Notes:
Full details:
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The environment-variable and OIDC startup consolidation has no active review issues.
No open issues 🎉
What changed in this PR
Consolidates environment-variable names and OIDC startup handling across the gateway’s configuration, CLI, tracing, and launcher code while preserving existing startup semantics.
Changes:
- Shares log-directory, OTLP fan-out, and OIDC environment constants; reuses the existing
DEBUGconstant. - Centralizes OIDC provider creation and URL-only readiness checks.
- Adds regression coverage for OIDC credentials, empty environment overrides, and CLI precedence.
| File | Description |
|---|---|
| internal/tracing/config_resolver.go | Defines and uses the OTLP fan-out environment constant. |
| internal/oidc/provider.go | Adds OIDC constants, readiness checks, and provider creation from environment values. |
| internal/oidc/provider_test.go | Tests provider availability and captured credentials. |
| internal/launcher/launcher.go | Uses centralized OIDC provider creation. |
| internal/launcher/launcher_test.go | Verifies URL-only OIDC initialization. |
| internal/config/validation_test.go | Tests authentication validation without a request token. |
| internal/config/validation_server.go | Uses shared OIDC readiness checks and constants. |
| internal/config/validation_env.go | Uses the shared log-directory constant. |
| internal/config/gateway_env.go | Defines the log-directory environment constant. |
| internal/cmd/root.go | Reuses debug and OTLP environment constants. |
| internal/cmd/root_test.go | Covers guards-mode environment overrides and flag precedence. |
| internal/cmd/proxy.go | Uses the shared log-directory constant. |
| internal/cmd/flags_logging.go | Uses the shared constant for logging and cache defaults. |
Review effort: Max (adaptive)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Duplicated environment names and OIDC readiness checks leave configuration validation and runtime initialization vulnerable to drift. This refactor addresses the remaining duplication without changing startup semantics.
DEBUGconstant.ProviderFromEnv()and shareRequestCredentials.Available()between validation and provider construction.