Add backing implementation for [apim.webhooks.http] enable = false - #14259
Add backing implementation for [apim.webhooks.http] enable = false#14259ashanhr wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthroughAdds HTTP webhook enablement to both product distributions. The change adds matching Synapse ChangesHTTP webhook enablement
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to The PR adds the HTTP webhook enable/disable configuration and renders the corresponding suspend behavior in both distributions; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Registers apim.webhooks.http.enable in default.json (default: true) and adds WebhookServer.xml.j2 templates for both all-in-one and gateway distributions. The config mapper now renders WebhookServer.xml with suspend="true" when the key is set to false, which prevents Synapse from binding port 9021 on startup. Fixes: wso2/api-manager#5141 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4da302e to
d7cec3e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #14259 +/- ##
=========================================
Coverage 62.77% 62.77%
Complexity 161 161
=========================================
Files 25 25
Lines 454 454
Branches 11 11
=========================================
Hits 285 285
Misses 163 163
Partials 6 6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Summary
apim.webhooks.http.enable(default:true) indefault.jsonfor both theall-in-one-apimandgatewaydistributions.WebhookServer.xml.j2templates (inapim-synapse-config/andsynapse-configs/default/inbound-endpoints/) that render thesuspendattribute from the config key.When
[apim.webhooks.http] enable = falseis set indeployment.toml, the config mapper now rendersWebhookServer.xmlwithsuspend="true", which prevents Synapse from binding port 9021 at startup. Previously this config key was silently ignored because there was nodefault.jsonentry and no j2 template.This follows the same pattern already established for the HTTPS webhook (
apim.webhooks.https.enable+SecureWebhookServer.xml.j2).Dev Test
Tested against a 4.1.0 pack (patching the template and default.json files directly):
[apim.webhooks.http] enable = falseindeployment.tomlWebhookServer.xmlrendered withsuspend="true"lsof -i :9021returns nothing)Related issue
wso2/api-manager#5141