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: initial plugin startup and context management #278

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

j-lanson
Copy link
Collaborator

@j-lanson j-lanson commented Aug 12, 2024

Note: this PR relies on #277 , and so that must be merged first.

This PR introduces the plugin module and some initial type definitions, as well as some code for turning a Plugin into a PluginContext object that will act as a wrapper interface for the gRPC channel (converting between tonic-generated types and "nicer" ones, maintaining the child process handle, etc.)`

The logic for how startup occurs is a first try, and should be subject to discussion. Rather than a MAX_CONN_ATTEMPTS to handle syncronizing the plugin process and Hipcheck, I would support adding a requirement that the plugin outputs to stdout some notifying message like "Ready." that we can wait for.

The code of this PR compiles, but is untested. It would require defining an actual plugin, and injecting a way to test this code into main.rs. We may want to consider switching to a library-style crate so that we can have multiple different bin/ files to enable easier testing of code such as this.

@j-lanson j-lanson added the type: enhancement New feature or request label Aug 12, 2024
@j-lanson j-lanson self-assigned this Aug 12, 2024
@j-lanson j-lanson force-pushed the jlanson/init-plugin-manager branch 4 times, most recently from bec8f39 to ab57345 Compare August 13, 2024 13:41
@j-lanson j-lanson changed the title DRAFT: feat: initial plugin startup and context management feat: initial plugin startup and context management Aug 13, 2024
@j-lanson j-lanson force-pushed the jlanson/init-plugin-manager branch 2 times, most recently from 26143bf to 569709b Compare August 14, 2024 20:34
@j-lanson j-lanson force-pushed the jlanson/init-plugin-manager branch from 569709b to 3d758c2 Compare August 15, 2024 13:09
@j-lanson j-lanson force-pushed the jlanson/init-plugin-manager branch from 3d758c2 to 8e64b65 Compare August 15, 2024 18:09
@alilleybrinker alilleybrinker merged commit 8c714d3 into main Aug 15, 2024
9 checks passed
@j-lanson j-lanson deleted the jlanson/init-plugin-manager branch August 26, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants