microsoft / microsoft/microsoft-performance-toolkit-sdk

Add plugin validation before installing/loading a plugin package

Open
#306 0 comments 0 reactions 1 assignee View on GitHub

@mslukebo is already working on this.

Since Jun 7, 2023.

enhancement untriaged
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

  1. A plugin is discovered
  2. A plugin is installed
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.