Skip to content

Export DEBUG env var in MCP gateway setup and pass to container - #13539

Merged
lpcox merged 3 commits into
mainfrom
copilot/update-debug-command-settings
Feb 3, 2026
Merged

lpcox merged 3 commits into
mainfrom
copilot/update-debug-command-settings

Conversation

Copilot AI commented Feb 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixed the DEBUG environment variable export to prevent shell globbing issues.

  • Add export DEBUG="*" with proper quoting (was export DEBUG=*)
  • Change -e DEBUG="*" to -e DEBUG in the MCP_GATEWAY_DOCKER_COMMAND
  • Build the project successfully
  • Run all MCP-related tests (all passed)
  • Recompile all 149 workflows with the fix
  • Verify changes in compiled workflow files
  • Format code (Go, JavaScript, JSON)

Changes Made

Code Changes

File: pkg/workflow/mcp_setup_generator.go

  1. Line 505: Changed export DEBUG=* to export DEBUG="*" to prevent shell globbing
  2. Line 547: Changed -e DEBUG="*" to -e DEBUG in the Docker command (from previous commit)

Rationale

The * character is a shell glob pattern and must be quoted when used as a literal value. Without quotes, the shell would expand * to match all files in the current directory, which is not the intended behavior for the DEBUG environment variable.

Workflow Files Updated

All 149 workflow .lock.yml files were recompiled with the fix.

Testing

  • ✅ All MCP-related tests pass
  • ✅ MCP Gateway tests pass
  • ✅ Code formatting validated

Verification

The fix is correctly reflected in all compiled workflows:

  • export DEBUG="*" appears after export MCP_GATEWAY_API_KEY (properly quoted)
  • Docker command uses -e DEBUG (without the value assignment)

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…d to use -e DEBUG

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Update debug command settings for MCP gateway Export DEBUG env var in MCP gateway setup and pass to container Feb 3, 2026
Copilot AI requested a review from lpcox February 3, 2026 16:28
@lpcox

lpcox commented Feb 3, 2026

Copy link
Copy Markdown
Collaborator

@copilot please look at the comment for file mcp_setup_generator.go

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>

Copilot AI commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please look at the comment for file mcp_setup_generator.go

Fixed in 694ca50. The DEBUG=* export now includes proper quoting (export DEBUG="*") to prevent shell globbing issues.

@lpcox
lpcox marked this pull request as ready for review February 3, 2026 16:48
Copilot AI review requested due to automatic review settings February 3, 2026 16:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a shell globbing issue with the DEBUG environment variable in the MCP gateway setup. The changes prevent the asterisk (*) from being expanded by the shell when used as a literal value for debug logging configuration.

Changes:

  • Added proper quoting to export DEBUG="*" in the shell script to prevent globbing
  • Changed Docker command from -e DEBUG="*" to -e DEBUG to properly pass the environment variable
  • Recompiled all 149 workflow lock files with the corrected generation logic

Reviewed changes

Copilot reviewed 150 out of 150 changed files in this pull request and generated no comments.

File Description
pkg/workflow/mcp_setup_generator.go Added line 505 to export DEBUG="*" with proper quoting; changed line 547 to pass DEBUG env var to Docker without value assignment
.github/workflows/*.lock.yml (149 files) Regenerated workflow files reflecting the corrected DEBUG environment variable handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lpcox
lpcox merged commit 6c91dfa into main Feb 3, 2026
97 checks passed
@lpcox
lpcox deleted the copilot/update-debug-command-settings branch February 3, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants