(spec-kit-only POC) INFP-445: Custom HTTP headers for webhooks#8578
(spec-kit-only POC) INFP-445: Custom HTTP headers for webhooks#8578
Conversation
…tiple concerns going through WEBHOOK_CONFIGURE
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedDraft detected. 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:
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 |
|
I will use this PR, which has been 100% AI-generated, to compare with another one that I will create using Spec-Kitty for a more targeted and human-driven development approach. Comparing both could lead us to highlight missing pieces we have in internal documentation. |
Merging this PR will improve performance by 38.69%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_schemabranch_process |
1,026 ms | 828.4 ms | +23.85% |
| ⚡ | test_graphql_generate_schema |
515.9 ms | 372 ms | +38.69% |
| ⚡ | test_schemabranch_duplicate |
7.2 ms | 5.9 ms | +22.81% |
| ⚡ | test_query_rel_many |
693 ms | 522.9 ms | +32.53% |
| ⚡ | test_query_rel_one |
662.7 ms | 500 ms | +32.54% |
| ⚡ | test_get_menu |
245.7 ms | 188.7 ms | +30.17% |
| ⚡ | test_load_node_to_db_node_schema |
66.2 ms | 52.1 ms | +27.12% |
| ⚡ | test_query_one_model |
464.7 ms | 352.6 ms | +31.78% |
| ⚡ | test_base_schema_duplicate_CoreProposedChange |
2.1 ms | 1.7 ms | +27.76% |
| ⚡ | test_nodemanager_querypeers |
1.5 ms | 1.2 ms | +21.96% |
| ⚡ | test_relationshipmanager_getpeer |
155.7 µs | 130.9 µs | +18.89% |
| ⚡ | test_get_schema |
323.8 ms | 261.2 ms | +23.99% |
Comparing pmi-445-webhook-headers (be4e3ad) with stable (8919be6)1
Footnotes
|
@polmichel, I think we can get rid of this branch now? |
This PR has been initially done based on spec-kitty adaptation commits #8576
Why
Webhooks currently have no way to include custom HTTP headers, which are required for authentication tokens, API keys, and routing metadata when integrating with external systems.
Goal: Allow users to attach typed key-value headers (static, password, environment variable) to any webhook.
Non-goal: Header value resolution at send time (environment variable lookup) is not yet implemented — this PR adds the schema, storage, and configuration plumbing.
Closes INFP-445
What changed
CoreKeyValuegeneric + 3 node types (CoreKeyValueStatic,CoreKeyValuePassword,CoreKeyValueEnvironmentVariable) inbackend/infrahub/core/schema/definitions/core/key_value.pyheadersrelationship added toCoreWebhookgeneric — all webhook types inherit itWEBHOOK_CONFIGUREevent for header changesdev/specs/infp-445-webhook-headers/(spec, plan, tasks, research, contracts)How to review
backend/infrahub/core/schema/definitions/core/key_value.pyandwebhook.pywebhook/models.py,webhook/tasks/configure.py,webhook/tasks/process.pytest_webhook_headers.py(functional),test_models.py(unit),webhook.spec.ts(E2E)dev/specs/artifacts are the spec-kit output — review for process quality, not codeHow to test
Impact & rollout
Checklist
🤖 Generated with Claude Code