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

Reattach in tests with versioned plugins #310

Open
lovromazgon opened this issue May 27, 2024 · 0 comments
Open

Reattach in tests with versioned plugins #310

lovromazgon opened this issue May 27, 2024 · 0 comments

Comments

@lovromazgon
Copy link

lovromazgon commented May 27, 2024

I've got a test that runs the plugin server in a goroutine and fetches the reattach config from the server using ServeTestConfig.ReattachConfigCh, passing it to the client. The problem is that the server and client are versioned, so the client config has a map of VersionedPlugins while Plugins is empty. When the client is created using the reattach config, Client.Start exits early by calling c.reattach(), skipping the part where the plugin version is determined and leaving ClientConfig.Plugins set to nil. The client is therefore not initialized correctly and can't be used.

I found that executing the version handshake when reattaching solves my problem. Before opening a PR I wanted to ask if this is the proper way to address this issue, or if I'm missing something else.

lovromazgon@a3d2cd0

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant