Draft
Conversation
- Add Socket field to PKIMetalConfig struct - Modify execute() to create HTTP client with Unix socket transport - Update docker-compose.yml to use pkimetal v1.32.0 with Unix socket - Configure socket volume sharing between boulder and pkimetal - Update test configs to use Unix socket instead of HTTP endpoint Co-authored-by: mcpherrinm <47425+mcpherrinm@users.noreply.github.com>
- Add timeout to HTTP client for Unix socket transport - Use url.JoinPath for Unix socket URL construction for consistency Co-authored-by: mcpherrinm <47425+mcpherrinm@users.noreply.github.com>
- Create pkimetal.yaml config files with server.webserverPath setting - Mount config file in docker-compose instead of using command-line args - Add config for both test/config and test/config-next directories Co-authored-by: mcpherrinm <47425+mcpherrinm@users.noreply.github.com>
- Ensure both Unix socket and HTTP connections respect configured timeout - Improve comment clarity about localhost usage in Unix socket URLs Co-authored-by: mcpherrinm <47425+mcpherrinm@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for pkimetal via Unix socket
Support pkimetal via Unix socket
Dec 18, 2025
Contributor
|
@Copilot, this PR appears to contain configuration and/or SQL schema changes. Please ensure that a corresponding deployment ticket has been filed with the new values. |
mcpherrinm
reviewed
Dec 18, 2025
Contributor
There was a problem hiding this comment.
To enable connection reuse, we shouldn't create a new http.Client (and importantly, http.Transport) for each request.
This code is a bit more verbose than it needs to be: Only the dummy value in place of pkim.Addr and Transport needs to change if pkim.Socket is set.
Contributor
Author
There was a problem hiding this comment.
Refactored to store the HTTP client in the struct for reuse across requests, enabling connection pooling. The code now only conditionally sets the Transport and base URL, eliminating duplication. Changes in commit 86c1eb9.
- Store http.Client in PKIMetalConfig struct for reuse across requests - Initialize client lazily on first execute() call - Only conditionally set Transport for Unix socket, simplifying code - Reduces verbosity by eliminating duplicate client creation logic Co-authored-by: mcpherrinm <47425+mcpherrinm@users.noreply.github.com>
- Use sync.Once to ensure thread-safe HTTP client initialization - Remove timeout from client (apply per-request via context instead) - Prevents race conditions when multiple goroutines call execute() Co-authored-by: mcpherrinm <47425+mcpherrinm@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation Plan for pkimetal Unix Socket Support
Socketfield toPKIMetalConfigstruct inlint_cert_via_pkimetal.goexecute()method to create HTTP client with Unix socket transport whenSocketis configuredtest/config/zlint.tomlto use socket configurationtest/config-next/zlint.tomlto use socket configurationSummary
All changes completed. The implementation enables pkimetal to run via Unix socket with thread-safe connection pooling.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.