Skip to content

Comments

Prep release v1.18.0#739

Merged
wvandeun merged 60 commits intostablefrom
wvd-20260108-prep-release-1.18.0
Jan 8, 2026
Merged

Prep release v1.18.0#739
wvandeun merged 60 commits intostablefrom
wvd-20260108-prep-release-1.18.0

Conversation

@wvandeun
Copy link
Contributor

@wvandeun wvandeun commented Jan 8, 2026

Summary by CodeRabbit

Release 1.18.0

  • New Features

    • Added node metadata querying including creation/update timestamps and creator/updater information.
    • Added support for ordering query results by created_at and updated_at fields.
  • Bug Fixes

    • Fixed handling of explicit null values for optional relationships when creating nodes with object templates.
  • Removed

    • Removed deprecated background_execution parameter from branch creation.
  • Documentation

    • Added comprehensive guides for querying and accessing node metadata in queries.

✏️ Tip: You can customize this high-level summary in your review settings.

ogenstad and others added 30 commits December 2, 2025 10:25
Merge develop into infrahub-develop
Merge develop into infrahub-develop
Merge develop into infrahub-develop
Merge stable into develop
Merge develop into infrahub-develop
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 4 to 7.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@v4...v7)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action) from 21 to 22.
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases)
- [Commits](DavidAnson/markdownlint-cli2-action@v21...v22)

---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
  dependency-version: '22'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Fatih Acar <fatih@opsmill.com>
Signed-off-by: Fatih Acar <fatih@opsmill.com>
Signed-off-by: Fatih Acar <fatih@opsmill.com>
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 4 to 7.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@v4...v7)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action) from 21 to 22.
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases)
- [Commits](DavidAnson/markdownlint-cli2-action@v21...v22)

---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
  dependency-version: '22'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Fatih Acar <fatih@opsmill.com>
Signed-off-by: Fatih Acar <fatih@opsmill.com>
Signed-off-by: Fatih Acar <fatih@opsmill.com>
Remove deprecated 'background_execution' param from client.branch.create()
Merge stable into develop
Merge develop into infrahub-develop
Add ability to query for node metadata
ogenstad and others added 18 commits December 30, 2025 10:19
Use pathlib instead of os for Path operations
Fix unsupported operator on MainSchemaTypes
Merge stable into develop
…20251230b

Merge 'develop' into 'infrahub-develop' with resolved conflicts
Fixes #187 

This PR rewrites integration tests that were previously disabled. These tests are now based on the `TestInfrahubDockerClient`. Some tests are marked as `XFAIL` for now as they either highlight issues or require a different version of Infrahub server.
Add ability to order results by metadata created_at or updated_at
Merge stable into develop
Merge develop into infrahub-develop
* Add docs for metadata and ordering

* Add relationship metadata

* Remove test file
@wvandeun wvandeun requested a review from a team January 8, 2026 14:48
@wvandeun wvandeun self-assigned this Jan 8, 2026
@cloudflare-workers-and-pages
Copy link

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2017aa9
Status: ✅  Deploy successful!
Preview URL: https://6351e494.infrahub-sdk-python.pages.dev
Branch Preview URL: https://wvd-20260108-prep-release-1.infrahub-sdk-python.pages.dev

View logs

@coderabbitai
Copy link

coderabbitai bot commented Jan 8, 2026

Walkthrough

This pull request increments the SDK to version 1.18.0, introducing node and relationship metadata query support with new NodeMetadata and RelationshipMetadata classes. The background_execution parameter is removed from branch creation in favor of wait_until_completion. New ordering capabilities are added via an OrderDirection enum and NodeMetaOrder model. Several imports are migrated from os.getcwd() to pathlib.Path.cwd(). The include_metadata parameter is threaded through client query methods. Type annotations are expanded across test files, and integration test fixtures are restructured with concrete implementations. The changelog documents these additions, deprecation removals, fixes, and housekeeping items for release 1.18.0.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.15% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Prep release v1.18.0' accurately reflects the primary purpose of this changeset, which is to prepare the codebase for version 1.18.0 release with comprehensive feature additions and improvements.

✏️ 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.

@github-actions github-actions bot added group/ci Issue related to the CI pipeline type/documentation Improvements or additions to documentation labels Jan 8, 2026
@wvandeun wvandeun merged commit 391d41c into stable Jan 8, 2026
18 of 19 checks passed
@wvandeun wvandeun deleted the wvd-20260108-prep-release-1.18.0 branch January 8, 2026 14:53
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 96.57534% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
infrahub_sdk/types.py 75.00% 3 Missing ⚠️
infrahub_sdk/graphql/renderers.py 66.66% 1 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##           stable     #739      +/-   ##
==========================================
+ Coverage   76.87%   80.31%   +3.44%     
==========================================
  Files         113      115       +2     
  Lines        9776     9883     +107     
  Branches     1499     1520      +21     
==========================================
+ Hits         7515     7938     +423     
+ Misses       1754     1417     -337     
- Partials      507      528      +21     
Flag Coverage Δ
integration-tests 41.35% <24.65%> (+6.68%) ⬆️
python-3.10 51.34% <56.84%> (+0.08%) ⬆️
python-3.11 51.34% <56.84%> (+0.10%) ⬆️
python-3.12 51.36% <56.84%> (+0.12%) ⬆️
python-3.13 51.34% <56.84%> (+0.08%) ⬆️
python-3.14 52.98% <57.53%> (+0.09%) ⬆️
python-filler-3.12 24.01% <35.61%> (+0.14%) ⬆️

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

Files with missing lines Coverage Δ
infrahub_sdk/branch.py 68.30% <100.00%> (+11.93%) ⬆️
infrahub_sdk/checks.py 70.19% <100.00%> (ø)
infrahub_sdk/client.py 71.85% <ø> (+2.49%) ⬆️
infrahub_sdk/enums.py 100.00% <100.00%> (ø)
infrahub_sdk/node/attribute.py 95.45% <100.00%> (+0.45%) ⬆️
infrahub_sdk/node/constants.py 100.00% <100.00%> (ø)
infrahub_sdk/node/metadata.py 100.00% <100.00%> (ø)
infrahub_sdk/node/node.py 84.98% <100.00%> (+5.67%) ⬆️
infrahub_sdk/node/property.py 93.75% <100.00%> (+0.89%) ⬆️
infrahub_sdk/node/related_node.py 92.44% <100.00%> (+2.24%) ⬆️
... and 4 more

... and 10 files with indirect coverage changes

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

Copy link

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
tests/unit/sdk/test_node.py (1)

1876-1882: Use InfrahubNodeSync for tag_blue in the sync branch

In test_update_input_data_empty_relationship, the sync path creates:

  • location = InfrahubNodeSync(...)
  • tag_blue = InfrahubNode(...) (async variant)

Given all other tests pair sync nodes with sync peers, this looks unintentional and makes the sync branch slightly inconsistent. It’s probably working because both share a base type, but it’s clearer (and safer for future refactors) to use the sync node type for tag_blue here as well.

Suggested adjustment
-    else:
-        location = InfrahubNodeSync(client=client, schema=location_schema, data=location_data)
-        tag_blue = InfrahubNode(client=client, schema=tag_schema, data=tag_blue_data)
+    else:
+        location = InfrahubNodeSync(client=client, schema=location_schema, data=location_data)
+        tag_blue = InfrahubNodeSync(client=client, schema=tag_schema, data=tag_blue_data)
docs/docs/python-sdk/guides/query_data.mdx (2)

9-14: Inconsistent count: states "3 ways" but lists 4 methods.

The text says "We can query data in 3 ways" but actually lists 4 bullet points.

📝 Suggested fix
-We can query data in 3 ways using the SDK:
+We can query data in 4 ways using the SDK:

109-111: Missing await in async example.

The async example for the filters method is missing the await keyword.

📝 Suggested fix
-  tags = client.filters(kind="BuiltinTag", name__values=["RED", "BLUE"])
+  tags = await client.filters(kind="BuiltinTag", name__values=["RED", "BLUE"])
🤖 Fix all issues with AI agents
In @.github/workflows/ci.yml:
- Line 89: The CI lint job currently runs the command "run: uv sync --all-groups
--all-extras" which installs unnecessary dependency groups; update the
python-lint job to only sync the lint group by changing that command to use "uv
sync --group lint" (or "uv sync --group lint --group types" only if you later
add mypy), so the job installs just ruff, yamllint, ty and their required extras
instead of all optional/test groups.
🧹 Nitpick comments (9)
tests/unit/ctl/test_transform_app.py (1)

21-23: Remove redundant Path() wrapper.

The expression Path(Path(__file__).resolve()) contains a redundant outer Path() call since .resolve() already returns a Path object.

♻️ Simplified path construction
-FIXTURE_BASE_DIR = Path(
-    Path(Path(__file__).resolve()).parent / ".." / ".." / "fixtures" / "integration" / "test_infrahubctl"
-)
+FIXTURE_BASE_DIR = Path(__file__).resolve().parent / ".." / ".." / "fixtures" / "integration" / "test_infrahubctl"

Alternatively, for even better readability, you could use .parent multiple times instead of ".." strings:

-FIXTURE_BASE_DIR = Path(
-    Path(Path(__file__).resolve()).parent / ".." / ".." / "fixtures" / "integration" / "test_infrahubctl"
-)
+FIXTURE_BASE_DIR = Path(__file__).resolve().parent.parent.parent / "fixtures" / "integration" / "test_infrahubctl"
tests/unit/ctl/test_render_app.py (1)

16-16: Remove redundant Path() wrapper.

The expression Path(Path(Path(__file__).resolve()).parent / ...) contains a redundant outer Path() call since .resolve() already returns a Path object, and the subsequent operations maintain the Path type.

♻️ Simplified path construction
-FIXTURE_BASE_DIR = Path(Path(Path(__file__).resolve()).parent / ".." / ".." / "fixtures" / "repos")
+FIXTURE_BASE_DIR = Path(__file__).resolve().parent / ".." / ".." / "fixtures" / "repos"

Alternatively, for even better readability, you could use .parent multiple times:

-FIXTURE_BASE_DIR = Path(Path(Path(__file__).resolve()).parent / ".." / ".." / "fixtures" / "repos")
+FIXTURE_BASE_DIR = Path(__file__).resolve().parent.parent.parent / "fixtures" / "repos"
tests/unit/sdk/test_group_context.py (1)

2-8: Broaden Callable types used for return-annotation transformers

Importing Callable and typing std_group_schema as NodeSchemaAPI is a good improvement. For test_validate_method_signature, though, replace_sync_return_annotation / replace_async_return_annotation are currently typed as Callable[[str], str] but are invoked with inspect.Signature.return_annotation, which may be arbitrary types (or inspect._empty), not just str. Consider relaxing these to something like Callable[[object], object] or Callable[[Any], Any] to reflect actual usage and avoid misleading type information.

Also applies to: 21-26, 72-80

infrahub_sdk/client.py (1)

785-805: Async filters docstring return type is slightly misleading

While the new include_metadata parameter and behavior are correct, the filters docstring still says:

Returns: list[InfrahubNodeSync]

