mcp: fix appendBoolFlag to handle explicit false values#3709
mcp: fix appendBoolFlag to handle explicit false values#3709Elvand-Lie wants to merge 2 commits into
Conversation
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>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Elvand-Lie The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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 Report✅ All modified and coverable lines are covered by tests. 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
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:
|
Signed-off-by: elvandlie@gmail.com <elvandlie@gmail.com>
appendBoolFlagsilently dropped the flag whenvaluewas non-nil butfalse. This meant MCP clients could not explicitly disable boolean flags like--pushthat may be enabled viafunc.yamldefaults.When
valueis non-nil andfalse, appendflag=false(e.g.--push=false) to allow explicit disabling.Changes
*value == false, appendflag=falseinstead of dropping the flagFixes #3705
Release Note
Docs