Skip to content

Conversation

@reddyashish
Copy link
Contributor

@reddyashish reddyashish commented Mar 11, 2022

Purpose

This PR is to fix the: https://jira.autodesk.com/browse/DYN-4460.

When a new custom node is created and saved to a local path in a dynamo session, the custom node manager doesn't have the path information for that particular custom node. It will only have the path information after dynamo is restarted because Dynamo tries to load all the definitions from the node package paths. This was happening because when the CN is saved, during the InternalSaveAs method in dynamo view model, the workspace model's save function is always called.

This save method on the CustomNodeWorkspaceModel model is never called: https://github.com/DynamoDS/Dynamo/blob/master/src/DynamoCore/Graph/Workspaces/CustomNodeWorkspaceModel.cs#L298. When the custom node workspace is being saved, this method has to be called and that will make sure that the path information is updated in the custom node manager.

Fix custom node saving issue

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Release Notes

Call the save method on the CustomNodeWorkspaceModel, when the custom node is being saved.

Reviewers

@QilongTang @mjkkirschner @zeusongit

Copy link
Contributor

@zeusongit zeusongit left a comment

Choose a reason for hiding this comment

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

LGTM

@QilongTang
Copy link
Contributor

Would you fillin the release notes?

@reddyashish reddyashish changed the title Fix the customnode save issue when a customnode is created. Call the save method on the CustomNodeWorkspaceModel, when the custom node is being saved. Mar 11, 2022
@QilongTang
Copy link
Contributor

I think there are a couple regressions to look at

@reddyashish
Copy link
Contributor Author

Looking into it.

@reddyashish
Copy link
Contributor Author

The build has been unstable, couldn't find any failures.
Running the self-serve https://master-15.jenkins.autodesk.com/view/DYN/job/DYN-DevCI_Self_Service/936/

@reddyashish
Copy link
Contributor Author

reddyashish commented Mar 11, 2022

@QilongTang Fixed the tests. I was using the local variable "currentWorkspaceViewModel" by mistake, which was null in some cases

@reddyashish
Copy link
Contributor Author

@QilongTang QilongTang merged commit 78f18ff into DynamoDS:master Mar 11, 2022
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.

3 participants