for the async client. That should ideally mention InfrahubNode / the async schema type instead to match the actual return type. Purely a documentation nit, but easy to fix alongside these signature changes.

Also applies to: 805-827

infrahub_sdk/branch.py (1)

63-81: Consider fixing missing '?' in generate_diff_data_url

Unrelated to the new wait_until_completion work, but while you’re here: generate_diff_data_url currently returns url + urlencode(url_params), which will produce paths like /api/diff/databranch=... instead of /api/diff/data?branch=.... That’s very likely incorrect for the diff-data API.

Suggest adjusting this to insert a "?" before the encoded params (or use urllib.parse.urlencode with proper joining) in a follow-up change.

tests/integration/test_export_import.py (2)

106-135: Consider making tests independent to improve reliability.

The tests test_step01_export_no_schema and test_step02_import_no_schema appear to have an execution order dependency, where step02 relies on the files exported by step01. While this may work in practice, test execution order is not guaranteed by pytest, which could lead to flaky tests.

Consider refactoring to make tests independent by:

  • Using fixtures to set up the required export files for each test
  • Or explicitly documenting the execution order requirement with pytest plugins like pytest-order

The same pattern appears in later tests (step03-step05) and in the TestSchemaExportImportManyRelationships class.


101-104: Consider using fixture teardown for cleanup.

The reset_export_directory method is called manually within test bodies. While this works, using pytest fixture teardown (with yield and cleanup after) would ensure cleanup happens even if tests fail and would make the cleanup pattern more explicit.

Example fixture pattern
@pytest.fixture(scope="class")
def export_directory(self, temporary_directory: Path) -> Generator[Path, None, None]:
    yield temporary_directory
    # Cleanup after tests
    for file in temporary_directory.iterdir():
        if file.is_file():
            file.unlink()

Also applies to: 135-135, 182-182, 265-268, 327-327

infrahub_sdk/graphql/renderers.py (1)

58-86: Consider refactoring to reduce code duplication.

The handling for Order (lines 58-67), BaseModel (lines 68-77), and dict (lines 78-86) follows nearly identical logic, with only minor variations:

  • Order uses model_dump(exclude_none=True)
  • BaseModel uses model_dump() without exclude_none
  • dict directly iterates over items

While the current ordering is correct (Order before BaseModel to handle it specifically), consider extracting the common key-value iteration pattern into a helper function to reduce duplication.

Additionally, it would be helpful to document why Order specifically requires exclude_none=True while other BaseModel instances do not.

Example refactor
def _render_dict_as_graphql(data: dict, convert_enum: bool = False) -> str:
    return (
        "{ "
        + ", ".join(
            f"{key}: {convert_to_graphql_as_string(value=val, convert_enum=convert_enum)}"
            for key, val in data.items()
        )
        + " }"
    )

# Then use it:
if isinstance(value, Order):
    # exclude_none=True for Order to omit optional fields in GraphQL queries
    return _render_dict_as_graphql(value.model_dump(exclude_none=True), convert_enum)
if isinstance(value, BaseModel):
    return _render_dict_as_graphql(value.model_dump(), convert_enum)
if isinstance(value, dict):
    return _render_dict_as_graphql(value, convert_enum)
tests/integration/test_schema.py (1)

1-1: Unused import.

Any is imported but not used in this file.

♻️ Suggested fix
-from typing import Any
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0cec7ec and 2017aa9.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (57)
  • .github/workflows/ci.yml
  • CHANGELOG.md
  • changelog/+1b40f022.housekeeping.md
  • changelog/630.fixed.md
  • docs/docs/python-sdk/guides/query_data.mdx
  • infrahub_sdk/branch.py
  • infrahub_sdk/checks.py
  • infrahub_sdk/client.py
  • infrahub_sdk/enums.py
  • infrahub_sdk/graphql/renderers.py
  • infrahub_sdk/node/attribute.py
  • infrahub_sdk/node/constants.py
  • infrahub_sdk/node/metadata.py
  • infrahub_sdk/node/node.py
  • infrahub_sdk/node/property.py
  • infrahub_sdk/node/related_node.py
  • infrahub_sdk/node/relationship.py
  • infrahub_sdk/operation.py
  • infrahub_sdk/types.py
  • pyproject.toml
  • tests/conftest.py
  • tests/fixtures/integration/test_infrahubctl/tags_transform/tags_transform.py
  • tests/fixtures/repos/ctl_integration/transforms/animal_person.py
  • tests/fixtures/repos/ctl_integration/transforms/converted.py
  • tests/helpers/utils.py
  • tests/integration/conftest.py
  • tests/integration/test_convert_object_type.py
  • tests/integration/test_export_import.py
  • tests/integration/test_infrahub_client.py
  • tests/integration/test_infrahub_client_sync.py
  • tests/integration/test_infrahubctl.py
  • tests/integration/test_node.py
  • tests/integration/test_object_store.py
  • tests/integration/test_repository.py
  • tests/integration/test_schema.py
  • tests/unit/ctl/test_branch_app.py
  • tests/unit/ctl/test_branch_report.py
  • tests/unit/ctl/test_cli.py
  • tests/unit/ctl/test_graphql_app.py
  • tests/unit/ctl/test_render_app.py
  • tests/unit/ctl/test_repository_app.py
  • tests/unit/ctl/test_transform_app.py
  • tests/unit/pytest_plugin/test_plugin.py
  • tests/unit/sdk/checks/test_checks.py
  • tests/unit/sdk/conftest.py
  • tests/unit/sdk/graphql/test_renderer.py
  • tests/unit/sdk/test_batch.py
  • tests/unit/sdk/test_branch.py
  • tests/unit/sdk/test_group_context.py
  • tests/unit/sdk/test_node.py
  • tests/unit/sdk/test_protocols_generator.py
  • tests/unit/sdk/test_query_analyzer.py
  • tests/unit/sdk/test_repository.py
  • tests/unit/sdk/test_schema_sorter.py
  • tests/unit/sdk/test_store_branch.py
  • tests/unit/sdk/test_timestamp.py
  • tests/unit/sdk/test_utils.py
