Skip to content

Conversation

@BeArchiTek
Copy link
Contributor

When we provided a Kind to the store.get() with raise_when_missing=False but there isn't any matching node, instead of returning None it will check all the nodes in the Store. So if there is another Node with the same key, it will return it.

This is causing an issue on infrahub-sync

@BeArchiTek BeArchiTek self-assigned this Mar 25, 2025
@BeArchiTek BeArchiTek requested a review from a team March 25, 2025 10:32
@codecov
Copy link

codecov bot commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

@@            Coverage Diff             @@
##           stable     #321      +/-   ##
==========================================
+ Coverage   71.32%   71.35%   +0.02%     
==========================================
  Files          87       87              
  Lines        7871     7871              
  Branches     1517     1517              
==========================================
+ Hits         5614     5616       +2     
+ Misses       1865     1864       -1     
+ Partials      392      391       -1     
Flag Coverage Δ
integration-tests 22.80% <33.33%> (ø)
python-3.10 45.50% <100.00%> (+0.02%) ⬆️
python-3.11 45.50% <100.00%> (+0.02%) ⬆️
python-3.12 45.48% <100.00%> (ø)
python-3.13 45.50% <100.00%> (+0.02%) ⬆️
python-3.9 44.37% <100.00%> (+0.02%) ⬆️
python-filler-3.12 24.66% <0.00%> (ø)

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

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

@BeArchiTek BeArchiTek changed the title Restraint sotre.get() when a Kind is provided Restraint store.get() when a Kind is provided Mar 25, 2025
@dgarros
Copy link
Contributor

dgarros commented Mar 26, 2025

@BeArchiTek I addressed this issue in #323, please can you review it and let me know if that works for you

@BeArchiTek
Copy link
Contributor Author

#323 solved the issue as well, closing this PR

@BeArchiTek BeArchiTek closed this Mar 28, 2025
@BeArchiTek BeArchiTek deleted the bkr-fix-store-get branch March 28, 2025 08:29
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