hipcheck icon indicating copy to clipboard operation
hipcheck copied to clipboard

feat: Reorg libs and update protobuf defs

Open alilleybrinker opened this issue 1 year ago • 4 comments

This commit moves the two Hipcheck "macro" libraries (hipcheck-macros and hipcheck-sdk-macros) under the libraries/ folder, which going forward will be used as the directory for any support library crates we define in the Hipcheck project.

It also deduplicates the protobuf definition files, ensuring that all users of them are synced with the central definition, and updates them to comply to buf's recommended best practices for protobuf files. This includes updates to all users of the definitions to comply with the new specification. Note that these changes are backwards incompatible, as they involve changing the names of existing calls in the gRPC interface.

This is a breaking change, but given that the plugin interface is still experimental and without real operational users, this is the right time to get the interface definition right without letting ourselves be locked in to compatibility.

alilleybrinker avatar Oct 10 '24 22:10 alilleybrinker

./target/debug/hc plugin
Starting HcPluginCore
Failed to create engine: status: Unimplemented, message: "", details: [], metadata: MetadataMap { headers: {"date": "Fri, 11 Oct 2024 13:11:35 GMT", "content-type": "application/grpc", "content-length": "0"} }

seems to be a bug somewhere

j-lanson avatar Oct 11 '24 13:10 j-lanson

I really need to add an automated smoke test for this kind of failure.

alilleybrinker avatar Oct 11 '24 15:10 alilleybrinker

Rebased; have not yet addressed the other comments.

alilleybrinker avatar Oct 11 '24 17:10 alilleybrinker

Added smoke tests, identified test failure; now working on resolving.

alilleybrinker avatar Oct 11 '24 22:10 alilleybrinker

Figured out the bug. It was actually not always able to find the binaries it was trying to run during a test. Added some logging to the plugin spawning code which let me track the issue down. Looks like this needs a rebase, which I'll take care of, but at least now I feel confident in the changes.

alilleybrinker avatar Oct 15 '24 16:10 alilleybrinker

Agh, tests still failing here. It seems that the problem here is that this test relies on having compiled the plugins so they're available to run. When running an integration test Cargo makes sure the crate you're attached to has been built, but it doesn't make sure the whole workspace has been built. So that's my next thing to resolve then.

Easiest solution would be to call Cargo to do the build from inside the test, though I'm not sure if that's the best solution.

alilleybrinker avatar Oct 15 '24 16:10 alilleybrinker

Deciding to close this. I still want to bring in the tests proposed here, and some of the reorg stuff I think is useful, but this is too many changes in one PR, and it's drifted substantially from main now.

alilleybrinker avatar Nov 04 '24 19:11 alilleybrinker