Skip to content

DYN-7587 : Clicking No still installs a conflicting package#17099

Merged
jasonstratton merged 8 commits into
DynamoDS:masterfrom
ivaylo-matov:DYN-7587-Clicking-“No”-still-installs-the-package_
May 15, 2026

Hidden character warning

The head ref may contain hidden characters: "DYN-7587-Clicking-\u201cNo\u201d-still-installs-the-package_"
Merged

DYN-7587 : Clicking No still installs a conflicting package#17099
jasonstratton merged 8 commits into
DynamoDS:masterfrom
ivaylo-matov:DYN-7587-Clicking-“No”-still-installs-the-package_

Conversation

@ivaylo-matov

@ivaylo-matov ivaylo-matov commented May 8, 2026

Copy link
Copy Markdown
Contributor

Purpose

This PR addresses DYN-7587.

It fixes the case where installing a package that conflicts on custom node (.dyf) GUIDs with an already installed package showed Cannot Download Package, but if the user chose No, the new package could already be copied into Dynamo’s packages folder.

Changes:

  • Staged install:
    Custom-node conflicts are checked against already loaded package nodes before anything is copied from the temporary zip into the real packages directory.
  • User chooses No:
    Install is cancelled - no copy into the packages folder, staging is removed, and the existing package is not marked for uninstall. Download UI shows a short, specific message (Installation cancelled due to custom node conflict).
  • User chooses Yes:
    The existing package is marked for uninstall on next startup and the new package is committed to disk. The download handle shows text that installed files are present but a restart is required (Restart Dynamo to remove the conflicting package) so the old package can be removed.
  • Tests
    Package manager / loader tests cover decline (no commit, staging removed, uninstall list unchanged) and accept (commit, staging removed, existing package scheduled for uninstall).
Screenshot 2026-05-07 122311
Screenshot 2026-05-08 064757

Declarations

Check these if you believe they are true

Release Notes

Fixes the case where installing a package that conflicts on custom node (.dyf) GUIDs with an already installed package showed Cannot Download Package, but if the user chose No, the new package could already be copied into Dynamo’s packages folder.

Reviewers

@DynamoDS/eidos
@jasonstratton
@zeusongit

FYIs

@dnenov
@johnpierson

Copilot AI review requested due to automatic review settings May 8, 2026 05:53

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-7587

@ivaylo-matov ivaylo-matov changed the title DYN-7587 : Clicking “No” still installs a conflicting package DYN-7587 : Clicking No still installs a conflicting package May 8, 2026
@ivaylo-matov ivaylo-matov changed the title DYN-7587 : Clicking No still installs a conflicting package DYN-7587 : Clicking No still installs a conflicting package May 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a package-install edge case where a custom-node (.dyf) GUID conflict could still result in files being copied into the user’s packages folder even after the user chose No in the conflict dialog. It does so by introducing a staged install flow (unzip/inspect first, copy/commit only after user confirmation) and adds UI messaging and tests around accept/decline behavior.

Changes:

  • Add a staging-based installation workflow in PackageDownloadHandle and update package install flow to pre-check custom node conflicts before committing files.
  • Update conflicting-custom-node handling to return a user decision (Yes/No) and show more specific status messaging.
  • Add tests intended to cover “decline” (no commit) and “accept” (commit + uninstall-on-restart) paths.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/Libraries/PackageManagerTests/PackageLoaderTests.cs Adds tests for staged install conflict accept/decline scenarios.
src/DynamoPackages/PackageLoader.cs Changes conflict event to return a bool decision and adds a public notification method.
src/DynamoPackages/PackageDownloadHandle.cs Introduces staging APIs (TryPrepareInstallation, CompleteInstallation, DiscardStagingDirectory) and refactors Extract to use them.
src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchViewModel.cs Updates conflict handler to return a bool and only mark uninstall when user accepts.
src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs Updates installation flow to pre-check staged custom-node conflicts and commit only on acceptance.
src/DynamoCoreWpf/Properties/Resources.resx Adds new user-facing strings for install-cancel and restart-required messages.
src/DynamoCoreWpf/Properties/Resources.en-US.resx Adds en-US entries for the new user-facing strings.
src/DynamoCoreWpf/Properties/Resources.Designer.cs Regenerates resource designer accessors for the new strings.
src/DynamoCore/Core/CustomNodeManager.cs Adds an internal helper to detect conflicting package custom nodes by GUID before loading/committing.
Files not reviewed (1)
  • src/DynamoCoreWpf/Properties/Resources.Designer.cs: Language not supported

Comment thread src/DynamoPackages/PackageLoader.cs
Comment thread test/Libraries/PackageManagerTests/PackageLoaderTests.cs
Comment thread src/DynamoPackages/PackageDownloadHandle.cs Outdated
@sonarqubecloud

sonarqubecloud Bot commented May 8, 2026

Copy link
Copy Markdown

@jasonstratton jasonstratton left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good to me.

@zeusongit , it could not hurt for you to take a quick sanity check. Thanks.

@jasonstratton jasonstratton merged commit 1da0184 into DynamoDS:master May 15, 2026
31 checks passed
@jasonstratton

Copy link
Copy Markdown
Contributor

@ivaylo-matov , rather than waiting any longer for an additional review, I have merged the code. Please let me know how it goes. We'll speak at the checkin.

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