IFC-2303: CoreKeyValue schema definitions for webhook custom headers#8590
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (4)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merging this PR will improve performance by 39.32%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_schemabranch_duplicate |
7.2 ms | 5.8 ms | +25.7% |
| ⚡ | test_graphql_generate_schema |
517.5 ms | 371.4 ms | +39.32% |
| ⚡ | test_get_menu |
245.2 ms | 193.5 ms | +26.69% |
| ⚡ | test_get_schema |
325.7 ms | 258.2 ms | +26.15% |
| ⚡ | test_relationshipmanager_getpeer |
160.8 µs | 133.1 µs | +20.83% |
| ⚡ | test_query_one_model |
463.6 ms | 352.4 ms | +31.52% |
| ⚡ | test_query_rel_one |
661.4 ms | 500.5 ms | +32.14% |
| ⚡ | test_load_node_to_db_node_schema |
66.2 ms | 52.1 ms | +27.05% |
| ⚡ | test_schemabranch_process |
1,030.1 ms | 821.8 ms | +25.34% |
| ⚡ | test_base_schema_duplicate_CoreProposedChange |
2.1 ms | 1.7 ms | +27.88% |
| ⚡ | test_nodemanager_querypeers |
1.5 ms | 1.2 ms | +22.15% |
| ⚡ | test_query_rel_many |
691.7 ms | 522.9 ms | +32.3% |
Comparing pmi-20260312-webhooks-headers-schemas-ifc-2303 (7a19d96) with stable (298fd37)1
Footnotes
a9fc2d5 to
af3a1ce
Compare
Introduces CoreKeyValue generic with CoreStaticKeyValue, CorePasswordKeyValue, and CoreEnvironmentVariableKeyValue node types. Adds headers relationship to CoreWebhook generic. Registers all new schemas in core_models_mixed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ern equivalents Use human_friendly_id and display_label (Jinja2 template) instead of the deprecated default_filter and display_labels on all CoreKeyValue schemas. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6ac608a to
851ad8b
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
851ad8b to
ad069fc
Compare
4432cd4
into
pmi-20260227-webhooks-ifc-2272
* IFC-2303: CoreKeyValue schema definitions for webhook custom headers (#8590) * IFC-2257 new unit test against httpx regression * IFC-2304: Runtime resolution of webhook custom headers (#8597) * IFC-2334: Webhook cache invalidation on KeyValue changes (#8602) * IFC-2337: Invalidate webhook cache on reconcile_all (#8603) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Why
Webhooks currently have no way to send custom HTTP headers (authentication tokens, API keys, metadata). This blocks integrations that require auth headers or tenant identification.
This PR adds the schema layer: a
CoreKeyValuegeneric with three node type implementations, and aheadersrelationship onCoreWebhook.Non-goals: internal .md documentation resulting from /feedback session with Claude.
Closes IFC-2303
What changed
CoreKeyValuegeneric (name, key, description) withCoreStaticKeyValue,CoreEnvironmentVariableKeyValuenode schemas — all branch-agnosticheadersrelationship (peer=CoreKeyValue, cardinality=MANY, kind=ATTRIBUTE) toCoreWebhookgenericInfrahubKindentries for all three new typesprotocols.pyand test protocols to reflect new schemaNo behavioral changes — this is purely additive schema definitions. API contract unchanged for existing webhooks (headers relationship is optional).
How to review
backend/infrahub/core/schema/definitions/core/key_value.py— the new schema definitionsbackend/infrahub/core/schema/definitions/core/webhook.py— the headers relationship additionHow to test
Impact & rollout
Checklist