Skip to content

Conversation

ssparach
Copy link
Contributor

Summary

This change corrects the construction of the packageFamilyName for the main and singleton packages in DeploymentManager.cpp. Previously, the package family names were being built incorrectly, which caused the DeploymentManager to incorrectly determine that these packages were not installed. As a result, the deployment status was reported as PackageInstallRequired instead of Ok.

Details
• Fixed the logic that formats the version tag and constructs the packageFamilyName for main and singleton packages.
• With the corrected names, DeploymentManager now accurately detects installed packages and returns the correct deployment status.

Testing

The fix was validated in the debugger: after the change, the deployment status is Ok when the packages are present.

A microsoft employee must use /azp run to validate using the pipelines below.

WARNING:
Comments made by azure-pipelines bot maybe inaccurate.
Please see pipeline link to verify that the build is being ran.

For status checks on the main branch, please use TransportPackage-Foundation-PR
(https://microsoft.visualstudio.com/ProjectReunion/_build?definitionId=81063&_a=summary)
and run the build against your PR branch with the default parameters.

@ssparach
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ssparach ssparach marked this pull request as ready for review August 21, 2025 21:48
address PR comments
@ssparach
Copy link
Contributor Author

ssparach commented Sep 2, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

}

unsigned int numberBeforeUnderscore;
if (swscanf_s(versionTag.c_str(), L"%*[^0-9]%u", &numberBeforeUnderscore) == 1)
Copy link
Member

Choose a reason for hiding this comment

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

What's the [^0-9] do here? Wondering how this differs from "%u"

else
{
formattedVersionTag = L"";
}
}
else
{
// Other version types not supported.
FAIL_FAST_HR(HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE));
Copy link
Member

Choose a reason for hiding this comment

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

FAIL_FAST will crash the process. Seems pretty harsh considering this is an inproc API running in some app's process space, and giving them no chance to note the issue or recover.

Why not THROW_HR_MSG(HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE), "%d", static_cast<int>(package.versionType));?

@ssparach
Copy link
Contributor Author

ssparach commented Sep 7, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ssparach ssparach requested a review from DrusTheAxe September 7, 2025 00:27
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.

5 participants