Skip to content

docs: explain what query-report reports and where the query name comes from - #1253

Merged
ogenstad merged 2 commits into
stablefrom
pog-query-report-help-text
Aug 20, 2026
Merged

docs: explain what query-report reports and where the query name comes from#1253
ogenstad merged 2 commits into
stablefrom
pog-query-report-help-text

Conversation

@ogenstad

@ogenstad ogenstad commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What changed

Improves the help text for infrahubctl graphql query-report. No behavior change.

The command's description was "Run a GraphQL query through InfrahubGraphQLQueryReport and report its analysis." That names an internal server type and tells a user nothing about what the answer means or why they would want it.

It now:

  • Leads with the consequence: artifact and generator definitions use the verdict to decide how much to regenerate when data changes. true means only the objects that changed are reprocessed, false means all of them are.
  • States the rule that produces the verdict.
  • Says on NAME that it is the query name declared under queries in .infrahub.yml.
  • Records on --branch that the answer is branch-dependent, because uniqueness constraints come from the schema.

Kept as plain prose with no markdown links, since the same text renders in terminal --help.

Rendered output

Regenerated with uv run invoke docs-generate; docs/docs/infrahubctl/infrahubctl-graphql.mdx is included.

Related

The Infrahub docs are updated in a companion PR (opsmill/infrahub#10293), which documents the command on the canonical Single-target queries page. The concept this command reports on is called a single-target query in user documentation.

Testing

  • uv run invoke format and uv run invoke lint-code - clean
  • uv run invoke lint-docs - no findings on the changed pages (20 pre-existing spelling errors remain in generated sdk_ref/ files)

Summary by cubic

Clarifies the help text for infrahubctl graphql query-report so users understand the verdict, the uniqueness rule, where the query name comes from, and branch dependence. No behavior change; this clarifies how artifact and generator definitions determine regeneration scope.

  • Updates CLI help and docstring in infrahub_sdk/ctl/graphql.py and the docs page docs/docs/infrahubctl/infrahubctl-graphql.mdx.
  • Defines “unique nodes” (filters on ids/hfid, or fully satisfies one uniqueness constraint with provided values) and states consequences: true → only changed objects’ artifacts/generators regenerate; false → all regenerate.
  • Notes that NAME is from the queries section of .infrahub.yml and that --branch can change results because constraints come from the schema.
  • Removes a redundant changelog entry.

Written for commit 8deae32. Summary will update on new commits.

Review in cubic

…s from

The command's help said only that it runs a query through
InfrahubGraphQLQueryReport, which names an internal type and tells a user
nothing about what the answer means.

Describe the consequence first: artifact and generator definitions use the
verdict to decide how much to regenerate when data changes. State the rule
that produces it, note that NAME comes from the queries section of
.infrahub.yml, and record on --branch that the answer is branch-dependent
because uniqueness constraints live in the schema.
@github-actions github-actions Bot added the type/documentation Improvements or additions to documentation label Aug 17, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##           stable    #1253      +/-   ##
==========================================
+ Coverage   82.47%   82.54%   +0.06%     
==========================================
  Files         138      138              
  Lines       12186    12186              
  Branches     1833     1833              
==========================================
+ Hits        10051    10059       +8     
+ Misses       1572     1568       -4     
+ Partials      563      559       -4     
Flag Coverage Δ
integration-tests 40.57% <ø> (+<0.01%) ⬆️
python-3.10 56.34% <ø> (+0.06%) ⬆️
python-3.11 56.34% <ø> (+0.06%) ⬆️
python-3.12 56.32% <ø> (+0.04%) ⬆️
python-3.13 56.32% <ø> (+0.06%) ⬆️
python-3.14 56.34% <ø> (+0.08%) ⬆️
python-filler-3.12 22.27% <ø> (+0.06%) ⬆️

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

Files with missing lines Coverage Δ
infrahub_sdk/ctl/graphql.py 91.05% <ø> (ø)

... and 3 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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually need a changelog?

@ogenstad

Copy link
Copy Markdown
Contributor Author

Does this actually need a changelog?

No I guess that's a bit redundant for this.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8deae32
Status: ✅  Deploy successful!
Preview URL: https://3764716a.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pog-query-report-help-text.infrahub-sdk-python.pages.dev

View logs

@ogenstad
ogenstad merged commit c893a98 into stable Aug 20, 2026
21 checks passed
@ogenstad
ogenstad deleted the pog-query-report-help-text branch August 20, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants