-
Notifications
You must be signed in to change notification settings - Fork 638
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
Re-enable the retain folder structure toggle in package manager publish workflow and bug fixes #14880
Conversation
- now retains the exact number of files when retaining folder structure
- publish and publish version using retained folders now working better than before
- added two new options to publish package allowing the retain folder structure from the get-go
…nov/Dynamo into deyan-fix-pub
UI Smoke TestsTest: success. 2 passed, 0 failed. |
- added MaxHeight to trigger the scrollbar - enabled the custombrowsercontrol - the Tag property of the custombrowsercontrol now controls the visibility of the remove icons as well, allowing to hide them in this page
@zeusongit Please also check if the PR validation contains real failure and address the merge conflicts. Once you address all the comments, we can merge and cherry-pick to RC3.0.3 branch |
src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs
Outdated
Show resolved
Hide resolved
Yes, I'm aware that the issue of not being able to publish a new version involving removing assemblies from the current version is not fixed yet. I was referring to publishing the new version with the same version installed. |
@@ -269,7 +268,6 @@ <h4>Adding package files</h4> | |||
When in doubt, toggle the setting off to allow Dynamo to set up the folder structure. | |||
</p> | |||
</p> | |||
--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description says it's an advanced setting. Is it still an advanced setting now that it's the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hwahlstrom @QilongTang should we remove the advanced tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zeusongit make sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs
Outdated
Show resolved
Hide resolved
@@ -222,7 +220,7 @@ internal void CopyFilesIntoRetainedPackageDirectory(IEnumerable<IEnumerable<stri | |||
{ | |||
// We expect that files are bundled in root folders | |||
// For single files, just get its folder | |||
var commonPath = files.Count() > 1 ? GetLongestCommonPrefix(files.ToArray()) : Path.GetDirectoryName(files.First()); | |||
var commonPath = files.Count() > 1 ? GetLongestCommonPrefix(files.ToArray()) : Path.GetDirectoryName(files.FirstOrDefault()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
files.Any()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
files.Any() won't work here since we need to know if there is only 1 item vs more than 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with comments addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once comments are addressed.
One thing about testing - as we don't have unit tests for all package publishing scenarios, I wonder if we can or have already tested them manually.
Added a test |
@@ -192,6 +192,7 @@ | |||
<Name>DynamoUtilities</Name> | |||
<Private>False</Private> | |||
</ProjectReference> | |||
<ProjectReference Include="..\Libraries\PackageManagerTests\PackageManagerTests.csproj" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a test for loading a package and then publishing the same package with a new version.
…sh workflow and bug fixes (DynamoDS#14880) * retain exact number of files - now retains the exact number of files when retaining folder structure - publish and publish version using retained folders now working better than before * publish retain added - added two new options to publish package allowing the retain folder structure from the get-go * fix issue with files with same substring in name in same subfolder * make treeview scrollable * retain nodelibraries values * refactor publish version code * scrollable custombrowsercontrol in preview page - added MaxHeight to trigger the scrollbar - enabled the custombrowsercontrol - the Tag property of the custombrowsercontrol now controls the visibility of the remove icons as well, allowing to hide them in this page * dispose mlc at publish * comments * revert docs change to add retain feature * test fix * add test --------- Co-authored-by: Deyan Nenov <dnenov@archilizer.com> Co-authored-by: mjk.kirschner <mjk.kirschner@gmail.com>
…sh workflow and bug fixes (#14880) (#14910) * retain exact number of files - now retains the exact number of files when retaining folder structure - publish and publish version using retained folders now working better than before * publish retain added - added two new options to publish package allowing the retain folder structure from the get-go * fix issue with files with same substring in name in same subfolder * make treeview scrollable * retain nodelibraries values * refactor publish version code * scrollable custombrowsercontrol in preview page - added MaxHeight to trigger the scrollbar - enabled the custombrowsercontrol - the Tag property of the custombrowsercontrol now controls the visibility of the remove icons as well, allowing to hide them in this page * dispose mlc at publish * comments * revert docs change to add retain feature * test fix * add test --------- Co-authored-by: Deyan Nenov <dnenov@archilizer.com> Co-authored-by: mjk.kirschner <mjk.kirschner@gmail.com>
Purpose
https://jira.autodesk.com/browse/DYN-6589
The PR addresses multiple issues in the package publishing workflow and re-enables the retain folder structure option when publishing a package using package manager.
The work done in an extension of @dnenov and @mjkkirschner's branches, and includes their contribution as well.
The following use cases were updated:
The retain folder structure option is now enabled by default when a user is publishing a new version.
The user can view Node Library checkbox when navigating away from the publishing workflow and then returning to it later in the same session. (the assemblies were not loaded correctly)
The user can assign newly added files to be node libraries. (the checkbox was missing before)
The package version is not updated if publish fails due to any reason.
Handled access exception thrown when publishing a new version of a package by disposing temporary load context.
Make directory tree view scrollable when previewing package contents
Code refactor
Handle use case when a user removes some assemblies when publishing a new version and the workflow fails, since it tries to delete the files already loaded.(will track in a separate issue to limit this PRs scope)Show a meaningful exception message when trying to update a loaded package (same message is used when adding assemblies):
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
Reviewers
@DynamoDS/dynamo