Skip to content

Add the rewrite record to the repository protocols [IFC-3284] - #1401

Merged
gmazoyer merged 1 commit into
infrahub-developfrom
gma-20261006-ifc-3284
Oct 7, 2026
Merged

gmazoyer merged 1 commit into
infrahub-developfrom
gma-20261006-ifc-3284

Conversation

@gmazoyer

@gmazoyer gmazoyer commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

What

Regenerated infrahub_sdk/protocols.py so CoreGenericRepository, CoreRepository, CoreReadOnlyRepository and their Sync counterparts declare four new attributes:

  • last_rewrite_previous_commit: StringOptional
  • last_rewrite_commit: StringOptional
  • last_rewrite_at: DateTimeOptional
  • rewrite_count: IntegerOptional

This goes with opsmill/infrahub#10904, and this PR merges first.

Why

The Infrahub core schema now declares these attributes on the CoreGenericRepository generic. They record the last rewrite of the remote history of a branch. protocols.py is generated from those definitions by invoke backend.generate in the Infrahub repository, so this file moves with them. Both concrete kinds inherit the attributes and override none of them.

Notes


Summary by cubic

Regenerates infrahub_sdk/protocols.py so CoreGenericRepository, CoreRepository, CoreReadOnlyRepository, and their Sync counterparts declare the four optional attributes that record the last rewrite of a branch's remote history (IFC-3284).

Notes

  • Generated output only; merge this before the Infrahub PR that validates infrahub_sdk/protocols.py.

Written for commit 0d75904. Summary will update on new commits.

Review in cubic Turn on auto-fix

Infrahub now declares four branch-local attributes on the
CoreGenericRepository generic. They record the last rewrite of the
remote history of a branch: the commit imported before, the commit
reconciled onto, the time and a count.

The protocols are generated from the Infrahub core schema with
invoke backend.generate, so this file moves with those definitions.
Both concrete repository kinds inherit the attributes and override
none of them. This is generated output only.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0d75904
Status: ✅  Deploy successful!
Preview URL: https://e487b752.infrahub-sdk-python.pages.dev
Branch Preview URL: https://gma-20261006-ifc-3284.infrahub-sdk-python.pages.dev

View logs

@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                 Coverage Diff                  @@
##           infrahub-develop    #1401      +/-   ##
====================================================
+ Coverage             86.32%   86.80%   +0.47%     
====================================================
  Files                   149      152       +3     
  Lines                 14536    14743     +207     
  Branches               1992     1982      -10     
====================================================
+ Hits                  12548    12797     +249     
+ Misses                 1427     1382      -45     
- Partials                561      564       +3     
Flag Coverage Δ
integration-tests 42.33% <100.00%> (-1.21%) ⬇️
python-3.10 60.91% <100.00%> (-0.67%) ⬇️
python-3.11 60.91% <100.00%> (-0.67%) ⬇️
python-3.12 60.92% <100.00%> (-0.65%) ⬇️
python-3.13 60.92% <100.00%> (-0.64%) ⬇️
python-3.14 60.92% <100.00%> (-0.65%) ⬇️
python-filler-3.12 22.89% <0.00%> (+1.18%) ⬆️

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 9 files with indirect coverage changes

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

@gmazoyer
gmazoyer marked this pull request as ready for review October 7, 2026 18:35
@gmazoyer
gmazoyer requested a review from a team as a code owner October 7, 2026 18:35
@gmazoyer
gmazoyer merged commit 2ac1179 into infrahub-develop Oct 7, 2026
29 checks passed
@gmazoyer
gmazoyer deleted the gma-20261006-ifc-3284 branch October 7, 2026 18:35
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