Skip to content

Conversation

@infrahub-github-bot-app
Copy link
Contributor

Merging stable into develop after merging pull request #634.

…pplying (#634)

* Initial plan

* Fix optional attributes not being set when using object templates

- Modified _generate_input_data() to skip adding None for optional relationships on new nodes
- For existing nodes, still include None to allow clearing relationships (preserves PR #515 behavior)
- Updated tests to reflect new behavior
- Added test to verify existing nodes still work correctly

Co-authored-by: minitriga <26367336+minitriga@users.noreply.github.com>

* Add type annotations to test parameters and use BothClients fixture

- Added BothClients import to TYPE_CHECKING block
- Updated test_update_input_data_existing_node_with_optional_relationship to use clients fixture with proper type annotations
- Changed from client fixture to clients fixture (clients.standard and clients.sync)
- Added type annotation for client_type parameter

Co-authored-by: minitriga <26367336+minitriga@users.noreply.github.com>

* Use __future__ annotations and add changelog for issue 630

- Added `from __future__ import annotations` to enable postponed evaluation
- Changed `clients: "BothClients"` to `clients: BothClients` without string quotes
- Moved GenericSchema, NodeSchemaAPI, and HTTPXMock imports to TYPE_CHECKING block
- Added changelog/630.fixed.md documenting the fix

Co-authored-by: minitriga <26367336+minitriga@users.noreply.github.com>

* Fix linting: correct import path in TYPE_CHECKING block

Changed `from tests.unit.sdk.conftest import BothClients` to `from .conftest import BothClients` to fix ruff import sorting error after merge from stable branch.

Co-authored-by: minitriga <26367336+minitriga@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: minitriga <26367336+minitriga@users.noreply.github.com>
Co-authored-by: Alex Gittings <agitting96@gmail.com>
@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1f1cb0c
Status: ✅  Deploy successful!
Preview URL: https://1563145d.infrahub-sdk-python.pages.dev

View logs

@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@           Coverage Diff            @@
##           develop     #709   +/-   ##
========================================
  Coverage    76.03%   76.03%           
========================================
  Files          113      113           
  Lines         9743     9744    +1     
  Branches      1490     1491    +1     
========================================
+ Hits          7408     7409    +1     
  Misses        1840     1840           
  Partials       495      495           
Flag Coverage Δ
integration-tests 34.64% <66.66%> (+<0.01%) ⬆️
python-3.10 49.95% <66.66%> (+<0.01%) ⬆️
python-3.11 49.95% <66.66%> (-0.02%) ⬇️
python-3.12 49.91% <66.66%> (-0.04%) ⬇️
python-3.13 49.93% <66.66%> (-0.02%) ⬇️
python-3.14 51.59% <66.66%> (+<0.01%) ⬆️
python-filler-3.12 23.94% <33.33%> (-0.01%) ⬇️

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

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

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