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

Support/Document Debugger Processes #134

Closed
bflad opened this issue Jan 6, 2022 · 1 comment · Fixed by #137
Closed

Support/Document Debugger Processes #134

bflad opened this issue Jan 6, 2022 · 1 comment · Fixed by #137
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Jan 6, 2022

terraform-plugin-go version

v0.5.0

Use cases

Downstream abstractions, such as terraform-plugin-sdk/v2 and terraform-plugin-framework, make it relatively straightforward to run servers that invert the process lifecycle so they can be instrumented by debugger and testing processes. Providers written directly on terraform-plugin-go or reliant on terraform-plugin-mux essentially must reimplement those projects' logic to do the same. Given that the reattach handling is strongly correlated to low level details about go-plugin and Terraform CLI, it feels like a potential candidate for creating an implementation in this project.

Proposal

Adding DebugServe and/or Debug functionality in tf5server/tf6server, similar to downstream implementations. Document in README (until #129 is sorted).

References

@bflad bflad added the enhancement New feature or request label Jan 6, 2022
@bflad bflad added this to the v0.6.0 milestone Jan 6, 2022
@bflad bflad self-assigned this Jan 6, 2022
bflad added a commit that referenced this issue Jan 7, 2022
Reference: #134

This will allow providers and downstream SDK implementations to opt into a fully managed debug server, which manages reattach configuration handling and stop signals, rather than requiring duplicate logic that can be unclear to implement.

The `tf5server` and `tf6server` implementations could use some refactoring to reduce _their_ duplicated code (e.g. a shared internal package), however that is left for future handling, especially with other in flight changes at the moment.
bflad added a commit that referenced this issue Jan 12, 2022
Reference: #134

This will allow providers and downstream SDK implementations to opt into a fully managed debug server, which manages reattach configuration handling and stop signals, rather than requiring duplicate logic that can be unclear to implement.

The `tf5server` and `tf6server` implementations could use some refactoring to reduce _their_ duplicated code (e.g. a shared internal package), however that is left for future handling, especially with other in flight changes at the moment.
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant