Skip to content

improve InfrahubGeneratorDefintionConfig descriptions#905

Open
wvandeun wants to merge 1 commit intostablefrom
wvd-20260330-update-InfrahubGeneratorDefintionConfig-descriptions
Open

improve InfrahubGeneratorDefintionConfig descriptions#905
wvandeun wants to merge 1 commit intostablefrom
wvd-20260330-update-InfrahubGeneratorDefintionConfig-descriptions

Conversation

@wvandeun
Copy link
Copy Markdown
Contributor

@wvandeun wvandeun commented Mar 30, 2026

Summary by CodeRabbit

  • Documentation
    • Clarified generator configuration: GraphQL variable names now map to target attributes using double-underscore notation.
    • Specified that the generator target field is required and that group members become individual generator targets (one run per member).
    • Clarified the class name meaning (Python class extending the generator) and refined descriptions of execution-related options and response conversion.

@wvandeun wvandeun self-assigned this Mar 30, 2026
@wvandeun wvandeun requested a review from a team as a code owner March 30, 2026 08:57
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 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: 2a9965db-7a8a-4de0-9592-590bd007d18e

📥 Commits

Reviewing files that changed from the base of the PR and between 4caad26 and e60bcf7.

📒 Files selected for processing (1)
  • infrahub_sdk/schema/repository.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • infrahub_sdk/schema/repository.py

Walkthrough

The InfrahubGeneratorDefinitionConfig class in infrahub_sdk/schema/repository.py received documentation updates across multiple fields. The parameters field description now clarifies GraphQL variable name mapping using double-underscore notation. The targets field description was expanded to specify it references a CoreStandardGroup whose members each produce a separate generator run. Descriptions for class_name, convert_query_response, execute_in_proposed_change, and execute_after_merge were revised for greater precision. The change set shows 13 lines added and 6 lines removed.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author, missing context on the 'why', implementation details, and testing approach. Add a description explaining the motivation for the changes, what was updated, and how the improvements benefit users or developers.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: updating field descriptions in InfrahubGeneratorDefinitionConfig to improve clarity.

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


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
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 30, 2026

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: e60bcf7
Status: ✅  Deploy successful!
Preview URL: https://17d01c24.infrahub-sdk-python.pages.dev
Branch Preview URL: https://wvd-20260330-update-infrahub.infrahub-sdk-python.pages.dev

View logs

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@infrahub_sdk/schema/repository.py`:
- Line 108: The description string assigned to the description parameter (the
"description" argument in the schema definition) exceeds the line-length limit;
split the long string into shorter parts using implicit string literal
concatenation or join multiple strings (e.g., "When true (default), the
Generator runs as a CI check " "during proposed changes. Set to false for
event-driven Generators to avoid double execution.") so the single source line
stays under the configured limit while preserving the exact text.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 08b07edf-7bbd-40f9-aab5-aa8d569033cb

📥 Commits

Reviewing files that changed from the base of the PR and between 811ca9b and 4caad26.

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

@wvandeun wvandeun force-pushed the wvd-20260330-update-InfrahubGeneratorDefintionConfig-descriptions branch from 4caad26 to e60bcf7 Compare March 30, 2026 09:20
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@           Coverage Diff           @@
##           stable     #905   +/-   ##
=======================================
  Coverage   80.68%   80.68%           
=======================================
  Files         119      119           
  Lines       10336    10336           
  Branches     1551     1551           
=======================================
  Hits         8340     8340           
  Misses       1473     1473           
  Partials      523      523           
Flag Coverage Δ
integration-tests 41.72% <0.00%> (-0.01%) ⬇️
python-3.10 51.82% <0.00%> (ø)
python-3.11 51.84% <0.00%> (ø)
python-3.12 51.82% <0.00%> (-0.02%) ⬇️
python-3.13 51.84% <0.00%> (+0.01%) ⬆️
python-3.14 53.52% <0.00%> (-0.02%) ⬇️
python-filler-3.12 24.04% <100.00%> (ø)

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

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

convert_query_response: bool = Field(
default=False,
description="Decide if the generator should convert the result of the GraphQL query to SDK InfrahubNode objects.",
description="When true, converts the raw GraphQL dict into SDK InfrahubNode objects accessible via self.nodes and self.store.",
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.

the descriptions below indicate that the default is true. should this say that the default is false?

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.

2 participants