💤 Files with no reviewable changes (2)
  • changelog/+1b40f022.housekeeping.md
  • changelog/630.fixed.md
🧰 Additional context used
📓 Path-based instructions (9)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Use type hints on all function signatures
Never mix async/sync inappropriately
Never bypass type checking without justification

Files:

  • infrahub_sdk/enums.py
  • tests/fixtures/repos/ctl_integration/transforms/animal_person.py
  • tests/unit/sdk/conftest.py
  • tests/integration/test_export_import.py
  • tests/conftest.py
  • tests/fixtures/repos/ctl_integration/transforms/converted.py
  • tests/unit/sdk/test_batch.py
  • tests/integration/test_convert_object_type.py
  • tests/unit/sdk/test_group_context.py
  • tests/unit/ctl/test_cli.py
  • infrahub_sdk/graphql/renderers.py
  • tests/unit/ctl/test_graphql_app.py
  • tests/integration/conftest.py
  • tests/unit/ctl/test_transform_app.py
  • tests/unit/sdk/test_timestamp.py
  • tests/unit/sdk/test_protocols_generator.py
  • infrahub_sdk/node/constants.py
  • tests/unit/sdk/test_utils.py
  • infrahub_sdk/node/property.py
  • tests/integration/test_node.py
  • infrahub_sdk/node/related_node.py
  • tests/unit/sdk/test_query_analyzer.py
  • infrahub_sdk/checks.py
  • infrahub_sdk/node/metadata.py
  • tests/fixtures/integration/test_infrahubctl/tags_transform/tags_transform.py
  • tests/unit/sdk/checks/test_checks.py
  • tests/unit/sdk/test_schema_sorter.py
  • tests/unit/sdk/test_branch.py
  • tests/integration/test_infrahubctl.py
  • infrahub_sdk/branch.py
  • tests/integration/test_repository.py
  • tests/helpers/utils.py
  • tests/unit/sdk/graphql/test_renderer.py
  • infrahub_sdk/node/node.py
  • tests/unit/sdk/test_repository.py
  • tests/unit/ctl/test_render_app.py
  • tests/unit/sdk/test_store_branch.py
  • tests/integration/test_infrahub_client_sync.py
  • tests/integration/test_object_store.py
  • infrahub_sdk/node/relationship.py
  • tests/integration/test_schema.py
  • tests/unit/ctl/test_branch_app.py
  • tests/unit/ctl/test_repository_app.py
  • infrahub_sdk/operation.py
  • tests/unit/ctl/test_branch_report.py
  • infrahub_sdk/client.py
  • infrahub_sdk/types.py
  • tests/integration/test_infrahub_client.py
  • tests/unit/sdk/test_node.py
  • infrahub_sdk/node/attribute.py
  • tests/unit/pytest_plugin/test_plugin.py
infrahub_sdk/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Follow async/sync dual pattern for new features in the Python SDK

Files:

  • infrahub_sdk/enums.py
  • infrahub_sdk/graphql/renderers.py
  • infrahub_sdk/node/constants.py
  • infrahub_sdk/node/property.py
  • infrahub_sdk/node/related_node.py
  • infrahub_sdk/checks.py
  • infrahub_sdk/node/metadata.py
  • infrahub_sdk/branch.py
  • infrahub_sdk/node/node.py
  • infrahub_sdk/node/relationship.py
  • infrahub_sdk/operation.py
  • infrahub_sdk/client.py
  • infrahub_sdk/types.py
  • infrahub_sdk/node/attribute.py
tests/**/*.py

📄 CodeRabbit inference engine (tests/AGENTS.md)

tests/**/*.py: Use httpx_mock fixture for HTTP mocking in tests instead of making real HTTP requests
Do not add @pytest.mark.asyncio decorator to async test functions (async auto-mode is globally enabled)

Files:

  • tests/fixtures/repos/ctl_integration/transforms/animal_person.py
  • tests/unit/sdk/conftest.py
  • tests/integration/test_export_import.py
  • tests/conftest.py
  • tests/fixtures/repos/ctl_integration/transforms/converted.py
  • tests/unit/sdk/test_batch.py
  • tests/integration/test_convert_object_type.py
  • tests/unit/sdk/test_group_context.py
  • tests/unit/ctl/test_cli.py
  • tests/unit/ctl/test_graphql_app.py
  • tests/integration/conftest.py
  • tests/unit/ctl/test_transform_app.py
  • tests/unit/sdk/test_timestamp.py
  • tests/unit/sdk/test_protocols_generator.py
  • tests/unit/sdk/test_utils.py
  • tests/integration/test_node.py
  • tests/unit/sdk/test_query_analyzer.py
  • tests/fixtures/integration/test_infrahubctl/tags_transform/tags_transform.py
  • tests/unit/sdk/checks/test_checks.py
  • tests/unit/sdk/test_schema_sorter.py
  • tests/unit/sdk/test_branch.py
  • tests/integration/test_infrahubctl.py
  • tests/integration/test_repository.py
  • tests/helpers/utils.py
  • tests/unit/sdk/graphql/test_renderer.py
  • tests/unit/sdk/test_repository.py
  • tests/unit/ctl/test_render_app.py
  • tests/unit/sdk/test_store_branch.py
  • tests/integration/test_infrahub_client_sync.py
  • tests/integration/test_object_store.py
  • tests/integration/test_schema.py
  • tests/unit/ctl/test_branch_app.py
  • tests/unit/ctl/test_repository_app.py
  • tests/unit/ctl/test_branch_report.py
  • tests/integration/test_infrahub_client.py
  • tests/unit/sdk/test_node.py
  • tests/unit/pytest_plugin/test_plugin.py
