GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(mcp): use atomic.Bool for Server.readonly to prevent data races by Elvand-Lie · Pull Request #3759 · knative/func Conversation
Contributor
SummaryFixes #3756 The Changes
Testing
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Elvand-Lie
force-pushed
the
fix/mcp-readonly-data-race
branch
from
1a97cc3 to
80c4e87
Compare
|
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #3759 +/- ## ========================================== + Coverage 57.06% 57.10% +0.03% ========================================== Files 181 181 Lines 21145 21145 ========================================== + Hits 12067 12074 +7 + Misses 7855 7849 -6 + Partials 1223 1222 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
80c4e87 to
09b5041
Compare
The Server.readonly field is a plain bool with no synchronization. While the current stdio transport is single-client, the MCP SDK may dispatch tool calls on separate goroutines internally. Additionally, Start() writes to readonly while handler goroutines may concurrently read it, which is a data race under the Go memory model. Replace bool with sync/atomic.Bool for lock-free thread safety. All reads use Load() and all writes use Store(). Also add test coverage for the readonly rejection path in both the deploy and delete handlers. Signed-off-by: Elvand Lie <[email protected]> Signed-off-by: [email protected] <[email protected]>
09b5041 to
c47eb3b
Compare
|
@Elvand-Lie: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Thanks! This is not immediately apparent nuance. Would be nice to add this as a comment inline above the synchronized member for future reference. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
/lgtm |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Elvand-Lie, lkingland The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
/retest |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
bug(mcp): no concurrency protection on Server.readonly field
There was an error while loading. Please reload this page.