Skip to content

Conversation

@dgarros
Copy link
Contributor

@dgarros dgarros commented Dec 19, 2024

This PR fixes an issue with infrahubctl menu load that would fail with the following error

25h[11:27:12] INFO     Node: Organization__MainMenu                    object.py:67
Error: Unexpected format for children found a <class 'str'>, 
18129073-738c-dc82-3348-c5193c8b5d82
Traceback (most recent call last):

The issue was related to the relationships parent & children on CoreMenu having the same identifier, when we are trying to create nested objects we are searching for the matching relationship on the other node and in some cases the search would return the wrong relationship.

@dgarros dgarros added the type/bug Something isn't working as expected label Dec 19, 2024
@codecov
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 37.50000% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
infrahub_sdk/schema.py 40.00% 9 Missing ⚠️
infrahub_sdk/spec/object.py 0.00% 1 Missing ⚠️
@@             Coverage Diff             @@
##           develop     #177      +/-   ##
===========================================
- Coverage    66.22%   66.16%   -0.06%     
===========================================
  Files           76       76              
  Lines         7031     7046      +15     
  Branches      1388     1392       +4     
===========================================
+ Hits          4656     4662       +6     
- Misses        1989     1998       +9     
  Partials       386      386              
Flag Coverage Δ
python-3.10 44.97% <0.00%> (-0.10%) ⬇️
python-3.11 44.97% <0.00%> (-0.10%) ⬇️
python-3.12 44.97% <0.00%> (-0.10%) ⬇️
python-3.13 44.97% <0.00%> (-0.10%) ⬇️
python-3.9 44.06% <0.00%> (-0.10%) ⬇️
python-filler-3.12 23.98% <37.50%> (+0.03%) ⬆️

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

Files with missing lines Coverage Δ
infrahub_sdk/spec/object.py 24.28% <0.00%> (ø)
infrahub_sdk/schema.py 72.94% <40.00%> (-0.86%) ⬇️

@dgarros dgarros requested a review from a team December 19, 2024 13:37
@dgarros dgarros marked this pull request as ready for review December 19, 2024 13:37
@dgarros dgarros merged commit 6cc1c24 into develop Dec 19, 2024
13 checks passed
@dgarros dgarros deleted the dga-20241201-fix-menu-load branch December 19, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants