Skip to content

Conversation

@dnenov
Copy link
Collaborator

@dnenov dnenov commented Jul 14, 2025

Purpose

Addresses https://jira.autodesk.com/browse/DYN-7145(https://jira.autodesk.com/browse/DYN-7145): As a Dynamo Dev, Dynamo should not hang and crash when the package upload is more than 1 GB.

Frontend PR - https://git.autodesk.com/Dynamo/PackagePublishWizard/pull/52

Analysis

The issue postulates that the PM cannot handle large packages - packages above 1Gb of data, and causes Dynamo to crash. Running a small amount of large files disproves this statement, as shown below. However, processing a large number of files is handled poorly at the moment, and without a UI update, causes the user to think Dynamo has crashed, although eventually the files will be processed.

> 1 Gb not a problem in itself

vatJ9lNfFT

Introducing UI visual cue to show the progress of processing files as well as offloading this process from the main thread dramatically enhances the user experience.

Async process of file loading with progress update - processing Dynamo build with over 18k files

gbcDKy94bb

Declarations

Check these if you believe they are true

  • 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
  • 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
  • This PR contains no files larger than 50 MB
  • This PR introduces new feature code involve network connecting and is tested with no-network mode.

Release Notes

(FILL ME IN) Brief description of the fix / enhancement. Use N/A to indicate that the changes in this pull request do not apply to Release Notes. Mandatory section

Reviewers

@jasonstratton
@zeusongit

FYIs

@QilongTang

dnenov added 4 commits July 11, 2025 15:28
- refactored code to support async files and folders loading, moving the heavy UI-blocking operations to a sub thread
- changes to allow responsive frontend for cancellation and progress indication
- small null check for compatibilityMapList  when loading Dynamo
Copy link

@github-actions github-actions bot left a comment

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-7145

dnenov added 4 commits July 15, 2025 17:38
- revert accidental change to the reset function
- created tests for the new functionalities
- aggregate warnings to prevent multiple prompts popping up during the async process
- surface warnings/errors to the user once the loading is completed
- added remaining hard-coded resources
@dnenov dnenov requested a review from jasonstratton July 17, 2025 12:52
@dnenov dnenov marked this pull request as ready for review July 17, 2025 12:52
@QilongTang QilongTang requested a review from Copilot October 10, 2025 14:12
Copy link
Contributor

Copilot AI left a comment

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 addresses DYN-7145 to improve Dynamo's handling of large package uploads by implementing asynchronous file processing and progress reporting. The change prevents Dynamo from hanging when processing packages with large numbers of files (>1GB was not actually the issue, but rather large file counts).

Key changes:

  • Implemented asynchronous file processing with progress updates and cancellation support
  • Added UI progress indicators and cancellation capabilities for large file operations
  • Enhanced error handling and batch processing for better responsiveness

Reviewed Changes

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

Show a summary per file
File Description
test/DynamoCoreWpf2Tests/PackageManager/PackageManagerUITests.cs Added comprehensive async tests and updated existing tests to use async methods
src/DynamoPackages/PackageManagerClient.cs Added duplicate null check for compatibility map
src/DynamoCoreWpf/Views/PackageManager/Components/PackageManagerWizard/PackageManagerWizard.xaml.cs Added upload progress and cancellation support to the wizard UI
src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs Implemented async file processing with progress reporting and cancellation
src/DynamoCoreWpf/PublicAPI.Unshipped.txt Updated API surface for new async functionality
src/DynamoCoreWpf/Properties/Resources.resx Added new localized error messages for multiple file failures
src/DynamoCoreWpf/Properties/Resources.en-US.resx Added English translations for new error messages
Files not reviewed (1)
  • src/DynamoCoreWpf/Properties/Resources.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)

test/DynamoCoreWpf2Tests/PackageManager/PackageManagerUITests.cs:1

  • The removal of Thread.Sleep(500) may cause timing issues in UI tests. Consider adding a small wait or assertion that ensures the window is fully initialized before the assertion.
using System;

Comment on lines +2062 to +2063
UploadState = PackageUploadHandle.State.Uploading;
Uploading = true;
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider consolidating these state changes into a single method to avoid potential inconsistencies. The same pattern appears multiple times throughout the file.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am bit hesitant to touch that logic - we use Uploading 19 times (references), and 33 for UploadState. This is legacy code and touches quite a few parts of our logic. If you think this needs rework, I would dedicate a separate PR for that @zeusongit

@zeusongit zeusongit requested a review from a team October 10, 2025 14:51
@zeusongit
Copy link
Contributor

1 test fails, but unrelated, merging: https://master-5.jenkins.autodesk.com/job/Dynamo/job/DynamoSelfServe/job/pullRequestValidation/18579/

@zeusongit zeusongit merged commit ecbce3b into DynamoDS:master Oct 14, 2025
26 of 27 checks passed
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