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

Publish Package with Host Multi-Selection #9850

Merged
merged 9 commits into from
Jul 30, 2019
Merged

Conversation

QilongTang
Copy link
Contributor

@QilongTang QilongTang commented Jul 23, 2019

Please Note:

  1. Before submitting the PR, please review How to Contribute to Dynamo
  2. Dynamo Team will meet 1x a month to review PRs found on Github (Issues will be handled separately)
  3. PRs will be reviewed from oldest to newest
  4. If a reviewed PR requires changes by the owner, the owner of the PR has 30 days to respond. If the PR has seen no activity by the next session, it will be either closed by the team or depending on its utility will be taken over by someone on the team
  5. PRs should use either Dynamo's default PR template or one of these other template options in order to be considered for review.
  6. PRs that do not have one of the Dynamo PR templates completely filled out with all declarations satisfied will not be reviewed by the Dynamo team.
  7. PRs made to the DynamoRevit repo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after a LGTM label is added to the PR.

Purpose

This PR is about adding the host multi-selection and part of the regular package publishing workflow.

What I have tested:

  • Host dependency will be optional filed for now, so dialog canSubmit check will not mandate it
  • Publishing to local works fine with the right info serialized
  • Publishing from existing package works fine with the right info pre filled in the combox
    PackageManagerPublishVersion

TODO:

  • Refine the UI to see if we should simply add it below versions otherwise need to rewrite the combobox here since it does not fit..
    - [ ] Add publish check for host dependencies
  • Add multi selection part

What it looks now
image

The pkg.json generated when publishing the package locally

{
   "license": "",
   "file_hash": null,
   "name": "Test",
   "version": "1.0.2",
   "description": "TestTestTestTest",
   "group": "",
   "keywords": null,
   "dependencies": [],
   "host_dependencies": [
       "Revit",
       "Civil 3D"
   ],
   "contents": "",
   "engine_version": "2.4.0.5716",
   "engine": "dynamo",
   "engine_metadata": "",
   "site_url": "",
   "repository_url": "",
   "contains_binaries": true,
   "node_libraries": [
       "Analysis, Version=2.3.0.4293, Culture=neutral, PublicKeyToken=null",
       "Analysis, Version=2.3.0.4293, Culture=neutral, PublicKeyToken=null"
   ]
}

Declarations

Check these if you believe they are true

  • The code base 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.

Reviewers

@DynamoDS/dynamo

FYIs

@Amoursol

@QilongTang QilongTang added the WIP label Jul 23, 2019
@QilongTang QilongTang changed the title [WIP] Publish Package with Host Multi-Selection Publish Package with Host Multi-Selection Jul 28, 2019
@mjkkirschner
Copy link
Member

mjkkirschner commented Jul 28, 2019

@QilongTang the JSON here looks odd, why is the same dll added twice as a nodeLibrary?

@QilongTang
Copy link
Contributor Author

@mjkkirschner I have no idea, was just using a random dll to test serialization

@QilongTang QilongTang added PTAL Please Take A Look 👀 and removed WIP labels Jul 28, 2019
@mjkkirschner
Copy link
Member

@QilongTang can you confirm that before your change the same node libraries json would have been generated...

 "node_libraries": [
       "Analysis, Version=2.3.0.4293, Culture=neutral, PublicKeyToken=null",
       "Analysis, Version=2.3.0.4293, Culture=neutral, PublicKeyToken=null"
   ]

and this is not a regression caused by this PR?

@QilongTang
Copy link
Contributor Author

@mjkkirschner I can't reproduce it before or after my changes again.

@QilongTang
Copy link
Contributor Author

Running self CI now

@QilongTang
Copy link
Contributor Author

The only regression on self CI passed locally
image

@mjkkirschner
Copy link
Member

mjkkirschner commented Jul 29, 2019

@QilongTang whats the failure stack on ci?

@QilongTang
Copy link
Contributor Author

QilongTang commented Jul 29, 2019

@mjkkirschner I am running the self CI again now

Errors and Failures:
1) Test Failure : DynamoCoreWpfTests.PublishPackageViewModelTests.NewPackageVersionUpload_DoesNotThrowExceptionWhenDLLIsLoadedSeveralTimes
     Expected: No Exception to be thrown
  But was:   (Object reference not set to an instance of an object.)
   at Dynamo.PackageManager.PublishPackageViewModel.set_SelectedHosts(List`1 value) in E:\Builds\SSCI_Dynamo\DynamoDS_Dynamo\PublishPackageWithHost\src\DynamoCoreWpf\ViewModels\PackageManager\PublishPackageViewModel.cs:line 458
   at Dynamo.PackageManager.PublishPackageViewModel.FromLocalPackage(DynamoViewModel dynamoViewModel, Package l) in E:\Builds\SSCI_Dynamo\DynamoDS_Dynamo\PublishPackageWithHost\src\DynamoCoreWpf\ViewModels\PackageManager\PublishPackageViewModel.cs:line 728

Figured this out, this does not fail in VS 2019 but a null check for setter is apparently needed for lower version of C#

@reddyashish
Copy link
Contributor

Looks good to me.

@QilongTang
Copy link
Contributor Author

Addressed all comments, and all self CI passed now. Merging once all checks passed

@QilongTang QilongTang merged commit 073d2c5 into master Jul 30, 2019
@QilongTang QilongTang deleted the PublishPackageWithHost branch July 30, 2019 00:33
QilongTang added a commit that referenced this pull request Jul 30, 2019
* Initial Commit

* Add hosts selections

* Add the multi selection

* Multiple Host Selection Display

* Correct Host Dependencies in Json for publishing and download

* Code Clean up

* More Cleanup and Comments

* Bug fixing - publish version

* More comments and regression
QilongTang added a commit that referenced this pull request Jul 30, 2019
* Initial Commit

* Add hosts selections

* Add the multi selection

* Multiple Host Selection Display

* Correct Host Dependencies in Json for publishing and download

* Code Clean up

* More Cleanup and Comments

* Bug fixing - publish version

* More comments and regression
mjkkirschner pushed a commit that referenced this pull request Aug 3, 2019
* Initial Commit

* Add hosts selections

* Add the multi selection

* Multiple Host Selection Display

* Correct Host Dependencies in Json for publishing and download

* Code Clean up

* More Cleanup and Comments

* Bug fixing - publish version

* More comments and regression
@QilongTang QilongTang removed the PTAL Please Take A Look 👀 label Aug 5, 2019
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