Skip to content

Feature flags for version override testing: latest-copilot, mcpg-version, firewall-version #27593

@lpcox

Description

@lpcox

Summary

Add three feature flags that allow per-workflow version overrides for testing purposes. These enable smoke-testing new releases of the Copilot CLI, MCP gateway, and AWF firewall before bumping the pinned defaults in version_constants.go.

Feature Flags

1. latest-copilot: true

Override the pinned Copilot CLI version (DefaultCopilotVersion, currently 1.0.21) and install the latest version instead.

features:
  latest-copilot: true

Compiler behavior:

  • When enabled, the Copilot CLI npm install step should use @latest instead of the pinned version from DefaultCopilotVersion
  • Affects copilot_engine.goGetInstallationSteps()
  • Constant: LatestCopilotFeatureFlag FeatureFlag = "latest-copilot"

2. mcpg-version: <string>

Override the default MCP gateway version (DefaultMCPGatewayVersion, currently v0.2.26).

features:
  mcpg-version: "v0.2.27"

Compiler behavior:

  • When set, use the specified version for the ghcr.io/github/gh-aw-mcpg Docker image tag instead of DefaultMCPGatewayVersion
  • Requires reading the string value (not just boolean) from the features map
  • Constant: MCPGVersionFeatureFlag FeatureFlag = "mcpg-version"

3. firewall-version: <string>

Override the default AWF firewall version (DefaultFirewallVersion, currently v0.25.26).

features:
  firewall-version: "v0.25.27"

Compiler behavior:

  • When set, use the specified version for all three firewall container images (agent, api-proxy, squid) instead of DefaultFirewallVersion
  • Constant: FirewallVersionFeatureFlag FeatureFlag = "firewall-version"

Implementation Notes

The feature flag system (pkg/workflow/features.go) already supports string values — isFeatureEnabled checks for non-empty strings. A new helper like getFeatureValue(flag, workflowData) string could extract the string value for the version overrides.

Files to modify

  • pkg/constants/feature_constants.go — add three new constants
  • pkg/workflow/features.go — add getFeatureValue() helper for string-valued flags
  • pkg/workflow/copilot_engine.go — check latest-copilot in GetInstallationSteps()
  • pkg/workflow/docker.go or pkg/workflow/awf_helpers.go — check firewall-version when building AWF command
  • pkg/workflow/mcp_setup_generator.go or pkg/workflow/mcp_renderer.go — check mcpg-version when selecting gateway image tag

Example smoke test workflow

---
engine: copilot
features:
  latest-copilot: true
  mcpg-version: "v0.2.27"
  firewall-version: "v0.25.27"
tools:
  github:
    toolsets: [repos]
---

Use Case

These flags enable a pre-bump testing workflow:

  1. Create a smoke test workflow with the version override feature flag
  2. Run it to verify the new version works in the AWF sandbox
  3. If it passes, bump the default in version_constants.go
  4. Remove the feature flag from the smoke test

This avoids the current pattern of bumping defaults blindly and discovering breakage across all workflows.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions