Skip to content

Conversation

@JAORMX
Copy link
Collaborator

@JAORMX JAORMX commented Dec 8, 2025

Summary

When a secret is updated or deleted, users may not realize that MCP servers using that secret need to be restarted to pick up the change. This PR adds a warning message that lists any affected workloads.

  • Add ListWorkloadsUsingSecret method to the Manager interface
  • Implement the method by scanning all RunConfigs for secret references
  • Update the secret set and secret delete commands to warn users
  • Add unit tests for the new method

Example output after updating a secret:

Secret github-token set successfully

Warning: The following MCP servers use this secret and may need to be restarted:
  - github-mcp
  - code-review-mcp

Test plan

  • Unit tests added for ListWorkloadsUsingSecret
  • Lint passes
  • Build passes
  • Manual test: create a secret, run a server with it, update the secret, verify warning appears
  • Manual test: delete a secret used by a server, verify warning appears

Fixes #201

🤖 Generated with Claude Code

@github-actions github-actions bot added the size/S Small PR: 100-299 lines changed label Dec 8, 2025
@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

❌ Patch coverage is 29.16667% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.01%. Comparing base (fa9fa84) to head (bdf0383).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/workloads/manager.go 29.16% 13 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2945      +/-   ##
==========================================
- Coverage   56.02%   56.01%   -0.01%     
==========================================
  Files         328      328              
  Lines       32290    32314      +24     
==========================================
+ Hits        18090    18101      +11     
- Misses      12665    12668       +3     
- Partials     1535     1545      +10     

☔ 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.

When a secret is updated or deleted, users may not realize that MCP
servers using that secret need to be restarted to pick up the change.
This change adds a warning message that lists any workloads using the
affected secret.

Changes:
- Add ListWorkloadsUsingSecret method to the Manager interface
- Implement the method by scanning all RunConfigs for secret references
- Update the secret set and delete commands to warn users
- Add unit tests for the new method

Fixes #201

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JAORMX JAORMX force-pushed the warn-secret-users-on-update branch from 50fda6c to fd9c56d Compare December 8, 2025 15:53
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Dec 8, 2025
@github-actions github-actions bot added size/S Small PR: 100-299 lines changed and removed size/S Small PR: 100-299 lines changed labels Dec 9, 2025
@JAORMX JAORMX merged commit 44dfd5f into main Dec 9, 2025
34 of 35 checks passed
@JAORMX JAORMX deleted the warn-secret-users-on-update branch December 9, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR: 100-299 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When updating a secret, tell the user that they need to restart any servers using the old value

3 participants