microsoft / microsoft/microsoft-performance-toolkit-sdk
Add plugin validation before installing/loading a plugin package
@mslukebo is already working on this.
Since Jun 7, 2023.
- Dominant language
- C#
- Stars
- 239
- Forks
- 78
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 2
Description
Plugin packages should be validated by the plugins system before they are installed and/or loaded.
The plugin management system should include its own validation steps that always happen. In addition, a client should be able to supply custom validators to the plugin system.
Ideally, validation should occur whenever
- A plugin is discovered
- A plugin is installed
- An installed plugin is loaded
At the very least, a plugin should check if the version of the SDK it referenced is compatible with the running SDK.
Discovered Plugin Validation
When a plugin is discovered, it should be ran through validation. Invalid plugins should still be returned to the client, but the client should be able to discern the plugin is invalid (and have some way to figure out why). For example, AvailablePlugin can have new properties bool CanBeInstalled and string? InvalidReason
Installation Plugin Validation
When installing an available plugin package (from any stream), once the package is created in memory it should be validated. If validation fails, a callback should happen where the client can choose to continue with installation.
Installed Plugin Load Validation
When loading a plugin, the plugin should be validated. If validation fails, a callback should happen where the client can choose to continue with loading.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.