Conversation
Pin mcp-gateway-config.schema.json to the latest gh-aw release tag (v0.57.2) for reproducible, deterministic configuration validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the pinned MCP Gateway JSON Schema URL from gh-aw release v0.57.0 to v0.57.2 across validation code and tests to keep config validation deterministic and in sync with the referenced schema release.
Changes:
- Bump the schema fetch URL used by config JSON schema validation to
v0.57.2. - Update the schema documentation link surfaced in validation error messages to
v0.57.2. - Update the test expectation for the schema URL in enhanced error messages to
v0.57.2.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| internal/config/validation_schema.go | Updates the schema fetch URL used during JSON schema compilation/validation. |
| internal/config/rules/rules.go | Updates the schema reference URL included in validation error footers. |
| internal/config/validation_schema_test.go | Updates test expectations to match the new pinned schema URL. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| // | ||
| // Current schema version: v0.50.7 | ||
| // | ||
| // Alternative: Embed the schema using go:embed directive for zero network dependency. | ||
| schemaURL = "https://v-raw-githubusercontent-com.adclosenn.dev/github/gh-aw/v0.57.0/docs/public/schemas/mcp-gateway-config.schema.json" | ||
| schemaURL = "https://v-raw-githubusercontent-com.adclosenn.dev/github/gh-aw/v0.57.2/docs/public/schemas/mcp-gateway-config.schema.json" |
There was a problem hiding this comment.
The schema pinning comment block is now inconsistent with the actual pinned URL: it still says the schema is fetched from the main branch and lists "Current schema version: v0.50.7". Update this documentation to reflect the pinned version (v0.57.2) and the actual fetch behavior so future updates follow the documented steps correctly.
See below for a potential fix:
// The schema is fetched from a specific tagged release of gh-aw (a pinned version),
// not from the main branch. This ensures stable and reproducible validation behavior.
//
// To update to a new pinned version:
// 1. Check the latest gh-aw release: https://github.com/github/gh-aw/releases
// 2. Update the version tag in the URL below (e.g., vX.Y.Z)
// 3. Run tests to ensure compatibility: make test
// 4. Update this comment with the matching version number
//
// Current schema version: v0.57.2
| // | ||
| // Alternative: Embed the schema using go:embed directive for zero network dependency. | ||
| schemaURL = "https://v-raw-githubusercontent-com.adclosenn.dev/github/gh-aw/v0.57.0/docs/public/schemas/mcp-gateway-config.schema.json" | ||
| schemaURL = "https://v-raw-githubusercontent-com.adclosenn.dev/github/gh-aw/v0.57.2/docs/public/schemas/mcp-gateway-config.schema.json" |
There was a problem hiding this comment.
The schema URL is duplicated here and in internal/config/rules/rules.go (rules.SchemaURL). To avoid future drift (e.g., error footer linking to a different version than the validator fetches), consider sourcing both from a single constant (for example, have config use rules.SchemaURL or move the URL to a shared constant).
See below for a potential fix:
// 2. Update the schema URL in rules.SchemaURL to use a version tag instead of main
// 3. Run tests to ensure compatibility: make test
// 4. Update related documentation with the version number
//
// Current schema version: see rules.SchemaURL
//
// Alternative: Embed the schema using go:embed directive for zero network dependency.
schemaURL = rules.SchemaURL
| const ( | ||
| ConfigSpecURL = "https://github.com/github/gh-aw/blob/main/docs/src/content/docs/reference/mcp-gateway.md" | ||
| SchemaURL = "https://v-raw-githubusercontent-com.adclosenn.dev/github/gh-aw/v0.57.0/docs/public/schemas/mcp-gateway-config.schema.json" | ||
| SchemaURL = "https://v-raw-githubusercontent-com.adclosenn.dev/github/gh-aw/v0.57.2/docs/public/schemas/mcp-gateway-config.schema.json" | ||
| ) |
There was a problem hiding this comment.
SchemaURL is duplicated with config's schemaURL in internal/config/validation_schema.go. Consider centralizing the schema URL in one place so the validation error footer and the schema fetch logic cannot accidentally get out of sync on future bumps.
| "Location:", | ||
| "Error:", | ||
| "Details:", | ||
| "https://v-raw-githubusercontent-com.adclosenn.dev/github/gh-aw/v0.57.0/docs/public/schemas/mcp-gateway-config.schema.json", | ||
| "https://v-raw-githubusercontent-com.adclosenn.dev/github/gh-aw/v0.57.2/docs/public/schemas/mcp-gateway-config.schema.json", | ||
| }, |
There was a problem hiding this comment.
This test hardcodes the schema URL string. Since the URL is also defined as rules.SchemaURL (used in the error footer), consider referencing that constant here to avoid needing to update tests separately on every schema bump.
Schema URL Update
Updates the MCP Gateway JSON schema validation URL from
v0.57.0tov0.57.2.Files Changed
internal/config/validation_schema.go—schemaURLvariable updated tov0.57.2internal/config/rules/rules.go—SchemaURLconstant updated tov0.57.2internal/config/validation_schema_test.go— hardcoded schema URLs updated tov0.57.2Why
Pinning to a specific release tag ensures reproducible, deterministic configuration validation — the schema won't silently change between runs.
Release Notes
See the gh-aw release notes for changes in this schema version.
Warning
The following domain was blocked by the firewall during workflow execution:
invalidhostthatdoesnotexist12345.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.