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

feat: allow running plugins via path #528

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Conversation

patrickjcasey
Copy link
Contributor

This pull request accomplishes 3 main goals:

  1. It centralizes the location where all of the LEGACY "plugins" are managed, making it easier in the future to update the codebase to reflect when these features have been updated to use the plugin APIs
  2. Adds the ability to run locally built plugins via a provided filepath, allowing for testing plugins, without the need for relying on downloading plugins and their manifests. This is especially useful for running plugins that are actively being developed.
  3. It centralizes all of the logic for retrieving plugins in hipcheck/src/plugin/retrieval.rs, both local and remote, and fixes an issue where plugin dependencies were not getting downloaded, nor started.

This pull request also cleans up a couple of small items in the codebase:

  • The activity plugin removed mock_engine from its dependencies and added it to its dev-dependencies, as it is only a dependency for testing and should not be running in the context of a normal activity plugin binary
  • Cleaned up some log messages to more accurately reflect the current state of the codebase
  • Adds some missing SPDX license identifiers
  • Fixed a couple of types and minor clippy lints

This pull request also sets the fuzz analysis to be run through the plugin infrastructure. There was a bug with entropy that was only present in the new plugin version of entropy "not enough commits to calculate entropy" was occurring and there is still work on converting the JSON pointer to a span. Once these two issues are resolved, I anticipate it being trivial to convert these analyses to use the plugin infrastructure

@patrickjcasey patrickjcasey changed the title feat: improved plugin dependency resolution feat: allow running plugins via path Oct 25, 2024
hipcheck/src/engine.rs Outdated Show resolved Hide resolved
This commit improves the logic for resolving dependencies and now
properly retrieves dependencies of top-level policy plugins
Copy link
Collaborator

@j-lanson j-lanson left a comment

Choose a reason for hiding this comment

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

Looks good, I'll merge when CI passes

@j-lanson j-lanson merged commit cbb9504 into main Oct 28, 2024
9 checks passed
@patrickjcasey patrickjcasey deleted the patrickjcasey/plugin-query-hang branch October 29, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants