CLI: Update hypeman SDK to dbfca4d314b8de6004c75da801e233752d9d798b and add new commands/flags - #60
Open
kernel-internal[bot] wants to merge 3 commits into
Open
CLI: Update hypeman SDK to dbfca4d314b8de6004c75da801e233752d9d798b and add new commands/flags#60kernel-internal[bot] wants to merge 3 commits into
kernel-internal[bot] wants to merge 3 commits into
Conversation
The staging SDK (kernel/hypeman-go@3d2b0a55) adds a Builders resource (POST/GET /builders, GET/DELETE /builders/{id}, POST /builders/{id}/prune) and BuildNewParams.BuilderID, so builds can reuse a persistent cache disk. That commit lives only in the private kernel/hypeman-go-staging repo and is not resolvable as github.com/kernel/hypeman-go, so go.mod stays on b0c2df62be94 (already the newest published revision). To ship the coverage now, these commands call /builders through the client's generic request methods and pass builder_id as a multipart extra field. Both are marked to move to client.Builders.* and params.BuilderID once the SDK publishes. A full enumeration of api.md against pkg/cmd/ found no other gaps. Co-authored-by: Cursor <cursoragent@cursor.com>
The SDK now generates a BuilderService and a builder_id field on BuildNewParams, so the builder commands no longer need to reach the /builders endpoints through the client's generic request methods and `build --builder` no longer needs to smuggle builder_id through extra fields. Requesting the raw response body leaves the typed result nil, so the handlers that read fields off the response only ask for it in the formats that render the response verbatim. Co-authored-by: Cursor <cursoragent@cursor.com>
build --builder for new SDK surfaceBumps github.com/kernel/hypeman-go to v0.23.0 (dbfca4d). A full enumeration of api.md methods and their param structs against the CLI command tree found no coverage gaps, so no command or flag changes are needed. Co-authored-by: Cursor <cursoragent@cursor.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.
This PR updates the Hypeman Go SDK to dbfca4d314b8de6004c75da801e233752d9d798b and adds CLI commands/flags for new SDK methods.
SDK Update
v0.23.0, which is the tag on that commit, so that is whatgo.modpins)Coverage Analysis
This PR was generated by performing a full enumeration of SDK methods and CLI commands.
Every method in the SDK's
api.mdwas cross-checked against the command tree, and every*Paramsstruct field (including nested param types such asAutoStandbyPolicyParam,HealthCheckParam,RestartPolicyParam,SnapshotPolicyParam,VolumeMountParam,IngressRuleParam, and theInstanceNewParamsGPU/network/credential sub-structs) was cross-checked against the flags of its command. No endpoints are markedx-cli-skip: trueinopenapi.yaml, so all methods require CLI coverage.Relative to the previously pinned SDK (
3d2b0a5), this bump contains only a CI/release change and the release commit itself; the generated API surface is unchanged. The re-run of the enumeration against the fullapi.mdfound no remaining gaps, so this revision adds no new commands or flags on top of what the branch already carried.New Commands
The following were added earlier on this branch for the
Buildersresource, which was the last new SDK surface:hypeman builder createforclient.Builders.New()hypeman builder listforclient.Builders.List()hypeman builder getforclient.Builders.Get()hypeman builder deleteforclient.Builders.Delete()hypeman builder pruneforclient.Builders.Prune()New Flags
--id,--name,--disk-size,--tagonhypeman builder createforBuilderNewParams.ID,.Name,.DiskSizeGB,.Tags--tagonhypeman builder listforBuilderListParams.Tags--builderonhypeman buildforBuildNewParams.BuilderIDNotes on earlier revisions of this branch
The builder commands and
build --builderwere originally written against the genericclient.Get/Post/Deleterequest methods andparams.SetExtraFields, because the generated SDK did not yet expose aBuilderService. The SDK now generates it, so those call sites useclient.Builders.*,hypeman.BuilderNewParams,hypeman.BuilderListParams, andparams.BuilderID, and thebuilder listtable reads typedhypeman.Builderfields instead of parsing JSON.One correctness fix came out of that migration:
option.WithResponseBodyIntocaptures the raw response body but leaves the typed return value nil, so handlers that read fields off the response (builder create,builder prune) only request the raw body for the formats that render the response verbatim. This matches the existing pattern infork.go.Verified against the new SDK with
go build ./...,go vet ./..., andgo test ./...(all passing, includingTestSubcommandsAreListedInHelp, which walks the whole command tree and guards against SDK surface that is wired up but unreachable from--help).Triggered by: kernel/hypeman-go@dbfca4d
Reviewer: @sjmiller609
Note
Low Risk
Additive CLI and SDK bump; no auth or core build-path refactors beyond an optional builder ID flag.
Overview
Bumps hypeman-go to v0.23.0 and exposes the new Builders API in the CLI.
Adds
hypeman builderwith create, list, get, delete, and prune for persistent cache disks (tags, disk size, table/JSON output).hypeman buildgains--builder/--builder-idso builds reuse a builder’s cache and serialize per builder.create and prune only use
WithResponseBodyIntowhen a non-auto--formatis set, so default output can read typed SDK fields (e.g. print the new builder ID).Reviewed by Cursor Bugbot for commit f20eba8. Bugbot is set up for automated code reviews on this repo. Configure here.