-
Notifications
You must be signed in to change notification settings - Fork 334
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
API Spec for Reunion Deployment Information API #156
Conversation
static ProjectReunionDeploymentStatus GetStatus(Windows.ApplicationModel.PackageVersion packageVersion); | ||
|
||
/// Returns a URI for the direct install link for the latest Project Reunion Package. | ||
static Windows.Foundation.Uri GetProjectReunionPackageLink(); |
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.
Are Main+Framework package versions in lockstep? If not then this should be GetPackageLinks() returning 1+ links? 0+ links?
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.
Assuming for now that they are kept updated in lock-step. Regardless, the InstallPackage link is a .appinstaller file. So perhaps this should actually be "AppInstallerLink" ? Or just "InstallLink" to fit with naming scheme?
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.
If it's a URI to *.appinstaller then yes, it should be AppInstallerLink or AppIntallerUri
Or maybe AppInstallerInfo a la W.AM.Package.GetAppInstallerInfo?
|
||
This is the spec for proposal [Project Reunion Deployment Information API #155](https://github.com/microsoft/ProjectReunion/issues/https://github.com/microsoft/ProjectReunion/issues/155). | ||
|
||
Project Reunion's deployment consists of a Main package and Framework package published by |
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.
It would be worth describing what a "Main package" and "Framework Package" is for folks who aren't familiar with the terms. I don't even know what a Main package is 😊
|
||
# Description | ||
|
||
When a Project Reunion-consuming package or app is deployed, it is expected to only have the App |
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 this a packaged or unpackaged app, or both?
The API addresses #1 by a simple query of the version they seek and a possible check for OS | ||
updates. #2 has two possible answers. First is direct resolution by the developer by acquiring and | ||
installing the packages if possible. Some programs will not have permission or motivation to do | ||
this, so the second answer is providing a link up to the user where the user can take action to |
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.
By "user" are you referring to someone using Windows, or a developer? Popping up install messages to the user sounds icky. When and why would this happen?
|
||
Provides a direct install link to deploy the latest version of Project Reunion. If no OS Updates | ||
are required and the program or app has permissions to deploy packages, this can directly resolve | ||
the missing dependency without burdening the user. |
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.
side note: we should never burden the user
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 agree, though this is a special circumstance due to permissions. The app may not have permissions to install OS updates or other things required by Project Reunion on a downlevel device. This should be an at most 1 time deal for the typical user, and only on downlevel OSes. For future OSes, this can be mitigated by preinstalling Project Reunion, where it will be auto-updated by the store and required OS updates are already present.
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.
A core goal of Reunion is to help apps work even when running "downlevel" without necessarily updating the underlying OS. Nobody wants a "thanks for paying your money and installing, now take these QFEs" popup during first launch. Let's talk (internally) about how we want to approach this.
Ideally, certain Reunion features have a Something.IsSupported
or similar where the component says "I'm not supported on this OS/environment" and if that needs to expand to return a "yes/no/MaybeWithOSUpdate" combination we can discuss.
/// are required. | ||
Boolean IsOK { get; }; | ||
|
||
// Returns True if Windows Updates are required for Project Reunion. |
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.
What does this mean to a developer? What do I do if a Windows Update is required?
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 that a typo? Should be "Windows updates"?
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.
it should be Windows updates (I come from a world where Windows Update is a proper noun). Anyway, the meaning to a developer is for one who wishes to provide a better user experience. If Windows Updates are required, it is unlikely the developer will be able to resolve that, but if Package updates are required, it is possible the developer could trigger an update using the appinstaller link. It's a crawl -> walk -> run experience. The crawl is the install instructions link. The walk is the developer triggering package updates by themselves for a better user experience. The run is none of this is required at all because it's already handled by the OS (which won't be possible on most downlevel OSes).
How are developers getting bits on their machine to debug and test apps? |
```C++ | ||
Windows::ApplicationModel::PackageVersion version{1, 0, 0, 0}; | ||
auto status = | ||
Microsoft::Management::Deployment::ProjectReunionDeployment::GetStatus(version); |
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 assume the "ProjectReunionDeployment" class name is temporary working name, and "ProjectReunion" will be dropped from these APIs?
Second. Why are there APIs for this? Why can't the installer just take care of all of this? I don't want to have to write any of this code, but want the installer tooling to take care of all of this at startup, so we can get a consistent experience across all apps.
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.
What installer? How does it "do this"?
An app could do none of this in main(), rely on its installer to DoTheRightThing(TM) and main() just assumes the system's 'environmental soup' is correct. In which case this sample is what the installer would do.
But...why do you assume there's an installer? 'XCOPY-install' apps don't have an installer. And some devs want their app to 'check their environmental soup' (up front or if/when things go wrong).
NSIS or ClickOnce could do this, if they so choose. But apps can too, and some very much want or need to.
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.
Name is working and open to better suggestions. The reason this exists was defined at the top of the spec, but we may have OS updates required, we may have package updates required. We may not have the package at all. The developer needs to know and should be calling this API to check that all their expected Project Reunion dependencies are met and at a version minimum that they expect, otherwise their app will not function properly. So this API really answers two key questions for a developer:
-
Is Project Reunion the correct version and in a good state for what I need? They call GetStatus() for this and provide the minimum version of Reunion they tested against.
-
If the status object returned is !IsOK(), what do I do about it? The obvious answer is their program should probably terminate and not try to continue without the dependency being satisfied, but the real question is how do they satisfy the dependency? There are two sub-options here for developers to resolve the problem:
a) They get the install instructions link and shell execute it and inform the user that there is action they need to take. While not great, this should be a 1-time deal for most situations. Sort of like needing to update DirectX or any other redist, but OS updates may be required here.
b) If OS updates are not required, and the are either a non-packaged medium-IL program, or a packaged app with Package Management capability, they can attempt to resolve the problem directly by getting the package (really appinstaller) install link and triggering the package install/update directly themselves.
Last I heard, we were following the WinUI2.x model for shipping, which means that pre-release packages will ship the assemblies app-local, is this still the plan? |
This spec seems fairly light on "how do I use this" - can we get some more examples please? |
That's under active discussion There's a strong intent to ship(1) as MSIX Framework packages. Supporting (in the technical as well as policy/sanctioned/official-Support-channels sense) 'app-local' aka the 'redist' model in addition to Framework packages is begin debated. There's also discussions under way re versioning strategy, 'prerelease' and like topics. Important but complex topics so please be patient. And if you have thoughts on the subject, please share your feedback. Input to this repository is monitored by many directly involved in these (and other) topics. The dialogue(s) here help us understand and shape our efforts. (1) I assume you mean install/runtime, not dev/build-time. Nuget packages are the plan for the latter, at least for the initial release. Gotta start somewhere :-) |
missing dependencies. | ||
|
||
The developer scenarios for this API is to answer the questions: | ||
1. Does this system have the min version of Project Reunion I require? |
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.
Nit: Put a newline here, some markdown renderers get confused by number lists without a blank line before.
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.
Tip if you use VSCode, install the markdownlist extension and run it occasionally. It flags this sort of thing
```C++ | ||
Windows::ApplicationModel::PackageVersion version{1, 0, 0, 0}; | ||
auto status = | ||
Microsoft::Management::Deployment::ProjectReunionDeployment::GetStatus(version); |
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.
Could this be made generic first, like GetPackageStatus
that takes a string, and then layer the Project Reunion part over that with a known constant like ProjectReunionRuntime.FrameworkPackageName
and ProjectReunionRuntime.MainPackageName
(or similar)? Then if we ever have Electron or Flutter or Node or WebView2 as framework packages this code can be reused by their client apps easily?
|
||
Provides a direct install link to deploy the latest version of Project Reunion. If no OS Updates | ||
are required and the program or app has permissions to deploy packages, this can directly resolve | ||
the missing dependency without burdening the user. |
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.
A core goal of Reunion is to help apps work even when running "downlevel" without necessarily updating the underlying OS. Nobody wants a "thanks for paying your money and installing, now take these QFEs" popup during first launch. Let's talk (internally) about how we want to approach this.
Ideally, certain Reunion features have a Something.IsSupported
or similar where the component says "I'm not supported on this OS/environment" and if that needs to expand to return a "yes/no/MaybeWithOSUpdate" combination we can discuss.
the missing dependency without burdening the user. | ||
|
||
```C++ | ||
Windows::Foundation::Uri packageLink = Microsoft::Management::Deployment::ProjectReunionDeployment::GetInstallPackageLink(); |
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.
General, per above - I think we should split "the mechanics of doing these" away from "the Project Reunion specific instances of stuff." So this URI would not be in MMD.PRD
as a namespace, it would be in Microsoft.ProjectReunion.Common.GetPackageInstallUri
or similar.
the missing dependency without burdening the user. | ||
|
||
```C++ | ||
Windows::Foundation::Uri packageLink = Microsoft::Management::Deployment::ProjectReunionDeployment::GetInstallPackageLink(); |
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.
Nit on naming: GetPackageSourceUri
instead of GetInstallPackageLink
{ | ||
/// Returns True if Project Reunion is the desired Version and no updates or packages | ||
/// are required. | ||
Boolean IsOK { get; }; |
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.
This is returned from something, so I presume the OK-ness was computed during that operation.
Boolean IsOK { get; }; | ||
|
||
// Returns True if Windows Updates are required for Project Reunion. | ||
Boolean WindowsUpdatesRequired { get; }; |
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.
IsWindowsUpdateRequired
or RequiresWindowsUpdate
maybe.
Boolean WindowsUpdatesRequired { get; }; | ||
|
||
// Returns True if a Package install is required for Project Reunion. | ||
Boolean PackageInstallRequired { get; }; |
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.
Should this be PackageMissing
?
Is the intent of the set of bools to be "here are multiple problems you need to resolve"?
} | ||
|
||
/// Used to query deployment information for Project Reunion | ||
static runtimeclass ProjectReunionDeployment |
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.
Consider moving this up into Microsoft.ProjectReunion
as the type ProjectReunionPackage
maybe?
First cut at proposed API spec for feature proposal: #155
Feedback appreciated, thank you!