Skip to content

bug: Node update ignores computed_attributes #847

@jjeff07

Description

@jjeff07

Component

No response

Infrahub SDK version

1.18.1

Current Behavior

I updated a Node attribute using the SDK and saved the object. After running the InfrahubNodeSync().update() and InfrahubNodeSync().update(do_full_update=True) multiple times my computed_attributes were not updated. I see the updated value in the GUI but the SDK does not update no matter what.

Basically I have to trash every node after I modify them and query the API again.

Expected Behavior

InfrahubNodeSync().update() should pull updates for computed attributes and update the model with any new data.

Steps to Reproduce

  1. Configure a Node with 2 attributes (1 attribute such as Text and a computed_attribute that uses the other attribute)
  2. Query the node in the SDK.
  3. Update the Text attribute
  4. Save the Node
  5. Run InfrahubNodeSync().update() or InfrahubNodeSync().update(do_full_update=True)
  6. The computed_attributed is never updated to the new value

Additional Information

No response

Metadata

Metadata

Assignees

Labels

state/need-more-infoThis issue needs more informationtype/bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions