Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Load gRPC methods whenever selecting a new request #57

Merged
merged 1 commit into from
Oct 15, 2023

Conversation

Perryvw
Copy link
Contributor

@Perryvw Perryvw commented Oct 14, 2023

Fixes #52

After debugging this, it seems to me the issue was that the methods were only loaded for the request that happened to be selected at startup. This caused the method selection and request body to be broken for all other requests.

This PR changes request loading so that gRPC methods are loaded whenever the GrpcRequestPane is opened for a new gRPC request.

This whole loading of proto methods is pretty inefficient, it writes the proto file to temporary storage and re-parses it every time a request is selected. This could be improved by trivially adding a little cache in ipc/grpc that memoizes these results, but the downside is that users would then have to explicitly reload the protos every time they change.

@archywillhe archywillhe merged commit bb740b1 into ArchGPT:main Oct 15, 2023
@archywillhe
Copy link
Member

archywillhe commented Oct 15, 2023

👍👍

@Perryvw Perryvw deleted the grpc-load-on-startup branch October 19, 2023 18:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restarting the app removes saved gRPC request bodies and breaks proto file link
2 participants