Skip to content

IFC-2303: update SDK protocols for CoreKeyValue schema#867

Open
polmichel wants to merge 1 commit intoinfrahub-developfrom
pmi-20260313-schema-updates
Open

IFC-2303: update SDK protocols for CoreKeyValue schema#867
polmichel wants to merge 1 commit intoinfrahub-developfrom
pmi-20260313-schema-updates

Conversation

@polmichel
Copy link

@polmichel polmichel commented Mar 13, 2026

Why

Synchronization step with opsmill/infrahub#8590 which introduces CoreKeyValue schema definitions for webhook custom headers.

This PR updates the SDK-side generated protocols to reflect the new schema entities added in the infrahub backend.

What changed

No behavioral changes — this is purely additive generated protocol updates to stay in sync with the backend schema.

How to review

  1. Check infrahub_sdk/protocols.py diff — the new protocol stubs matching the backend schema additions

How to test

uv run invoke format && uv run invoke lint   # Should pass
uv run pytest tests/unit/                     # Should pass

Impact & rollout

Summary by CodeRabbit

  • New Features
    • Key-value pair storage for managing configuration data
    • Environment variable and static value management capabilities
    • Enhanced webhook configuration with header support

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6cd5bf85-8249-4537-8a13-49fbd3c1e48c

📥 Commits

Reviewing files that changed from the base of the PR and between f737549 and f300244.

📒 Files selected for processing (1)
  • infrahub_sdk/protocols.py

Walkthrough

The changes introduce new key-value entity types to the protocol definitions in infrahub_sdk/protocols.py. Three hierarchical class pairs are added in both async and sync variants: CoreKeyValue/CoreKeyValueSync base classes with name, key, and description fields, CoreEnvironmentVariableKeyValue/CoreEnvironmentVariableKeyValueSync for environment variables with an additional value field, and CoreStaticKeyValue/CoreStaticKeyValueSync for static values with an additional value field. Additionally, CoreWebhook and CoreWebhookSync are extended with a new headers relationship field to support header management in webhook configurations.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: updating SDK protocols for the CoreKeyValue schema with the associated ticket reference.
Description check ✅ Passed The description follows the template structure with all key sections filled: Why (synchronization context), What changed (specific additions), How to review and test, and deployment notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: f300244
Status: ✅  Deploy successful!
Preview URL: https://487b0bc1.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pmi-20260313-schema-updates.infrahub-sdk-python.pages.dev

View logs

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                 Coverage Diff                  @@
##           infrahub-develop     #867      +/-   ##
====================================================
+ Coverage             80.64%   80.69%   +0.05%     
====================================================
  Files                   118      118              
  Lines                 10246    10264      +18     
  Branches               1534     1534              
====================================================
+ Hits                   8263     8283      +20     
+ Misses                 1455     1454       -1     
+ Partials                528      527       -1     
Flag Coverage Δ
integration-tests 40.46% <100.00%> (+0.10%) ⬆️
python-3.10 51.90% <100.00%> (+0.08%) ⬆️
python-3.11 51.92% <100.00%> (+0.10%) ⬆️
python-3.12 51.90% <100.00%> (+0.08%) ⬆️
python-3.13 51.90% <100.00%> (+0.08%) ⬆️
python-3.14 53.62% <100.00%> (+0.10%) ⬆️
python-filler-3.12 23.99% <0.00%> (-0.05%) ⬇️

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

Files with missing lines Coverage Δ
infrahub_sdk/protocols.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@polmichel polmichel changed the title feat: update SDK protocols for CoreKeyValue schema IFC-2303: update SDK protocols for CoreKeyValue schema Mar 14, 2026
@polmichel polmichel marked this pull request as ready for review March 14, 2026 11:46
@polmichel polmichel requested a review from a team as a code owner March 14, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant