Repository navigation
Conversation
|
Coverage of the acceptance run against the meshStack backend, on
Uncovered functions
|
f7111e1 to
73db1b9
Compare
73db1b9 to
ebf91ce
Compare
9ab69a7 to
322b873
Compare
3a034bf to
eb512e3
Compare
5975d78 to
98854c7
Compare
abbd309 to
e90226d
Compare
e90226d to
c85b993
Compare
… to client/types/version Another module may not import an internal package, so client.New, which takes an http.Client, could only be called from this module. A pure move with the imports rewritten. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c85b993 to
0332c2c
Compare
| if body == nil { | ||
| return | ||
| } | ||
| WithHeader("Content-Type", contentType)(opts) |
There was a problem hiding this comment.
f: introduce WithContentType (using WithHeader), so have the string Content-Type then only there defined once
There was a problem hiding this comment.
Added http.WithContentType; WithBody, WithBodyFile, WithJsonPayload, WithFormPayload, AbortRun and ClaimRun use it, so Content-Type is spelled only there.
| "github.com/meshcloud/meshstack-cli/internal/testutil/fakemeshstack" | ||
| ) | ||
|
|
||
| func TestRunnerRun(t *testing.T) { |
There was a problem hiding this comment.
f: do not have this test or this logic here in cli client, discuss how to move into bb runner repo
There was a problem hiding this comment.
Moved TestRunnerRun and its fixture to the runner (internal/executor/runyml_test.go). The decoding of inputs and implementation variants stays, as it reads the claim response, and so does MeshRunnerRunImplementation.MarshalJSON, so the public type encodes what it decodes. If you want it out of the CLI, the runner could encode runs with a json/v2 WithMarshalers option instead.
|
|
||
| // TestPublicApiNamesNoInternalType keeps client callable from another module, which Go's internal | ||
| // rule forbids to name an internal type. | ||
| func TestPublicApiNamesNoInternalType(t *testing.T) { |
There was a problem hiding this comment.
f: remove this test, rely on instructions / already complying design
There was a problem hiding this comment.
Removed; the development skill keeps the rule as one line.
| ForRun(run MeshRunnerRun) MeshRunnerRunClient | ||
| // ForRunUuid authorizes with the runner's own credentials and can only register a source and patch its status. | ||
| ForRunUuid(runUuid uuid.UUID) MeshRunnerRunClient |
There was a problem hiding this comment.
f: remove this / move this to the bb runner repo, using the client/http AUthorization interface if possible (which allows to just provide the bearer token aka the run token then i hope)
There was a problem hiding this comment.
ForRunUuid is gone; ForRun(auth http.Authorization, links MeshRunnerRunLinks) is the only way to a run client. The runner passes http.BearerToken(run token) in the child and its session in the poller, which builds the source links from the run uuid itself (building-block-runner#86).
…ptions client.New and RawClient.DoRequest are now callable from another module: no exported name of client uses an internal type. So ListOptions and Page move to client/types, the client.Authorization alias goes, and the API docs download moves to internal/apidocs, its only caller. NewClient takes WithoutRedirects and WithRetry, whose RetryPolicy picks per request which of RetryOnBusy, RetryOnGatewayError and RetryOnBrokenConnection apply; without options it returns the shared client as before. WithHeader replaces WithAccept and WithHeaders, WithContentType sets the Content-Type header, WithBody takes the content type, Send returns the raw response, and an Error names the method and URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0332c2c to
2ac56de
Compare
…rClient A building block runner claims runs, registers as a status source, reports status and moves the plan artifact through client.Runner. ForRun addresses a run by its links and authorizes with the given credentials, so the runner chooses between the run token and its own. The implementation of a run is decoded into one typed variant by its type, the Terraform one with async. NewRunnerClient builds only this API, since client.New builds every meshObject client and logs a debug line for each. client/http gains what the runner needs: streaming a download, a request body read from a file and reopened on a retry, and PATCH. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2ac56de to
3926fcc
Compare
|



building-block-runner moves all its runners into one Go binary (meshcloud/building-block-runner#86). It builds its meshStack client through
pkg/auth.ResolveClient, as the Terraform provider does, and needs aclientit can call from another module.Reading order
internal/httpbecomesclient/httpandinternal/versionbecomesclient/types/version, with only the imports rewritten.client/httpAPI. No exported name ofclientuses aninternal/type any more, andTestPublicApiNamesNoInternalTypechecks it. New client options:WithoutRedirects(), andWithRetry(policy), which picks per request which failures are retried. Without options,NewClientreturns the shared client as before.client.Runner. A runner claims a run, registers as a status source, reports status, and downloads or uploads the plan artifact, using the run token.ForRunUuidreports with the runner's own credentials. A run's implementation decodes into one typed variant by itstype; the Terraform variant carriesasync. An INTEGER input keeps every digit as*big.Int.NewRunnerClientbuilds this API alone.Changes for callers of
clientWithHeaderreplacesWithAcceptandWithHeaders, andWithBodytakes the content type.Sendreturns the raw response, and anErrornames the method and URL.client.Authorizationalias is gone; usehttp.Authorization.ListOptionsandPagemove toclient/types.Merge order
Merge and release this first. #86 then pins the release in place of this branch's head.
Cross-repo PRs
🤖 Generated with Claude Code