Skip to content

mcp: fix appendBoolFlag to handle explicit false values#3709

Open
Elvand-Lie wants to merge 2 commits into
knative:mainfrom
Elvand-Lie:fix/mcp-appendboolflag-false
Open

mcp: fix appendBoolFlag to handle explicit false values#3709
Elvand-Lie wants to merge 2 commits into
knative:mainfrom
Elvand-Lie:fix/mcp-appendboolflag-false

Conversation

@Elvand-Lie
Copy link
Copy Markdown
Contributor

@Elvand-Lie Elvand-Lie commented May 12, 2026

appendBoolFlag silently dropped the flag when value was non-nil but false. This meant MCP clients could not explicitly disable boolean flags like --push that may be enabled via func.yaml defaults.

When value is non-nil and false, append flag=false (e.g. --push=false) to allow explicit disabling.

Changes

  • When *value == false, append flag=false instead of dropping the flag

Fixes #3705

Release Note

NONE

Docs

NONE

appendBoolFlag silently dropped the flag when value was non-nil but false. This meant MCP clients could not explicitly disable boolean flags like --push that may be enabled via func.yaml defaults.

When value is non-nil and false, append flag=false (e.g. --push=false) to allow explicit disabling.

Signed-off-by: elvandlie@gmail.com <elvandlie@gmail.com>
@knative-prow knative-prow Bot requested review from dsimansk and jrangelramos May 12, 2026 14:17
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 12, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Elvand-Lie
Once this PR has been reviewed and has the lgtm label, please assign dsimansk for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added size/S 🤖 PR changes 10-29 lines, ignoring generated files. needs-ok-to-test 🤖 Needs an org member to approve testing labels May 12, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 12, 2026

Hi @Elvand-Lie. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.19%. Comparing base (2b6fb02) to head (608ce97).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3709      +/-   ##
==========================================
- Coverage   56.91%   56.19%   -0.73%     
==========================================
  Files         181      181              
  Lines       20928    20930       +2     
==========================================
- Hits        11912    11762     -150     
- Misses       7808     7999     +191     
+ Partials     1208     1169      -39     
Flag Coverage Δ
e2e 36.15% <0.00%> (-0.01%) ⬇️
e2e go ?
e2e node ?
e2e python ?
e2e quarkus ?
e2e rust ?
e2e springboot ?
e2e typescript ?
e2e-config-ci 17.87% <0.00%> (-0.01%) ⬇️
integration 17.42% <0.00%> (-0.02%) ⬇️
unit macos-14 44.99% <100.00%> (+<0.01%) ⬆️
unit macos-latest 44.99% <100.00%> (+<0.01%) ⬆️
unit ubuntu-24.04-arm 45.16% <100.00%> (+<0.01%) ⬆️
unit ubuntu-latest 45.84% <100.00%> (+<0.01%) ⬆️
unit windows-latest 44.98% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: elvandlie@gmail.com <elvandlie@gmail.com>
@knative-prow knative-prow Bot added size/M 🤖 PR changes 30-99 lines, ignoring generated files. and removed size/S 🤖 PR changes 10-29 lines, ignoring generated files. labels May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test 🤖 Needs an org member to approve testing size/M 🤖 PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp: appendBoolFlag silently drops explicit false values

1 participant