feat: add panda build command for Docker image builds#98
Open
feat: add panda build command for Docker image builds#98
Conversation
The Dora epoch API returns `globalparticipationrate` as an integer percentage (0-100). The CLI text formatter was multiplying by 100 again, producing values like 4400% instead of 44%.
Route build triggers through the proxy (centralized GitHub token) to dispatch GitHub Actions workflows in eth-client-docker-image-builder. Usage: panda build <client> [--ref REF] [--repo REPO] [--tag TAG] Three-layer implementation: - Proxy: new /github/actions/trigger endpoint + GitHubConfig - Server: POST /api/v1/build/trigger passthrough to proxy - CLI: `panda build` cobra command
After triggering a workflow dispatch, the proxy now finds the corresponding GitHub Actions run ID by polling recent runs. A new run-status endpoint lets the CLI check progress. With --wait, `panda build` blocks until the run completes and exits non-zero on failure — designed for agent workflows that need to wait for the image before continuing.
Two safety guards to prevent runaway agents: 1. Per-workflow cooldown (2 min) — can't re-trigger the same workflow until the cooldown expires 2. Global cap (10 triggers per 10 min) — hard limit across all workflows regardless of which client Returns 429 with a clear message explaining the limit and when the caller can retry.
The created filter had a malformed URL encoding (stray colon). Replace with client-side timestamp comparison against the most recent runs list, which is simpler and reliable.
`panda build geth` now waits for the build to finish and exits non-zero on failure. Use `--no-wait` to fire and forget.
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.
Summary
panda build <client>CLI command for triggering Docker image builds in eth-client-docker-image-builder--waitflag blocks until the build completes — designed for agent workflowsUsage
Architecture
Proxy config
Requires a GitHub token with
actions:writeon the target repo:Files changed
pkg/proxy/handlers/github.gopkg/proxy/server_config.goGitHubAPIConfigstructpkg/proxy/server.gopkg/server/api.gopkg/serverapi/types.gopkg/cli/build.gopanda buildcommand with--waitpkg/cli/server_helpers.gotriggerBuild()+getBuildStatus()helpersTest plan
go build ./...compilesgo test ./...passesgolangci-lintclean on changed packagesgithub.token, runpanda build geth --ref master, verify workflow dispatchedpanda build geth --ref master --wait, verify it polls and returns on completion