Skip to content

Conversation

@wvandeun
Copy link
Contributor

fixes #15

client will now by default store all the objects it retrieved using the query methods in the internal store. This can be disabled by setting populate_store argument to False. This rermoves the need to set populate_store to True when you want to use prefetch_relationships to retrieve related nodes for included relationships.

@github-actions github-actions bot added the group/ci Issue related to the CI pipeline label Mar 13, 2025
@wvandeun wvandeun changed the base branch from stable to develop March 13, 2025 06:09
@codecov
Copy link

codecov bot commented Mar 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

@@             Coverage Diff             @@
##           develop     #302      +/-   ##
===========================================
+ Coverage    70.38%   70.44%   +0.06%     
===========================================
  Files           81       81              
  Lines         7522     7522              
  Branches      1467     1467              
===========================================
+ Hits          5294     5299       +5     
+ Misses        1844     1840       -4     
+ Partials       384      383       -1     
Flag Coverage Δ
integration-tests 22.60% <ø> (+0.05%) ⬆️
python-3.10 45.44% <ø> (ø)
python-3.11 45.44% <ø> (ø)
python-3.12 45.44% <ø> (?)
python-3.9 44.28% <ø> (ø)
python-filler-3.12 23.99% <ø> (ø)

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

Files with missing lines Coverage Δ
infrahub_sdk/client.py 67.34% <ø> (+0.22%) ⬆️

... and 1 file with indirect coverage changes

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

@github-actions github-actions bot added type/documentation Improvements or additions to documentation and removed group/ci Issue related to the CI pipeline labels Mar 13, 2025
Objects retrieved by the SDK will be stored by the internal client
store by default. The behavior can be changed by setting it explicitly
to False. This removes the need to set populate_store to True when you
want to prefetch relationships.
@wvandeun wvandeun force-pushed the wvd-fix-prefetch-relationships branch from 239cdef to 90d211a Compare March 13, 2025 09:24
@wvandeun wvandeun self-assigned this Mar 13, 2025
@wvandeun wvandeun removed the type/documentation Improvements or additions to documentation label Mar 13, 2025
@wvandeun wvandeun marked this pull request as ready for review March 13, 2025 09:36
@wvandeun wvandeun changed the title Set default value of populate_store argument on different client query methods to True Set default value of populate_store argument on client query methods to True Mar 13, 2025
@dgarros dgarros merged commit edb911e into develop Mar 16, 2025
16 checks passed
@dgarros dgarros deleted the wvd-fix-prefetch-relationships branch March 16, 2025 17:32
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.

bug: related object is not fetched when using prefetch_relationships

2 participants