tests/unit/**/*.py

📄 CodeRabbit inference engine (tests/AGENTS.md)

Unit tests must be fast, mocked, and have no external dependencies

Files:

  • tests/unit/sdk/conftest.py
  • tests/unit/sdk/test_batch.py
  • tests/unit/sdk/test_group_context.py
  • tests/unit/ctl/test_cli.py
  • tests/unit/ctl/test_graphql_app.py
  • tests/unit/ctl/test_transform_app.py
  • tests/unit/sdk/test_timestamp.py
  • tests/unit/sdk/test_protocols_generator.py
  • tests/unit/sdk/test_utils.py
  • tests/unit/sdk/test_query_analyzer.py
  • tests/unit/sdk/checks/test_checks.py
  • tests/unit/sdk/test_schema_sorter.py
  • tests/unit/sdk/test_branch.py
  • tests/unit/sdk/graphql/test_renderer.py
  • tests/unit/sdk/test_repository.py
  • tests/unit/ctl/test_render_app.py
  • tests/unit/sdk/test_store_branch.py
  • tests/unit/ctl/test_branch_app.py
  • tests/unit/ctl/test_repository_app.py
  • tests/unit/ctl/test_branch_report.py
  • tests/unit/sdk/test_node.py
  • tests/unit/pytest_plugin/test_plugin.py
tests/integration/**/*.py

📄 CodeRabbit inference engine (tests/AGENTS.md)

tests/integration/**/*.py: Integration tests should use testcontainers to interact with real Infrahub instances
Clean up resources in integration tests

Files:

  • tests/integration/test_export_import.py
  • tests/integration/test_convert_object_type.py
  • tests/integration/conftest.py
  • tests/integration/test_node.py
  • tests/integration/test_infrahubctl.py
  • tests/integration/test_repository.py
  • tests/integration/test_infrahub_client_sync.py
  • tests/integration/test_object_store.py
  • tests/integration/test_schema.py
  • tests/integration/test_infrahub_client.py
**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{md,mdx}: Use text language for directory structure code blocks in markdown documentation
Add blank lines before and after lists in markdown documentation
Always specify language in fenced code blocks in markdown documentation

Files:

  • docs/docs/python-sdk/guides/query_data.mdx
  • CHANGELOG.md
docs/docs/**/*.mdx

📄 CodeRabbit inference engine (docs/AGENTS.md)

docs/docs/**/*.mdx: Create MDX files in appropriate directory within docs structure (guides, topics, or reference)
Add frontmatter with title field to MDX documentation files
Use callouts (:::warning, :::note, etc.) for important notes and information in documentation

Files:

  • docs/docs/python-sdk/guides/query_data.mdx
docs/docs/python-sdk/{guides,topics}/**/*.mdx

📄 CodeRabbit inference engine (docs/AGENTS.md)

docs/docs/python-sdk/{guides,topics}/**/*.mdx: Use Tabs component from '@theme/Tabs' for async/sync examples in documentation
Include both async/sync examples using Tabs in documentation

Files:

  • docs/docs/python-sdk/guides/query_data.mdx
infrahub_sdk/client.py

📄 CodeRabbit inference engine (AGENTS.md)

Always provide both async and sync versions of client implementations in InfrahubClient

Files:

  • infrahub_sdk/client.py
🧠 Learnings (13)
📚 Learning: 2025-12-10T17:13:08.136Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:08.136Z
Learning: Run `uv run invoke format lint` before committing Python code

Applied to files:

  • .github/workflows/ci.yml
📚 Learning: 2025-12-10T17:13:37.990Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: tests/AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:37.990Z
Learning: Applies to tests/**/*.py : Use `httpx_mock` fixture for HTTP mocking in tests instead of making real HTTP requests

Applied to files:

  • tests/unit/sdk/conftest.py
  • tests/unit/ctl/test_cli.py
  • tests/unit/sdk/test_protocols_generator.py
  • tests/unit/sdk/checks/test_checks.py
  • tests/unit/sdk/test_schema_sorter.py
  • tests/unit/ctl/test_render_app.py
  • tests/unit/ctl/test_branch_app.py
  • tests/unit/ctl/test_repository_app.py
  • tests/unit/ctl/test_branch_report.py
  • tests/unit/sdk/test_node.py
📚 Learning: 2025-12-10T17:13:29.593Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: infrahub_sdk/pytest_plugin/AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:29.593Z
Learning: Applies to infrahub_sdk/pytest_plugin/**/infrahub_sdk/pytest_plugin/loader.py : Register new test items in `ITEMS_MAPPING` in `infrahub_sdk/pytest_plugin/loader.py`

Applied to files:

  • tests/conftest.py
  • tests/unit/pytest_plugin/test_plugin.py
