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

Repair switch support for V1.7 YAML manifest #4041

Conversation

Madhusudhan-MSFT
Copy link
Contributor

@Madhusudhan-MSFT Madhusudhan-MSFT commented Jan 8, 2024

Add YAML manifest entries for winget repair behavior

Manifest Entries includes:
- The Repair switch, within InstallerSwitch, allows for custom repair of a package.
- The RepairBehavior enum field, present in the Installer & root level field, determines the repair behavior for the source package used to repair a package.
- Updated the test manifest (ManifestV1_7-MultiFile-Installer.yaml) and the test code that validate the Repair switch and RepairBehavior fields.

[How Validated:]

  • Made the necessary changes to the manifest
  • Ran the ManifestValidation tests that are part of AppInstallerCLITests and verified that all the tests passed

[Test Result:]

Filters: [ManifestValidation]
===============================================================================
All tests passed (4008 assertions in 30 test cases)

Filters: [ManifestCreation]
===============================================================================
All tests passed (1309 assertions in 7 test cases)

TODO's:

  • Determine the interdependency validation between the "RepairBehavior" and "Repair" fields. Should this be a semantic validation or a validation at the time of workflow execution as an early validation step?

Related to :


Microsoft Reviewers: Open in CodeFlow

Manifest Entries includes:
- The Repair switch, within InstallerSwitch, allows for custom repair of a package.
- The RepairBehavior enum field, present in both the Installer and root nodes, determines the repair behavior for the source package used to repair a package.
…ring only supported installers can specify repair behavior.

[Why]
This change is to prevent incorrect mapping for unsupported installers by disallowing RepairBehavior field at root level
@Madhusudhan-MSFT Madhusudhan-MSFT marked this pull request as ready for review January 8, 2024 20:24
@Madhusudhan-MSFT Madhusudhan-MSFT requested a review from a team as a code owner January 8, 2024 20:24
JohnMcPMS
JohnMcPMS previously approved these changes Jan 10, 2024
JohnMcPMS
JohnMcPMS previously approved these changes Jan 10, 2024
… with the manifest design.

This commit address two spacing alignment issues in manifest through this commit.
…epair� InstallerSwitch manifest read/parsing logic within manifest major version 1
…viorEnum to utilize string_view from last commit.
…avior and modified V1_7 test manifests.

NOTE:Please note that RepairBehavior, Repair reference, and values in test manifest are for demonstration and validation only, not real samples.
@Madhusudhan-MSFT
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Trenly
Copy link
Contributor

Trenly commented Jan 12, 2024

Does this PR also add support for it in the COM API?

@Madhusudhan-MSFT
Copy link
Contributor Author

Does this PR also add support for it in the COM API?

The scope of this PR is limited to manifest support for the Repair functionality. While we do have plans to add support for the COM API, that change is not included in this PR. The repair workflow and COM API implementation will be addressed in separate PRs, allowing us to more effectively manage the complexity and address feedback on different aspects of the implementation.

@Trenly
Copy link
Contributor

Trenly commented Jan 12, 2024

Does this PR also add support for it in the COM API?

The scope of this PR is limited to manifest support for the Repair functionality. While we do have plans to add support for the COM API, that change is not included in this PR. The repair workflow and COM API implementation will be addressed in separate PRs, allowing us to more effectively manage the complexity and address feedback on different aspects of the implementation.

I see; Thanks!

yao-msft
yao-msft previously approved these changes Jan 16, 2024
Copy link
Contributor

@yao-msft yao-msft left a comment

Choose a reason for hiding this comment

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

:shipit:

…a manifest to ensure consistency with other usage in the schema manifest.
@Madhusudhan-MSFT Madhusudhan-MSFT merged commit 4993e4b into microsoft:master Jan 17, 2024
8 checks passed
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.

4 participants