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

Add DeploymentRepairOptions #3001

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

sachintaMSFT
Copy link
Contributor

@sachintaMSFT sachintaMSFT commented Sep 28, 2022

  1. Add DeploymentRepairOptions to Repair API
  2. Update GetStatus to also verify PackageStatus when the WinAppSDK Main and Singleton packages are installed and return PackageRepairRequired if status is not ok in which case, the developer can call Repair API to repair the packages.

API spec at #2869

@ghost ghost added the needs-triage label Sep 28, 2022
@sachintaMSFT
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sachintaMSFT sachintaMSFT added feature area-Deployment Issues related to packaging, installation, runtime (e.g., SelfContained, Unpackaged) and removed needs-triage labels Sep 28, 2022
@sachintaMSFT
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sachintaMSFT
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sachintaMSFT
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sachintaMSFT
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

DrusTheAxe
DrusTheAxe previously approved these changes Sep 29, 2022
Copy link
Member

@DrusTheAxe DrusTheAxe left a comment

Choose a reason for hiding this comment

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

See comments

dev/Deployment/DeploymentManager.cpp Outdated Show resolved Hide resolved
{
auto packagePath{ GetPackagePath(packageFullName) };
auto packagePath{ package.InstalledPath()};
Copy link
Member

Choose a reason for hiding this comment

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

Why InstalledPath? Why not EffectivePath?

dev/Deployment/DeploymentManager.cpp Outdated Show resolved Hide resolved
@@ -327,29 +337,38 @@ namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::implem
HRESULT DeploymentManager::VerifyPackage(const std::wstring& packageFamilyName, const PACKAGE_VERSION targetVersion,
__out std::wstring& packageIdentifier) try
{
auto packageFullNames{ FindPackagesByFamily(packageFamilyName) };
winrt::Windows::Management::Deployment::PackageManager packageManager;
auto packages{ packageManager.FindPackagesForUser(L"", packageFamilyName) };
Copy link
Member

Choose a reason for hiding this comment

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

You want all packages in the family? Even Bundle? Resource? Optional?

FindPackagesForUserWithPackageType(...Main|Framework) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should have checked FindPackagesByFamily's definition for proper like for like winrt API replacement and should also have thought beyond like for like replacement here. That also points that FindPackagesByFamily is half complete in it's name as it is filtering in it's find for ONLY Main and Framework package types only and not all package types.

Anyway, figured DeploymentManager::FindPackagesByFamily is not used and also there is a duplicate API, FindByFamily, in dev\common\AppModel.Package.h that does the same.

Probably, the FindByFamily in dev\common\AppModel.Package.h should be renamed as FindMainOrFrameworkPackagesByFamily, to be more precise in it's name ?

@sachintaMSFT sachintaMSFT force-pushed the user/sachinta/DeplomentRepair_Force branch from df46662 to dd47aab Compare October 5, 2022 23:45
@sachintaMSFT sachintaMSFT changed the base branch from main to develop January 26, 2023 13:59
@sachintaMSFT sachintaMSFT dismissed DrusTheAxe’s stale review January 26, 2023 13:59

The base branch was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Deployment Issues related to packaging, installation, runtime (e.g., SelfContained, Unpackaged) feature proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants