Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package publish crash fix and package files pre-populate bug fix #12859

Merged
merged 2 commits into from
May 6, 2022

Conversation

zeusongit
Copy link
Contributor

Purpose

JIRA:
https://jira.autodesk.com/browse/DYN-4918
https://jira.autodesk.com/browse/DYN-4919

This PR fixes 2 problems:

  • When user deletes package files from publish dialog box Dynamo used to crash, the bug was a null FileInfo object.
  • When user wants to publish a new version the dialog box won't pre-populate all its files, the bug was un-refreshed package contents.

GIF:
Revit_37Ye284j4y

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

  • Crash fix on deleting package files from publish window.
  • Bug fix to pre-populate package contents on publish window.

Reviewers

@DynamoDS/dynamo
@Amoursol

@zeusongit zeusongit requested review from QilongTang and Amoursol May 5, 2022 22:17
@@ -1339,7 +1343,7 @@ private void RemoveItem(object parameter)
}

PackageContents.Remove(PackageContents
.First(x => x.FileInfo.FullName == packageItemRootViewModel.FileInfo.FullName));
.First(x => x.FileInfo?.FullName == packageItemRootViewModel.FileInfo.FullName));
Copy link
Contributor

Choose a reason for hiding this comment

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

Just want to confirm, if the info is null, the remove will do nothing right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it will basically move over and ignore the null, earlier it was throwing object null error, because FileInfo was null for additional files

@QilongTang
Copy link
Contributor

Although the changes looks good, looks like our SelfServe job machine has some failure. So merging is blocked

@zeusongit
Copy link
Contributor Author

Restarted a build on selfserve now that they are passing (almost)

@QilongTang QilongTang merged commit 74709f7 into DynamoDS:master May 6, 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