Repository navigation
feat: add the encryption attribute to the CoreArtifact protocols - #1526
Open
DharmaBytesX wants to merge 1 commit into
Open
DharmaBytesX wants to merge 1 commit into
DharmaBytesX wants to merge 1 commit into
Conversation
Infrahub adds a read-only `encryption` attribute to `CoreArtifact`: plaintext, encrypted or unreadable. The generated protocols did not have it, so typed code could not read it, and the Infrahub check that the generated files are up to date fails. Regenerate `protocols.py` from the Infrahub core models, which adds `encryption: String` to `CoreArtifact` and `CoreArtifactSync`, and add a changelog entry. Signed-off-by: Simon AURA--SCUSSEL <simon@opsmill.com>
DharmaBytesX
marked this pull request as ready for review
November 13, 2026 14:22
Deploying infrahub-sdk-python with
|
| Latest commit: |
4fbf74e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://195d1135.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://sas-protocols-encryption.infrahub-sdk-python.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## infrahub-develop #1526 +/- ##
=================================================
Coverage 87.88% 87.88%
=================================================
Files 157 157
Lines 15658 15660 +2
Branches 2114 2114
=================================================
+ Hits 13761 13763 +2
Misses 1336 1336
Partials 561 561
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
4 of 5 tasks
DharmaBytesX
added a commit
to opsmill/infrahub
that referenced
this pull request
Nov 17, 2026
…ttribute to the CoreArtifact protocols The generated SDK protocols lack the `encryption` attribute of `CoreArtifact`, so `backend-validate-generated` fails and the gate skips the huge-runner jobs. The SDK commit adds it (opsmill/infrahub-sdk-python#1526) and builds on the commit this branch pointed at before. Point at the merge commit once that pull request is merged. Signed-off-by: Simon AURA--SCUSSEL <simon@opsmill.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The generated
CoreArtifactprotocols lack theencryptionattribute that Infrahub PR #11561 adds.Adds it to the sync and async classes, as the Infrahub generator renders it.
Review: the base branch, and that the Infrahub PR needs this merged before its pointer bump.
Why
opsmill/infrahub#11561 adds a read-only
encryptionattribute toCoreArtifact:plaintext,encryptedorunreadable. The Infrahub jobbackend-validate-generatedfails whileprotocols.pydiffers from the generated output, and typed code cannot read the attribute.Base branch:
infrahub-develop, the branch for changes that need the next Infrahub version. The Infrahub PR can bump itspython_sdkpointer only after this is merged.What changed
infrahub_sdk/protocols.py:encryption: StringinCoreArtifactandCoreArtifactSync. The kind isString, not optional, because the attribute has a default.changelog/+core-artifact-encryption-protocol.added.md: changelog entry.uv run invoke backend.generatein the Infrahub repository. A regeneration changes nothing.How to test
ruff checkandruff format --checkpass on the file.Impact & rollout
artifact.encryptionraisesAttributeErroragainst a server without the attribute, so this belongs oninfrahub-developonly.Not done or not verified
towncrier build --draftand the SDK CI.Code review
The
code-reviewskill ran at levelhighon the uncommitted change, by an agent other than the author. The agent also compared the file with the generator output.encryptionexists only on an Infrahub branch that is not merged, so released SDK code could meet a server without it. Kept: the base isinfrahub-develop, which holds changes that need the next Infrahub version.Security review
The
security-reviewskill reads only commits, so the agent reviewed the change by hand with the skill's method. Agent other than the author. High 0, Medium 0, Low 0.Dropped after checks: runtime use of the annotations (none found), the meaning of the value for callers, and the wording "read-only".
Checklist
uv run towncrier create ...)