📚 Learning: 2025-12-10T17:13:29.593Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: infrahub_sdk/pytest_plugin/AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:29.593Z
Learning: Applies to infrahub_sdk/pytest_plugin/**/infrahub_sdk/pytest_plugin/items/*.py : Inherit from `InfrahubItem` base class when creating new test item classes in `infrahub_sdk/pytest_plugin/items/`

Applied to files:

  • tests/conftest.py
  • tests/integration/test_convert_object_type.py
  • tests/unit/sdk/checks/test_checks.py
📚 Learning: 2025-12-10T17:13:08.136Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:08.136Z
Learning: Applies to infrahub_sdk/client.py : Always provide both async and sync versions of client implementations in InfrahubClient

Applied to files:

  • tests/integration/test_convert_object_type.py
  • pyproject.toml
  • tests/unit/sdk/checks/test_checks.py
  • tests/unit/sdk/test_branch.py
  • infrahub_sdk/client.py
  • tests/unit/sdk/test_node.py
📚 Learning: 2025-12-10T17:13:37.990Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: tests/AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:37.990Z
Learning: Applies to tests/integration/**/*.py : Integration tests should use testcontainers to interact with real Infrahub instances

Applied to files:

  • tests/integration/test_convert_object_type.py
  • tests/unit/ctl/test_transform_app.py
  • tests/unit/sdk/checks/test_checks.py
  • tests/integration/test_infrahub_client_sync.py
  • tests/integration/test_infrahub_client.py
📚 Learning: 2025-12-10T17:13:29.593Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: infrahub_sdk/pytest_plugin/AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:29.593Z
Learning: Applies to infrahub_sdk/pytest_plugin/**/*.yaml : Use YAML test format with required fields: `infrahub_tests`, `resource`, `resource_name`, `tests` array containing `name`, `spec.kind`, `input`, and `output`

Applied to files:

  • tests/integration/test_convert_object_type.py
  • tests/unit/sdk/checks/test_checks.py
  • tests/integration/test_infrahubctl.py
  • tests/unit/pytest_plugin/test_plugin.py
📚 Learning: 2025-12-10T17:13:21.977Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: infrahub_sdk/ctl/AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:21.977Z
Learning: Applies to infrahub_sdk/ctl/**/*.py : Do not instantiate InfrahubClient directly; always use initialize_client() or initialize_client_sync() helper functions

Applied to files:

  • tests/integration/test_convert_object_type.py
📚 Learning: 2025-12-10T17:13:08.136Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:08.136Z
Learning: Applies to **/*.py : Never bypass type checking without justification

Applied to files:

  • pyproject.toml
📚 Learning: 2025-11-25T13:23:15.190Z
Learnt from: wvandeun
Repo: opsmill/infrahub-sdk-python PR: 637
File: infrahub_sdk/operation.py:74-76
Timestamp: 2025-11-25T13:23:15.190Z
Learning: In infrahub_sdk/operation.py, the recursive=True parameter in _process_relationships is a temporary workaround to access Proposed Changes data. This will be replaced with proper object-level metadata implementation in version 1.7.

Applied to files:

  • infrahub_sdk/node/related_node.py
  • infrahub_sdk/node/relationship.py
📚 Learning: 2025-12-10T17:13:08.136Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:08.136Z
Learning: Applies to infrahub_sdk/**/*.py : Follow async/sync dual pattern for new features in the Python SDK

Applied to files:

  • tests/unit/sdk/checks/test_checks.py
  • tests/unit/sdk/test_branch.py
  • infrahub_sdk/client.py
