Skip to content

Conversation

@BeArchiTek
Copy link
Contributor

Fixes #331

@BeArchiTek BeArchiTek added the type/housekeeping Maintenance task label Mar 31, 2025
@BeArchiTek BeArchiTek self-assigned this Mar 31, 2025
@codecov
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
infrahub_sdk/node.py 50.00% 0 Missing and 2 partials ⚠️
@@           Coverage Diff           @@
##           stable     #332   +/-   ##
=======================================
  Coverage   71.32%   71.32%           
=======================================
  Files          87       87           
  Lines        7871     7871           
  Branches     1517     1517           
=======================================
  Hits         5614     5614           
  Misses       1865     1865           
  Partials      392      392           
Flag Coverage Δ
integration-tests 22.80% <50.00%> (ø)
python-3.10 45.45% <0.00%> (ø)
python-3.11 45.48% <0.00%> (ø)
python-3.12 45.45% <0.00%> (-0.03%) ⬇️
python-3.13 45.45% <0.00%> (-0.03%) ⬇️
python-3.9 44.35% <0.00%> (-0.03%) ⬇️
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/node.py 77.47% <50.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BeArchiTek BeArchiTek requested review from a team March 31, 2025 13:43
Copy link
Contributor

@ogenstad ogenstad left a comment

Choose a reason for hiding this comment

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

Would be nice with a test if possible :)

relation = node_data["node"].get(rel_name)
if relation.get("node", None):
relation = node_data["node"].get(rel_name, None)
if relation and relation.get("node", None):
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the only change that's required for the other ones relation = node_data["node"].get(rel_name) would already return None so we don't need a default value there.

@dgarros dgarros merged commit 0351c74 into stable Apr 1, 2025
18 checks passed
@dgarros dgarros deleted the bkr-fix-process-nodes branch April 1, 2025 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/housekeeping Maintenance task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Fix AttributeError in Node relationship processing

4 participants