Skip to content

Conversation

@ChrisJBurns
Copy link
Collaborator

@ChrisJBurns ChrisJBurns commented Nov 7, 2025

It’s been long enough that we can safely remove the unused CLI flags from the proxy runner. An issue was recently raised due to old CLI flags overriding newer configurations. Since the Operator now relies entirely on runconfig files rather than CLI arguments, it’s safe to proceed with their removal.

The only CLI flags currently used by the proxy runner are:

  • k8s-pod-patch (I have some thoughts on whether this is even necessary for the Kubernetes pod patch. We might be able to handle this via the runconfig as well. I’ll raise that separately.)
  • MCP server image — this isn’t a named flag but the first argument passed in, retrieved using mcpServerImage := args[0]

The Operator also passes the --foreground flag, but this is a leftover from when we used the old toolhive app image. The proxy runner image always runs in the foreground, making this flag redundant for the Operator to pass through.

This PR:

  • Removes all unused CLI flags from the proxy runner
  • Removes the foreground flag from being passed from the Operator to the proxy runner
  • Moves the runWithFileBasedConfig function from execution.go into the run.go to reduce amount of unnecessary files

There was also an issue reported in #2450 where any CMD args specified in the MCPServer manifest were not being applied to the MCP server pod. Although they were included in the runconfig ConfigMap under cmd_args, they weren’t set on the pod because they were being overridden by an empty list. This happened because the Operator no longer passes those values. Removing the old flags resolves this issue and cleans up the code.

Fixes: #2450
Ref: #2195

Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.66%. Comparing base (5156575) to head (20a3876).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2515      +/-   ##
==========================================
- Coverage   55.69%   55.66%   -0.03%     
==========================================
  Files         295      295              
  Lines       28086    28086              
==========================================
- Hits        15643    15635       -8     
- Misses      11017    11030      +13     
+ Partials     1426     1421       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisJBurns ChrisJBurns enabled auto-merge (squash) November 10, 2025 14:07
Copy link
Contributor

@jhrozek jhrozek left a comment

Choose a reason for hiding this comment

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

I think the LLM catch about nil,nil is good, but feel free to patch it in a follow-up

@ChrisJBurns ChrisJBurns merged commit 2485c15 into main Nov 10, 2025
31 checks passed
@ChrisJBurns ChrisJBurns deleted the removes-flags-proxyrunner branch November 10, 2025 14:55
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