Skip to content

refactor: rename McpPort to MCPPort for Go naming conventions#4589

Open
mvanhorn wants to merge 3 commits intostacklok:mainfrom
mvanhorn:osc/4582-mcpport-naming
Open

refactor: rename McpPort to MCPPort for Go naming conventions#4589
mvanhorn wants to merge 3 commits intostacklok:mainfrom
mvanhorn:osc/4582-mcpport-naming

Conversation

@mvanhorn
Copy link
Copy Markdown

@mvanhorn mvanhorn commented Apr 7, 2026

Summary

  • Renames Go struct field McpPort to MCPPort and method GetMcpPort to GetMCPPort across 15 files to follow Go's all-caps acronym convention
  • JSON tag mcpPort is unchanged, so no wire-format or API breaking change

Test plan

  • All affected packages compile (go build ./cmd/thv-operator/... ./pkg/export/... ./pkg/vmcp/...)
  • CI passes

Closes #4582

@ChrisJBurns
Copy link
Copy Markdown
Collaborator

@mvanhorn You have an out of date branch/merge conflicts

@mvanhorn mvanhorn force-pushed the osc/4582-mcpport-naming branch from 91bcb14 to 9642bfc Compare April 7, 2026 13:45
@mvanhorn
Copy link
Copy Markdown
Author

mvanhorn commented Apr 7, 2026

Rebased onto current main in 9642bfc. Also caught 3 additional files that upstream changed since the original PR - applied the McpPort -> MCPPort rename to those as well (integration and scaling tests).

@github-actions github-actions bot added the size/XS Extra small PR: < 100 lines changed label Apr 7, 2026
ChrisJBurns
ChrisJBurns previously approved these changes Apr 7, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.73%. Comparing base (d851c69) to head (258eff8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4589      +/-   ##
==========================================
+ Coverage   68.71%   68.73%   +0.02%     
==========================================
  Files         517      517              
  Lines       54817    54817              
==========================================
+ Hits        37666    37680      +14     
+ Misses      14252    14242      -10     
+ Partials     2899     2895       -4     

☔ 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
Copy link
Copy Markdown
Collaborator

@mvanhorn there's some CRD steps you need to do. some task operator-manifests task crdref-gen etc

@mvanhorn
Copy link
Copy Markdown
Author

mvanhorn commented Apr 8, 2026

Ran task operator-manifests and task crdref-gen in f258512 - the generated CRD files and docs now reflect the MCPPort rename.

@github-actions github-actions bot added size/XS Extra small PR: < 100 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Apr 8, 2026
@ChrisJBurns
Copy link
Copy Markdown
Collaborator

@mvanhorn ahhh almost there, we got some lint checks now

mvanhorn and others added 3 commits April 9, 2026 20:32
Rename the Go struct field McpPort to MCPPort and the method
GetMcpPort to GetMCPPort to follow Go convention of all-caps
acronyms. JSON tag remains mcpPort (no wire-format change).

Closes stacklok#4582
Run `task operator-manifests` and `task crdref-gen` to update generated
files with the McpPort -> MCPPort rename from the previous commit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixes lint failure by applying the MCPPort rename to mcpserver_scaling_test.go
and ratelimit_test.go which were missed in the previous commits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mvanhorn mvanhorn force-pushed the osc/4582-mcpport-naming branch from f258512 to 258eff8 Compare April 10, 2026 03:32
@mvanhorn
Copy link
Copy Markdown
Author

Fixed - rebased and caught the remaining McpPort references in mcpserver_scaling_test.go and ratelimit_test.go (258eff8). Should clear the lint check now.

@github-actions github-actions bot added size/XS Extra small PR: < 100 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

McpPort field naming inconsistency

2 participants