📚 Learning: 2025-12-10T17:13:08.136Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:08.136Z
Learning: Applies to **/*.py : Use type hints on all function signatures

Applied to files:

  • tests/unit/sdk/test_branch.py
📚 Learning: 2025-11-25T13:29:23.062Z
Learnt from: wvandeun
Repo: opsmill/infrahub-sdk-python PR: 637
File: infrahub_sdk/ctl/branch.py:290-290
Timestamp: 2025-11-25T13:29:23.062Z
Learning: In infrahub_sdk/ctl/branch.py, the report command uses pc.created_by.updated_at to display "Created at" for proposed changes as a workaround because the SDK doesn't have easy access to the creation time of the proposed change. This will be replaced with proper object-level metadata implementation in version 1.7 of Infrahub.

Applied to files:

  • infrahub_sdk/branch.py
🧬 Code graph analysis (31)
infrahub_sdk/enums.py (1)
infrahub_sdk/protocols_base.py (1)
  • Enum (110-111)
tests/fixtures/repos/ctl_integration/transforms/animal_person.py (3)
tests/fixtures/integration/test_infrahubctl/tags_transform/tags_transform.py (1)
  • transform (10-15)
tests/fixtures/repos/ctl_integration/transforms/converted.py (1)
  • transform (10-18)
infrahub_sdk/transforms.py (1)
  • transform (53-54)
tests/integration/test_export_import.py (5)
infrahub_sdk/transfer/exceptions.py (1)
  • TransferFileNotFoundError (7-7)
infrahub_sdk/transfer/exporter/json.py (2)
  • LineDelimitedJSONExporter (24-169)
  • export (101-169)
infrahub_sdk/transfer/importer/json.py (2)
  • LineDelimitedJSONImporter (27-200)
  • import_data (54-99)
infrahub_sdk/transfer/schema_sorter.py (1)
  • InfrahubSchemaTopologicalSorter (13-33)
tests/unit/sdk/conftest.py (1)
  • client (32-33)
tests/fixtures/repos/ctl_integration/transforms/converted.py (3)
tests/fixtures/integration/test_infrahubctl/tags_transform/tags_transform.py (1)
  • transform (10-15)
tests/fixtures/repos/ctl_integration/transforms/animal_person.py (1)
  • transform (9-16)
infrahub_sdk/transforms.py (1)
  • transform (53-54)
tests/unit/sdk/test_batch.py (1)
tests/unit/sdk/conftest.py (2)
  • mock_query_mutation_location_create_failed (2152-2169)
  • mock_schema_query_01 (1815-1822)
tests/integration/test_convert_object_type.py (3)
infrahub_sdk/client.py (4)
  • convert_object_type (1732-1762)
  • convert_object_type (3153-3183)
  • InfrahubClient (318-1762)
  • InfrahubClientSync (1765-3183)
infrahub_sdk/convert_object_type.py (2)
  • ConversionFieldInput (43-61)
  • ConversionFieldValue (21-40)
infrahub_sdk/testing/docker.py (1)
  • TestInfrahubDockerClient (36-47)
tests/unit/ctl/test_cli.py (2)
tests/unit/sdk/conftest.py (2)
  • mock_query_infrahub_version (2173-2175)
  • mock_query_infrahub_user (2179-2182)
infrahub_sdk/async_typer.py (1)
  • runner (18-19)
infrahub_sdk/graphql/renderers.py (1)
infrahub_sdk/types.py (1)
  • Order (84-88)
tests/unit/sdk/test_protocols_generator.py (1)
tests/unit/sdk/conftest.py (2)
  • client (32-33)
  • mock_schema_query_05 (1843-1850)
tests/unit/sdk/test_utils.py (2)
infrahub_sdk/utils.py (1)
  • is_valid_url (215-227)
tests/unit/sdk/conftest.py (2)
  • query_01 (2186-2209)
  • query_02 (2213-2254)
infrahub_sdk/node/property.py (2)
infrahub_sdk/node/related_node.py (3)
  • id (92-95)
  • display_label (120-123)
  • typename (126-129)
infrahub_sdk/protocols_base.py (3)
  • id (15-15)
  • display_label (30-30)
  • typename (33-33)
tests/integration/test_node.py (2)
infrahub_sdk/exceptions.py (1)
  • UninitializedError (158-159)
infrahub_sdk/protocols.py (1)
  • IpamNamespace (587-588)
infrahub_sdk/node/related_node.py (3)
infrahub_sdk/node/metadata.py (4)
  • NodeMetadata (6-41)
  • RelationshipMetadata (44-69)
  • _generate_query_data (34-41)
  • _generate_query_data (64-69)
infrahub_sdk/node/relationship.py (2)
  • is_from_profile (61-66)
  • _generate_query_data (76-112)
infrahub_sdk/node/attribute.py (1)
  • _generate_query_data (112-128)
tests/unit/sdk/test_query_analyzer.py (1)
tests/unit/sdk/conftest.py (2)
  • query_01 (2186-2209)
  • bad_query_01 (2375-2395)
infrahub_sdk/node/metadata.py (3)
infrahub_sdk/node/property.py (1)
  • NodeProperty (4-27)
infrahub_sdk/node/attribute.py (1)
  • _generate_query_data (112-128)
infrahub_sdk/node/relationship.py (1)
  • _generate_query_data (76-112)
tests/fixtures/integration/test_infrahubctl/tags_transform/tags_transform.py (3)
infrahub_sdk/transforms.py (1)
  • InfrahubTransform (17-81)
tests/fixtures/repos/ctl_integration/transforms/animal_person.py (1)
  • transform (9-16)
tests/fixtures/repos/ctl_integration/transforms/converted.py (1)
  • transform (10-18)
tests/unit/sdk/test_schema_sorter.py (2)
infrahub_sdk/transfer/schema_sorter.py (1)
  • InfrahubSchemaTopologicalSorter (13-33)
tests/unit/sdk/conftest.py (1)
  • mock_schema_query_01 (1815-1822)
tests/unit/sdk/test_branch.py (1)
tests/unit/sdk/conftest.py (3)
  • BothClients (25-28)
  • clients (42-46)
  • mock_branches_list_query (1429-1465)
tests/unit/sdk/graphql/test_renderer.py (2)
infrahub_sdk/graphql/renderers.py (2)
  • render_input_block (177-237)
  • render_query_block (108-174)
tests/unit/sdk/graphql/conftest.py (4)
  • query_data_no_filter (18-25)
  • query_data_alias (29-36)
  • query_data_fragment (40-49)
  • input_data_01 (94-103)
infrahub_sdk/node/node.py (4)
infrahub_sdk/node/metadata.py (3)
  • NodeMetadata (6-41)
  • _generate_query_data (34-41)
  • _generate_query_data (64-69)
infrahub_sdk/node/related_node.py (3)
  • _generate_query_data (174-210)
  • get (247-257)
  • get (294-304)
infrahub_sdk/node/attribute.py (1)
  • _generate_query_data (112-128)
infrahub_sdk/node/relationship.py (1)
  • _generate_query_data (76-112)
tests/unit/sdk/test_repository.py (1)
infrahub_sdk/repository.py (2)
  • GitRepoManager (9-32)
  • active_branch (31-32)
tests/unit/sdk/test_store_branch.py (2)
infrahub_sdk/schema/main.py (1)
  • NodeSchemaAPI (312-314)
tests/unit/sdk/conftest.py (2)
  • schema_with_hfid (226-287)
  • location_schema (148-180)
tests/integration/test_infrahub_client_sync.py (3)
infrahub_sdk/constants.py (1)
  • InfrahubClientMode (4-7)
infrahub_sdk/exceptions.py (1)
  • URLNotFoundError (148-151)
infrahub_sdk/types.py (1)
  • Order (84-88)
tests/integration/test_object_store.py (2)
infrahub_sdk/testing/docker.py (1)
  • TestInfrahubDockerClient (36-47)
infrahub_sdk/client.py (1)
  • InfrahubClient (318-1762)
infrahub_sdk/node/relationship.py (3)
infrahub_sdk/node/metadata.py (4)
  • NodeMetadata (6-41)
  • RelationshipMetadata (44-69)
  • _generate_query_data (34-41)
  • _generate_query_data (64-69)
infrahub_sdk/node/related_node.py (2)
  • is_from_profile (138-142)
  • _generate_query_data (174-210)
infrahub_sdk/protocols_base.py (1)
  • _generate_query_data (40-40)
tests/unit/ctl/test_branch_app.py (3)
tests/unit/sdk/conftest.py (1)
  • mock_branches_list_query (1429-1465)
infrahub_sdk/async_typer.py (1)
  • runner (18-19)
tests/unit/ctl/conftest.py (2)
  • authentication_error_payload (68-77)
  • mock_branch_create_error (81-99)
tests/unit/ctl/test_repository_app.py (1)
tests/unit/ctl/conftest.py (1)
  • mock_repositories_list (135-171)
infrahub_sdk/types.py (1)
infrahub_sdk/enums.py (1)
  • OrderDirection (4-6)
tests/integration/test_infrahub_client.py (3)
infrahub_sdk/constants.py (1)
  • InfrahubClientMode (4-7)
infrahub_sdk/exceptions.py (1)
  • URLNotFoundError (148-151)
infrahub_sdk/types.py (1)
  • Order (84-88)
tests/unit/sdk/test_node.py (4)
infrahub_sdk/node/relationship.py (4)
  • RelationshipManager (115-235)
  • RelationshipManagerBase (22-112)
  • is_from_profile (61-66)
  • _generate_query_data (76-112)
infrahub_sdk/node/metadata.py (4)
  • NodeMetadata (6-41)
  • RelationshipMetadata (44-69)
  • _generate_query_data (34-41)
  • _generate_query_data (64-69)
infrahub_sdk/node/property.py (1)
  • NodeProperty (4-27)
infrahub_sdk/node/related_node.py (11)
  • RelatedNode (213-257)
  • RelatedNodeSync (260-304)
  • get (247-257)
  • get (294-304)
  • kind (132-135)
  • RelatedNodeBase (17-210)
  • is_from_profile (138-142)
  • id (92-95)
  • display_label (120-123)
  • get_relationship_metadata (144-146)
  • _generate_query_data (174-210)
infrahub_sdk/node/attribute.py (3)
infrahub_sdk/node/property.py (1)
  • NodeProperty (4-27)
infrahub_sdk/node/metadata.py (2)
  • _generate_query_data (34-41)
  • _generate_query_data (64-69)
infrahub_sdk/node/relationship.py (1)
  • _generate_query_data (76-112)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: unit-tests (3.12)
  • GitHub Check: unit-tests (3.11)
  • GitHub Check: unit-tests (3.13)
  • GitHub Check: documentation
  • GitHub Check: unit-tests (3.14)
  • GitHub Check: unit-tests (3.10)
  • GitHub Check: Cloudflare Pages

version: "${{ needs.prepare-environment.outputs.UV_VERSION }}"
- name: Install dependencies
run: uv sync --group lint
run: uv sync --all-groups --all-extras
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# Find and examine the pyproject.toml file
fd pyproject.toml

Repository: opsmill/infrahub-sdk-python

Length of output: 85


🏁 Script executed:

# Check the structure of dependency groups
cat pyproject.toml | head -100

Repository: opsmill/infrahub-sdk-python

Length of output: 2458


🏁 Script executed:

# Look for dependency groups in pyproject.toml
rg '\[dependency-groups\]|\[project.optional-dependencies\]|\[\[tool.uv\]\]|group.*=' pyproject.toml -A 5

Repository: opsmill/infrahub-sdk-python

Length of output: 579


🏁 Script executed:

# Check what's actually in the lint group
rg 'group.*lint|lint.*=' pyproject.toml -B 2 -A 10

Repository: opsmill/infrahub-sdk-python

Length of output: 539


🏁 Script executed:

# Check current linting tool configuration
rg '\[tool.ruff\]' pyproject.toml -A 30

Repository: opsmill/infrahub-sdk-python

Length of output: 627


🏁 Script executed:

# View the CI workflow file around line 89
cat -n .github/workflows/ci.yml | sed -n '80,100p'

Repository: opsmill/infrahub-sdk-python

Length of output: 876


🏁 Script executed:

# Check if there are any comments in the workflow explaining this change
rg 'uv sync' .github/workflows/ci.yml -B 2 -A 2

Repository: opsmill/infrahub-sdk-python

Length of output: 1247


🏁 Script executed:

# See the full lint job context
rg 'name:.*[Ll]int|jobs:' .github/workflows/ci.yml -A 30 | head -60

Repository: opsmill/infrahub-sdk-python

Length of output: 2185


Use only necessary dependency groups in the lint job.

The change from uv sync --group lint to uv sync --all-groups --all-extras is unnecessary. The python-lint job only runs ruff, yamllint, and ty (all from the lint group). It does not run mypy or use type stubs, test dependencies, or other optional groups.

Revert to uv sync --group lint for this job. If you added --all-groups --all-extras as a catch-all, consider using the minimal necessary groups instead: --group lint suffices for linting, or --group lint --group types only if mypy is added to this job later.

🤖 Prompt for AI Agents
In @.github/workflows/ci.yml at line 89, The CI lint job currently runs the
command "run: uv sync --all-groups --all-extras" which installs unnecessary
dependency groups; update the python-lint job to only sync the lint group by
changing that command to use "uv sync --group lint" (or "uv sync --group lint
--group types" only if you later add mypy), so the job installs just ruff,
yamllint, ty and their required extras instead of all optional/test groups.

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 type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants