Skip to content

Merge stable into develop - #1297

Merged
ogenstad merged 2 commits into
developfrom
stable
Aug 28, 2026
Merged

Merge stable into develop#1297
ogenstad merged 2 commits into
developfrom
stable

Conversation

@infrahub-github-bot-app

@infrahub-github-bot-app infrahub-github-bot-app Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Merging stable into develop after merging pull request #1294.


Summary by cubic

Stops requesting the peer count on cardinality-many relationships and fixes CI so changes to workflow or filter files run the full pipeline.

  • The SDK never read count, and Infrahub resolved it with an extra database query per node per relationship, which also prevented peer reads from batching.
  • CI path filters previously skipped jobs on changes to .github/workflows/** or .github/file-filters.yml, so bad edits could pass silently.
  • Widen ci_config to all workflow files, point github_workflows at it, and fold it into documentation job filters.
  • Parenthesize the validate-generated-documentation condition so it no longer bypasses the failure and cancellation guards.

Written for commit f256649. Summary will update on new commits.

Review in cubic

The query the SDK renders for a cardinality-many relationship asked for
`count` next to `edges`, but nothing ever read it back: the manager is
built from the edges alone, and only the top-level pagination count is
consumed.

Infrahub resolves that nested count with one extra database query per
returned node and per relationship, awaited before the peers are loaded,
which also splits the batched peer read into several partial ones.
Measured on 25 nodes carrying one Attribute-kind relationship (the shape
every `all()` query renders by default): 62 database queries with the
count, 9 without.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 28, 2026

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: f256649
Status: ✅  Deploy successful!
Preview URL: https://1fa31eeb.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pog-em-upgrade-mypy-18mrd.infrahub-sdk-python.pages.dev

View logs

A change to a workflow file or to the path filters themselves could
previously leave jobs skipped, so a bad edit landed green and broke the
next unrelated PR instead.

Three concrete gaps, confirmed by simulating dorny/paths-filter against
the old filters:

- ci.yml only: `documentation` skipped, because `documentation_all` never
  included `ci_config`.
- file-filters.yml only: `markdown-lint`, `action-lint`, `uv-lock-check`
  and `documentation` skipped, because `github_workflows` was
  `.github/workflows/*.yml`, which does not match a file one level up.
- define-versions.yml only: `python-lint`, `unit-tests`,
  `integration-tests` and `validate-generated-documentation` skipped,
  because `ci_config` listed only `ci.yml` - so a bad `UV_VERSION` pin,
  consumed by every Python job, went untested.

Widen `ci_config` to all of `.github/workflows/**` plus
`.github/file-filters.yml`, point `github_workflows` at it, and fold it
into `documentation_all` and `documentation_generated_all`. Every output
that gates a job now includes it.

Also parenthesize the `validate-generated-documentation` condition. It
read `... && A || B`, and `&&` binds tighter than `||`, so
`documentation_generated == 'true'` alone satisfied the whole expression
and bypassed the `always() && !cancelled() && !contains(needs.*.result,
'failure')` guards. Latent before; the change above makes that output
true on every CI-config change, which would have started firing it.

Verified with `yamllint -s .` and `actionlint`, plus a picomatch
simulation showing zero skipped jobs for all three CI-config cases and
no change in selectivity for python-only, docs-only or generated-docs-only
changes.
@github-actions github-actions Bot added the group/ci Issue related to the CI pipeline label Aug 28, 2026
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@           Coverage Diff            @@
##           develop    #1297   +/-   ##
========================================
  Coverage    84.24%   84.24%           
========================================
  Files          147      147           
  Lines        13066    13066           
  Branches      1940     1940           
========================================
  Hits         11007    11007           
  Misses        1494     1494           
  Partials       565      565           
Flag Coverage Δ
integration-tests 39.17% <ø> (ø)
python-3.10 56.99% <ø> (ø)
python-3.11 56.97% <ø> (-0.02%) ⬇️
python-3.12 56.99% <ø> (ø)
python-3.13 56.99% <ø> (ø)
python-3.14 56.99% <ø> (ø)
python-filler-3.12 23.70% <ø> (ø)

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

Files with missing lines Coverage Δ
infrahub_sdk/node/relationship.py 81.86% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ogenstad
ogenstad merged commit 99250d4 into develop Aug 28, 2026
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/ci Issue related to the CI pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants