-
Notifications
You must be signed in to change notification settings - Fork 668
[DYN-2609] Fix crash when installing empty package #10561
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
Conversation
| !are_contents_empty && x.contents.Contains(PackageManagerClient.PackageContainsBinariesConstant); | ||
| var contains_python = | ||
| !are_contents_empty && x.contents.Contains(PackageManagerClient.PackageContainsPythonScriptsConstant); | ||
| return contains_binaries || contains_python; |
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.
PackageManagerClient.PackageContainsPythonScriptsConstant and PackageManagerClient.PackageContainsBinariesConstant are deprecated so I'm not sure if we should use these or something else.
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.
I'm not sure either, but the package header only contains one boolean field -contains binaries which is true if the package contains binaries or python...
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.
There are 41 versions across 22 packages that are still using this "obsolete" method of marking packages. We could theoretically update those version records in the database to have the contains_binaries field set to true and then we could remove these constants.
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.
Is there a contains_python field as well? If so, then we need to add it to the check here.
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.
No, there is only a single field for both.
|
@alfredo-pozo the Any clue? |
|
The last execution is completed, the failures were because of Docker issues @aparajit-pratap |
|
LGTM |
Purpose
Fix for regression caused by #10544 - crash when installing an empty package like LunchBox. Changes to new package version API's on the PM (I think) return the
PackageVersionwhose contents can benullfor an empty package. Prior to the API change, the contents would be an empty string for an empty package. Thus it was necessary to add a null check.The UI automation test DynamoTests.dll.DynamoTests.Tests.SmokeTestPackage was failing, which signaled this regression.
Declarations
Check these if you believe they are true
*.resxfilesReviewers
@mmisol
@mjkkirschner
FYIs
@alfredo-pozo