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

DYN-6901 Pm - publish process improvements #15314

Merged
merged 11 commits into from
Jul 3, 2024

Conversation

dnenov
Copy link
Collaborator

@dnenov dnenov commented Jun 14, 2024

Purpose

This is the first PR of a series of changes to the publish a package using retain folder structure which aims to fix and updates a lot of the issues the process has had since its launch. I tried to keep the separate PRs relevant to a single change and as small as possible.

Changes in this PR

  • the main change is to the BindParentToChild and GetCommonPaths methods. Historically, after loading files during the publish package process, Dynamo did not capture the relationships between files and folders, as the only option was to cluster everything into the 4 main folders - bin, doc, dyf, extra.
    After introducing the concept of retaining the existing folder structure, this information became important. The 2 methods above do the job by post-processing all the 'raw' file paths each time after a new file or folder has been added to the collection via the UI.
  • added test coverage for the above methods
  • support for capitalized file extensions - '.DYF', etc, (x.EndsWith(".dyf") -> x.ToLower().EndsWith(".dyf"))
  • highlights existing limitation for further discussion

Limitations to the current process

  • Dynamo does not allow loading of multiple .dll versions - created a test to highlight this limitation: EnsureMultipleVersionsOfAssembly_CannotBeLoaded()

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
  • This PR contains no files larger than 50 MB

Release Notes

  • rework on the logic around building file and folder relationships that supports the 'retain folder structure' workflow
  • support for capitalized file extensions (dyf, dll, etc)
  • test coverage

Reviewers

@QilongTang
@zeusongit
@reddyashish

FYIs

@Amoursol

- plotting out the publishing process with series of tests
- previously dynamo would add dyf and dll files regardless of the capitalization of the extesion. However
- however, when copying the files this was not respected
- now also copies the files awith upper capitalization
- fixed caps extension issue in preview and remove
- confirm that the original custom definition files will be deleted during the build process
- fixed a few more extension capitalizations
Copy link

github-actions bot commented Jun 14, 2024

UI Smoke Tests

Test: success. 3 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests - net8.0

@reddyashish
Copy link
Contributor

@dnenov Do we have a task for this?

- rework on the way the content structure is recreated (files and folders relationships)
- additional test coverage to assert edge case scenarios
@dnenov
Copy link
Collaborator Author

dnenov commented Jun 26, 2024

@dnenov Do we have a task for this?

Hi @reddyashish - it is part of the PackageManager update, no jira task yet, and it's still WIP

@QilongTang
Copy link
Contributor

@dnenov Do we have a task for this?

Hi @reddyashish - it is part of the PackageManager update, no jira task yet, and it's still WIP

Hi @dnenov is it not logged as part of release epic https://jira.autodesk.com/browse/DYN-5270?

@dnenov dnenov marked this pull request as ready for review June 28, 2024 13:44
@dnenov dnenov removed the WIP label Jun 28, 2024
@dnenov dnenov changed the title WIP - pm publish process improvements PM - publish process improvements Jun 28, 2024
@dnenov dnenov changed the title PM - publish process improvements Pm - publish process improvements Jun 28, 2024
@QilongTang QilongTang modified the milestone: 3.3 Jul 2, 2024
@QilongTang QilongTang changed the title Pm - publish process improvements DYN-6901 Pm - publish process improvements Jul 2, 2024
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-6901

@QilongTang QilongTang self-requested a review July 2, 2024 17:11
//now add the second assembly version file
vm.AddFile(secondAssembly);

//TODO: assert - do we expect to see 1 or 2 here?
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, this is a good one to revisit later.

{
var vm = new PublishPackageViewModel(ViewModel);
var items = new Dictionary<string, PackageItemRootViewModel>();
var files = new[] { new FileInfo(@"C:\pkg\file1.dyn"), new FileInfo(@"C:\pkg\file2.DYN") };
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice case with capitalized file format

@QilongTang
Copy link
Contributor

@dnenov Can you take a look at the reported regression DynamoCoreWpfTests.PublishPackageViewModelTests.EnsureMultipleVersionsOfAssembly_CannotBeLoaded to see if it needs to be updated?

@dnenov
Copy link
Collaborator Author

dnenov commented Jul 3, 2024

@dnenov Can you take a look at the reported regression DynamoCoreWpfTests.PublishPackageViewModelTests.EnsureMultipleVersionsOfAssembly_CannotBeLoaded to see if it needs to be updated?

Yes, I think it was the test files being ignored. I added them back in, it should pass now I hope.

@QilongTang
Copy link
Contributor

@QilongTang QilongTang merged commit 851839e into DynamoDS:master Jul 3, 2024
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants