diff --git a/AGENTS.md b/AGENTS.md index 9bcf4f50..a1ec45dc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -43,6 +43,7 @@ This document exists for non-obvious, error-prone shortcomings in the codebase, - `timeout` covers two different outcomes and the message is the only thing that separates them: a `--wait` budget that ran out with the job still running server-side (message names the `serverless status` follow-up; do not re-invoke), and a single invoke call that exceeded the per-call `timeout` config key (`health`, a plain `status`, the submit — nothing is left running, a retry is correct). `internal/api/invoke.go`'s `do()` turns *any* context deadline into a `TimeoutError`, so do not narrow the documented meaning to "the work is still running" — the control plane reports the same condition as `network_error`, which is the closest analogue. `model add --wait-for-hash` was `cli_error` before this and is now `timeout`. - a job payload and the health body are third-party data, so they go out through `output.PrintRaw`, not `output.Print`. `Print` rewrites `gpuTypeId`->`gpuId` (right for the cli's own control-plane structs, wrong for a handler's keys) and round-trips through `map[string]interface{}`, which turns every number into a float64 and corrupts integers above 2^53. - a 200 from the invoke api is not necessarily a job: a body with neither `id` nor `status` is a bare error object. `api.Job.HasEnvelope` guards it, otherwise `run` would exit 0 on a failed request and print a follow-up `serverless status` command with an empty job id. `HasEnvelope` is satisfied by a bare `status`, so it does *not* cover a submit that returns a status and no id — `invokeJob`'s `--no-wait` branch has its own `NewNoJobIDError` guard for that, and `waitForTerminal` captures the job id once up front rather than re-reading it from each poll response. +- a model version's hash is nonempty from the moment the version exists: the api assigns a `ph-<32 hex>` placeholder while the version is still `NEEDS_HASH`, and `myModels` (what the cli reads) does not filter those out the way the public `models` surface does. so a nonempty hash is not readiness -- deployability is `status` in {`POD_READY`, `READY`}, the exact set the api's endpoint validator accepts (`READY_MODEL_REPO_STATUSES` in its aiApi schema; anything else is rejected with "Model Repo reference is not ready for endpoint deployment"), plus a non-`ph-` hash. and an upload whose bytes already exist server-side is never hashed at all: the api deprecates *this* uuid, leaves its placeholder hash in place forever, and records the version that holds the content in `metadata.dedupedToCanonicalVersion` as `{uuid, hash}` -- so `DEPRECATED` plus that pointer is a successful upload whose canonical hash is the answer, not a failure, and treating it as one makes `--wait-for-hash` burn its whole budget on a healthy dedupe. `FAILED`/`POD_REMOVED`/`DEPRECATED`-without-pointer are terminal and end the wait with `conflict`. - `saveEndpoint` has no `computeType`: cpu is selected by sending `instanceIds` like `cpu3g-4-16` (gpu is the default when instanceIds is empty). `name` is required (`String!`, min 3) and is never auto-generated server-side — generate one client-side. flashboot is the `flashBootType` enum (`OFF`/`FLASHBOOT`), not a bool. multi-region volumes are `networkVolumeIds: [{networkVolumeId}]`, not a flat string array. - `--wait` readiness signals are not the obvious fields: a pod's port 22 shows up in `runtime.ports` (graphql; rest leaves `runtime` null) minutes before sshd listens, and prod allocates it even for images with no sshd — so readiness is a tcp connect plus an ssh banner, never the port listing. an endpoint's `includeWorkers` list is historical: every worker on a warm, healthy endpoint reads `desiredStatus: EXITED` while `/health` reports them ready, so worker readiness comes from `/health` (invoke service, `RUNPOD_INVOKE_URL`). neither `/health` counter means "hot handler" and there is no third one: `ready` counts flashboot-cached workers (`ai-api/pkg/api/health.go` `counts()` buckets an `EXITED` pod as ready when `workerstate.IsReady`), and `running` counts `desiredStatus: RUNNING`, which is written when the worker row is created — i.e. at scheduling time, before any container exists (`runpod-backend/model/src/pod/rentPod.ts`). `running` still has to count, because a `workersMin` worker stays `RUNNING` forever and never enters `ready`. `workersMin 0` does **not** mean "no worker ever starts": `finalEndpoint` floors `workersStandby` to 5 whenever `workersMax > 1` (`ai-api/pkg/graphql/aiapi.go`), `worker.Sync` fills it with cache workers (`pkg/worker/sync.go`), and every `/health` read triggers a `Sync` (`pkg/loader/aiapi.go`) — so `--wait` at 0 min workers warns, it is not refused. - a wait must treat poll errors as "state unknown" and keep going, because the resource already exists and bills; reporting a transport code would tell an agent to retry the create and buy a second one. only these end it early: http `400`/`401`/`403` or the codes `unauthorized`/`forbidden`/`no_credentials`/`bad_request`, a terminal pod status (`conflict`), and a resource missing from **two consecutive** reads (`not_found`) — or, for a resource that has never been readable at all, from twelve consecutive reads (`missesBeforeKnown`, ~1 min at the default interval, and only if `--wait-timeout` is longer than that), so an endpoint deleted or mistyped before `/health` ever answered, or a pod terminated before it was ever listed, does not burn the whole budget and then report `wait_timeout`. both waits enforce it. the status check is load-bearing, not redundant: the pod wait's only api call is graphql, and every graphql failure is an `*api.GraphQLError` whose `ErrorCode()` is the constant `graphql_error`, so a bad key would otherwise burn the whole budget and report `wait_timeout`. `404`/`429`/`5xx` stay transient — `/health` 404s an endpoint id it has not propagated yet. errors that leave a billed resource behind carry its id in the error object's `id` field (`internal/output.WithResourceID`), not only in the message. diff --git a/README.md b/README.md index 87fe1163..e640ceaa 100644 --- a/README.md +++ b/README.md @@ -436,7 +436,7 @@ codes the cli generates: | --- | --- | | `usage_error` | your invocation was wrong (unknown command/flag, bad or missing args, missing required flags). usage text is printed after the json | | `not_found` | the api has no such resource. during a `--wait` it can also mean a resource that *was* created has gone (or never became visible), so check for an `id` field and clean up rather than assuming nothing exists | -| `bad_request` `unauthorized` `forbidden` `conflict` `rate_limited` `server_error` `api_error` | derived from the rest status | +| `bad_request` `unauthorized` `forbidden` `conflict` `rate_limited` `server_error` `api_error` | derived from the rest status. `conflict` is also emitted without one, for a resource in a state no amount of waiting fixes: a terminal pod during `--wait`, an endpoint with no workers to read logs from, a model version that failed server-side hashing during `--wait-for-hash` (re-run the upload; do not poll) | | `graphql_error` | graphql returned an errors array (http 200) | | `timeout` | the cli stopped waiting. two cases, told apart by the message: a `--wait` / `--wait-for-hash` budget ran out with the work still running server-side (the message names the command to poll it — do that, do not re-invoke), or a single api call exceeded the `timeout` config key (nothing is running; retry) | | `job_failed` | a serverless job reached a terminal status other than `COMPLETED`. the job payload is still on stdout | diff --git a/api/model.go b/api/model.go index 10c2a83e..38e36ad5 100644 --- a/api/model.go +++ b/api/model.go @@ -46,9 +46,17 @@ type ModelVersion struct { Metadata map[string]interface{} `json:"metadata,omitempty"` } -// ModelVersionStatus constants used when updating a model version's status. +// ModelVersionStatus constants: the statuses the cli writes when updating a +// model version, plus the ones it has to branch on while waiting for an upload. +// POD_READY and READY are the only two the api accepts for endpoint deployment +// (`READY_MODEL_REPO_STATUSES` in its aiApi schema): a version in any other +// status is rejected at deploy time. const ( ModelVersionStatusReady = "READY" + ModelVersionStatusPodReady = "POD_READY" + ModelVersionStatusNeedsHash = "NEEDS_HASH" + ModelVersionStatusFailed = "FAILED" + ModelVersionStatusDeprecated = "DEPRECATED" ModelVersionStatusPodRemoved = "POD_REMOVED" ) diff --git a/cmd/model/addModelDeleteAfterUpload_test.go b/cmd/model/addModelDeleteAfterUpload_test.go index 98187650..2225f539 100644 --- a/cmd/model/addModelDeleteAfterUpload_test.go +++ b/cmd/model/addModelDeleteAfterUpload_test.go @@ -97,7 +97,7 @@ func stubAddModelUploadSeams(t *testing.T) { Owner: "user-id", Name: "test-model", Provider: "LOCAL", - Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: "hash-123"}}, + Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: "hash-123", Status: api.ModelVersionStatusPodReady}}, }}, nil } } @@ -169,13 +169,15 @@ func TestRunAddModelDeleteAfterUploadLeavesFilesWhenHashConfirmationFails(t *tes } getModelsForAdd = func(input *api.GetModelsInput) ([]*api.Model, error) { - // hash never shows up + // the real hash never shows up: the version keeps the placeholder hash the + // api assigns at creation, which is exactly the state that must NOT count + // as confirmation for deleting local files. return []*api.Model{{ ID: "model-id", Owner: "user-id", Name: "test-model", Provider: "LOCAL", - Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: ""}}, + Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: "ph-0123456789abcdef", Status: api.ModelVersionStatusNeedsHash}}, }}, nil } @@ -195,12 +197,12 @@ func TestRunAddModelDeleteAfterUploadLeavesFilesWhenHashConfirmationFails(t *tes if runErr == nil { t.Fatal("expected non-zero error when hash confirmation fails") } - if !strings.Contains(runErr.Error(), "timed out waiting for the model hash") { + if !strings.Contains(runErr.Error(), "timed out waiting for the model version to become deployable") { t.Fatalf("expected timeout error, got %v", runErr) } if _, err := os.Stat(weightsPath); err != nil { - t.Fatalf("expected weights.bin to remain on disk when hash was never confirmed, stat err: %v", err) + t.Fatalf("expected weights.bin to remain on disk when the version never became deployable, stat err: %v", err) } } diff --git a/cmd/model/addModelToRepo.go b/cmd/model/addModelToRepo.go index 3c47c52d..1bb95086 100644 --- a/cmd/model/addModelToRepo.go +++ b/cmd/model/addModelToRepo.go @@ -50,8 +50,30 @@ const ( modelGraphQLTimeoutValue = time.Minute modelHashPollInterval = 5 * time.Second modelHashWaitTimeout = 30 * time.Minute + + // placeholderModelVersionHashPrefix marks the hash the api assigns when it + // creates a version, before the real content hash is known. + placeholderModelVersionHashPrefix = "ph-" + + // dedupedCanonicalVersionMetadataKey is where the api records the canonical + // version a deduped upload was folded into, as {uuid, hash}. + dedupedCanonicalVersionMetadataKey = "dedupedToCanonicalVersion" ) +var deployableModelVersionStatuses = map[string]bool{ + api.ModelVersionStatusPodReady: true, + api.ModelVersionStatusReady: true, +} + +// terminalModelVersionStatuses will never become deployable. DEPRECATED is +// terminal only when it carries no canonical-version pointer, which +// uploadedModelVersionState checks first. +var terminalModelVersionStatuses = map[string]bool{ + api.ModelVersionStatusFailed: true, + api.ModelVersionStatusDeprecated: true, + api.ModelVersionStatusPodRemoved: true, +} + // The GraphQL requests for uploading a model can take longer than the default // 10s, as the server needs to create pre-signed S3 URLs from R2, which can be // slow. So we bump it up to 1m so that we do not fail erroneously. @@ -202,10 +224,10 @@ func bindAddModelFlags(cmd *cobra.Command) { cmd.Flags().StringVar(&addModelContentType, "content-type", "", "upload content type") cmd.Flags().StringVar(&addModelDirectoryPath, "model-path", "", "directory containing model files to upload") cmd.Flags().StringToStringVar(&addModelMetadata, "metadata", nil, "metadata key=value pairs") - cmd.Flags().BoolVar(&addModelWaitForHash, "wait-for-hash", false, "wait for completed model-path uploads to be hashed") + cmd.Flags().BoolVar(&addModelWaitForHash, "wait-for-hash", false, "wait for completed model-path uploads to become deployable") cmd.Flags().DurationVar(&addModelHashTimeout, "hash-timeout", modelHashWaitTimeout, "maximum duration to wait for --wait-for-hash (0 disables timeout)") cmd.Flags().BoolVarP(&addModelVerbose, "verbose", "v", false, "include upload details in wait-for-hash output") - cmd.Flags().BoolVar(&addModelDeleteAfterUpload, "delete-my-model-files-after-upload", false, "delete the uploaded --model-path files once the model version hash is confirmed (requires --wait-for-hash)") + cmd.Flags().BoolVar(&addModelDeleteAfterUpload, "delete-my-model-files-after-upload", false, "delete the uploaded --model-path files once the model version is confirmed deployable (requires --wait-for-hash)") } func isHuggingFaceMirror() bool { @@ -408,7 +430,7 @@ func validateAddModelFlags() error { return fmt.Errorf("--delete-my-model-files-after-upload requires --model-path") } if !addModelWaitForHash { - return fmt.Errorf("--delete-my-model-files-after-upload requires --wait-for-hash: files are only deleted once the model version hash is confirmed server-side") + return fmt.Errorf("--delete-my-model-files-after-upload requires --wait-for-hash: files are only deleted once the model version is confirmed deployable server-side") } } @@ -496,9 +518,9 @@ func totalModelFileSize(files []modelFile) int64 { // deleteVerifiedModelFiles removes the local --model-path files backing // --delete-my-model-files-after-upload. Callers must only invoke this after // every file in `files` has both (a) completed its multipart upload -// (uploadModelFiles returned without error) and (b) had its model version -// hash confirmed server-side (waitForUploadedModelHash returned without -// error) — this function does not itself re-check either condition. It never +// (uploadModelFiles returned without error) and (b) been confirmed deployable +// server-side (waitForUploadedModelHash returned without error). This +// function does not itself re-check either condition. It never // deletes anything else in --model-path: only the exact absolute paths that // were part of this run's verified upload, never a directory-wide wipe. func deleteVerifiedModelFiles(files []modelFile) (deletedCount int, deletedBytes int64, err error) { @@ -572,12 +594,13 @@ func waitForUploadedModelHash(ctx context.Context, owner, name string, uploadedM return nil, fmt.Errorf("model version uuid is required to wait for hashing") } - fmt.Fprint(os.Stderr, "waiting for model to be hashed") + fmt.Fprint(os.Stderr, "waiting for model to be deployable") defer fmt.Fprintln(os.Stderr) + lastStatus := "" for { if err := ctx.Err(); err != nil { - return nil, internalapi.NewTimeoutError("upload completed but timed out waiting for the model hash; the model exists, do not re-upload: %v", err) + return nil, modelVersionWaitTimeoutError(name, lastStatus, err) } models, err := getModelsForAdd(&api.GetModelsInput{Name: name}) @@ -586,8 +609,16 @@ func waitForUploadedModelHash(ctx context.Context, owner, name string, uploadedM } model := findUploadedModel(models, owner, name, uploadedModel) - hash := uploadedModelVersionHash(model, modelVersionUUID) - if hash != "" { + state := uploadedModelVersionState(model, modelVersionUUID) + if state.status != "" { + lastStatus = state.status + } + + if state.terminal { + return nil, modelVersionTerminalError(name, state.status) + } + + if state.hash != "" { ownerID := modelOwnerForURL(owner, uploadedModel, model) if ownerID == "" { return nil, fmt.Errorf("model owner is required to build model url") @@ -597,40 +628,134 @@ func waitForUploadedModelHash(ctx context.Context, owner, name string, uploadedM return nil, fmt.Errorf("model name is required to build model url") } - modelURL := formatModelURL(ownerID, modelName, hash) + modelURL := formatModelURL(ownerID, modelName, state.hash) return &modelReadyOutput{ Owner: ownerID, Name: modelName, - ModelHash: hash, + ModelHash: state.hash, ModelURL: modelURL, }, nil } fmt.Fprint(os.Stderr, ".") if err := sleepModelHashPoll(ctx, pollInterval); err != nil { - return nil, internalapi.NewTimeoutError("upload completed but timed out waiting for the model hash; the model exists, do not re-upload: %v", err) + return nil, modelVersionWaitTimeoutError(name, lastStatus, err) } } } -func uploadedModelVersionHash(model *api.Model, modelVersionUUID string) string { +// modelVersionWaitTimeoutError reports a --wait-for-hash budget that ran out +// with the version still being processed server-side. It names the last status +// seen and the command to poll with, because the upload itself succeeded and a +// re-upload would create a second version of the same bytes. +func modelVersionWaitTimeoutError(name, lastStatus string, cause error) error { + if lastStatus == "" { + lastStatus = "unknown" + } + return internalapi.NewTimeoutError( + "upload completed but timed out waiting for the model version to become deployable (last version status: %s); the model exists, do not re-upload, poll it with: runpodctl model list --name %s: %v", + strings.ToLower(lastStatus), name, cause, + ) +} + +// modelVersionTerminalError reports a version that will never become +// deployable, so the wait ends immediately instead of burning the whole +// --hash-timeout budget and reporting `timeout` (which tells an agent the work +// is still running). Coded `conflict`, matching the pod wait's treatment of a +// terminal status: nothing the caller typed was wrong, the version is in a +// state no amount of waiting fixes. +func modelVersionTerminalError(name, status string) error { + return &internalapi.APIError{ + Message: fmt.Sprintf( + "model version for %s is %s, so it will never become deployable; the uploaded bytes are not usable, re-run the upload", + name, strings.ToLower(status), + ), + Code: "conflict", + } +} + +// modelVersionState is what a single poll of the uploaded version could tell +// us. A zero value means "keep waiting": not found yet, or found and still +// being processed. +type modelVersionState struct { + // status is the version status the poll saw, "" when the version is not + // listed yet. Reported in the timeout message so a caller can tell "still + // hashing" from "stuck". + status string + // hash is the deployable version hash, set only once the version is + // deployable. Never a placeholder. + hash string + // terminal marks a version that will never become deployable. + terminal bool +} + +// uploadedModelVersionState reads the readiness of the version this upload +// created. A nonempty hash alone does not mean ready: the api assigns a +// `ph-`-prefixed placeholder hash at creation, while the version is still +// NEEDS_HASH and would be rejected at deploy time. +// +// The version's own status is not the whole answer either. When the hashed +// bytes collide with an existing version, the api deprecates this uuid and +// points it at the canonical version that already holds the content, so a +// successful upload's uuid stays DEPRECATED with its placeholder hash forever. +// That pointer is the deployable result, not a failure. +func uploadedModelVersionState(model *api.Model, modelVersionUUID string) modelVersionState { if model == nil { - return "" + return modelVersionState{} } modelVersionUUID = strings.TrimSpace(modelVersionUUID) if modelVersionUUID == "" { - return "" + return modelVersionState{} } + for _, version := range model.Versions { if version == nil || strings.TrimSpace(version.UUID) != modelVersionUUID { continue } - if hash := strings.TrimSpace(version.Hash); hash != "" { - return hash + + status := strings.ToUpper(strings.TrimSpace(version.Status)) + if canonicalHash := dedupedCanonicalVersionHash(version); canonicalHash != "" { + return modelVersionState{status: status, hash: canonicalHash} + } + if terminalModelVersionStatuses[status] { + return modelVersionState{status: status, terminal: true} + } + if !deployableModelVersionStatuses[status] { + return modelVersionState{status: status} } + + hash := strings.TrimSpace(version.Hash) + if hash == "" || isPlaceholderModelVersionHash(hash) { + return modelVersionState{status: status} + } + return modelVersionState{status: status, hash: hash} + } + + return modelVersionState{} +} + +func isPlaceholderModelVersionHash(hash string) bool { + return strings.HasPrefix(strings.TrimSpace(hash), placeholderModelVersionHashPrefix) +} + +// dedupedCanonicalVersionHash returns the hash of the canonical version this +// one was deduped into, or "" when it was not deduped. +func dedupedCanonicalVersionHash(version *api.ModelVersion) string { + if version == nil { return "" } - return "" + deduped, ok := version.Metadata[dedupedCanonicalVersionMetadataKey].(map[string]interface{}) + if !ok { + return "" + } + hash, ok := deduped["hash"].(string) + if !ok { + return "" + } + if hash = strings.TrimSpace(hash); hash == "" || isPlaceholderModelVersionHash(hash) { + return "" + } + return hash } func waitModelHashPoll(ctx context.Context, duration time.Duration) error { diff --git a/cmd/model/addModelToRepo_timeout_test.go b/cmd/model/addModelToRepo_timeout_test.go index b760157a..41f0f5a5 100644 --- a/cmd/model/addModelToRepo_timeout_test.go +++ b/cmd/model/addModelToRepo_timeout_test.go @@ -166,7 +166,7 @@ func TestRunAddModelPathWaitForHashPrintsCompactOutput(t *testing.T) { Owner: "user-id", Name: "test-model", Provider: "LOCAL", - Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: "hash-123"}}, + Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: "hash-123", Status: api.ModelVersionStatusPodReady}}, }}, nil } @@ -252,7 +252,7 @@ func TestRunAddModelPathWaitForHashVerbosePrintsFullOutput(t *testing.T) { Owner: "user-id", Name: "test-model", Provider: "LOCAL", - Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: "hash-123"}}, + Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: "hash-123", Status: api.ModelVersionStatusPodReady}}, }}, nil } @@ -714,12 +714,14 @@ func TestWaitForUploadedModelHashPollsUntilHash(t *testing.T) { t.Fatalf("expected model lookup by name test-model, got %#v", input) } if calls == 1 { + // the api assigns a placeholder hash the moment the version exists, so + // a nonempty hash on a NEEDS_HASH version must not end the wait. return []*api.Model{ { ID: "model-id", Owner: "user-id", Name: "test-model", - Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: ""}, {UUID: "old-version", Hash: "old-hash"}}, + Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: "ph-0123456789abcdef", Status: api.ModelVersionStatusNeedsHash}, {UUID: "old-version", Hash: "old-hash"}}, }, }, nil } @@ -728,7 +730,7 @@ func TestWaitForUploadedModelHashPollsUntilHash(t *testing.T) { ID: "model-id", Owner: "user-id", Name: "test-model", - Versions: []*api.ModelVersion{{UUID: "old-version", Hash: "old-hash"}, {UUID: "version-uuid", Hash: "hash-123"}}, + Versions: []*api.ModelVersion{{UUID: "old-version", Hash: "old-hash"}, {UUID: "version-uuid", Hash: "hash-123", Status: api.ModelVersionStatusPodReady}}, }, }, nil } @@ -751,7 +753,7 @@ func TestWaitForUploadedModelHashPollsUntilHash(t *testing.T) { if stdout != "" { t.Fatalf("stdout must remain empty, got %q", stdout) } - if stderr != "waiting for model to be hashed.\n" { + if stderr != "waiting for model to be deployable.\n" { t.Fatalf("expected wait progress on stderr, got %q", stderr) } if calls != 2 { @@ -790,21 +792,31 @@ func TestWaitForUploadedModelHashTimesOut(t *testing.T) { ID: "model-id", Owner: "user-id", Name: "test-model", - Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: ""}}, + Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: "ph-0123456789abcdef", Status: api.ModelVersionStatusNeedsHash}}, }}, nil } sleepModelHashPoll = waitModelHashPoll - ctx, cancel := context.WithTimeout(context.Background(), time.Nanosecond) + // long enough for one poll to observe the status, short enough that the + // hour-long poll interval below is what the deadline interrupts. + ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond) defer cancel() _, err := waitForUploadedModelHash(ctx, "user-id", "test-model", &api.Model{ID: "model-id"}, "version-uuid", time.Hour) if err == nil { t.Fatal("expected timeout error") } - if !strings.Contains(err.Error(), "timed out waiting for the model hash") { + if !strings.Contains(err.Error(), "timed out waiting for the model version to become deployable") { t.Fatalf("expected timeout error, got %v", err) } + // which of the two "not deployable yet" cases this was decides the operator's + // next move, and the status is the only thing that separates them. + if !strings.Contains(err.Error(), "last version status: needs_hash") { + t.Errorf("timeout error should name the last version status seen, got %v", err) + } + if !strings.Contains(err.Error(), "runpodctl model list --name test-model") { + t.Errorf("timeout error should name the command to poll with, got %v", err) + } // the upload already succeeded at this point, so the message must tell an // agent not to re-upload, and the sink must NOT tag it network_error (which // means "transient, retry"). @@ -844,24 +856,203 @@ func TestWaitForUploadedModelHashRequiresModelVersionUUID(t *testing.T) { } } -func TestUploadedModelVersionHashRequiresMatchingVersionUUID(t *testing.T) { +func TestUploadedModelVersionStateRequiresMatchingVersionUUID(t *testing.T) { model := &api.Model{Versions: []*api.ModelVersion{ - {UUID: "old-version", Hash: "old-hash"}, - {UUID: "version-uuid", Hash: ""}, - {UUID: "newer-version", Hash: "newer-hash"}, + {UUID: "old-version", Hash: "old-hash", Status: api.ModelVersionStatusPodReady}, + {UUID: "version-uuid", Hash: "ph-0123456789abcdef", Status: api.ModelVersionStatusNeedsHash}, + {UUID: "newer-version", Hash: "newer-hash", Status: api.ModelVersionStatusPodReady}, }} - if got := uploadedModelVersionHash(model, ""); got != "" { - t.Fatalf("expected no fallback hash without model version uuid, got %q", got) + if got := uploadedModelVersionState(model, ""); got.hash != "" { + t.Fatalf("expected no fallback hash without model version uuid, got %q", got.hash) } - if got := uploadedModelVersionHash(model, "version-uuid"); got != "" { - t.Fatalf("expected no hash for pending uploaded version, got %q", got) + if got := uploadedModelVersionState(model, "version-uuid"); got.hash != "" { + t.Fatalf("expected no hash for pending uploaded version, got %q", got.hash) } model.Versions[1].Hash = "hash-123" - if got := uploadedModelVersionHash(model, "version-uuid"); got != "hash-123" { - t.Fatalf("expected uploaded version hash, got %q", got) + model.Versions[1].Status = api.ModelVersionStatusPodReady + if got := uploadedModelVersionState(model, "version-uuid"); got.hash != "hash-123" { + t.Fatalf("expected uploaded version hash, got %q", got.hash) + } +} + +func TestUploadedModelVersionStateReadiness(t *testing.T) { + tests := []struct { + name string + version *api.ModelVersion + wantHash string + wantTerminal bool + }{ + { + name: "placeholder hash while needs_hash is not deployable", + version: &api.ModelVersion{UUID: "version-uuid", Hash: "ph-0123456789abcdef", Status: api.ModelVersionStatusNeedsHash}, + }, + { + name: "real hash while needs_hash is not deployable", + version: &api.ModelVersion{UUID: "version-uuid", Hash: "hash-123", Status: api.ModelVersionStatusNeedsHash}, + }, + { + name: "placeholder hash on a deployable status is not deployable", + version: &api.ModelVersion{UUID: "version-uuid", Hash: "ph-0123456789abcdef", Status: api.ModelVersionStatusPodReady}, + }, + { + name: "validating is not deployable, and not terminal either", + version: &api.ModelVersion{UUID: "version-uuid", Hash: "hash-123", Status: "VALIDATING"}, + }, + { + name: "pod_ready with a real hash is deployable", + version: &api.ModelVersion{UUID: "version-uuid", Hash: "hash-123", Status: api.ModelVersionStatusPodReady}, + wantHash: "hash-123", + }, + { + name: "ready with a real hash is deployable", + version: &api.ModelVersion{UUID: "version-uuid", Hash: "hash-123", Status: api.ModelVersionStatusReady}, + wantHash: "hash-123", + }, + { + name: "failed is terminal", + version: &api.ModelVersion{UUID: "version-uuid", Hash: "ph-0123456789abcdef", Status: api.ModelVersionStatusFailed}, + wantTerminal: true, + }, + { + name: "deprecated without a canonical pointer is terminal", + version: &api.ModelVersion{UUID: "version-uuid", Hash: "hash-123", Status: api.ModelVersionStatusDeprecated}, + wantTerminal: true, + }, + { + // the api dedupes an upload whose content already exists: this uuid is + // deprecated and keeps its placeholder hash forever, and the canonical + // version it names is the deployable result. Failing here would fail a + // successful upload. + name: "deprecated with a canonical pointer resolves to the canonical hash", + version: &api.ModelVersion{ + UUID: "version-uuid", + Hash: "ph-0123456789abcdef", + Status: api.ModelVersionStatusDeprecated, + Metadata: map[string]interface{}{ + "dedupedToCanonicalVersion": map[string]interface{}{ + "uuid": "canonical-uuid", + "hash": "canonical-hash", + }, + }, + }, + wantHash: "canonical-hash", + }, + { + name: "canonical pointer with no usable hash is still terminal", + version: &api.ModelVersion{ + UUID: "version-uuid", + Hash: "ph-0123456789abcdef", + Status: api.ModelVersionStatusDeprecated, + Metadata: map[string]interface{}{ + "dedupedToCanonicalVersion": map[string]interface{}{"uuid": "canonical-uuid"}, + }, + }, + wantTerminal: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := uploadedModelVersionState(&api.Model{Versions: []*api.ModelVersion{tt.version}}, "version-uuid") + if got.hash != tt.wantHash { + t.Errorf("hash = %q, want %q", got.hash, tt.wantHash) + } + if got.terminal != tt.wantTerminal { + t.Errorf("terminal = %v, want %v", got.terminal, tt.wantTerminal) + } + if got.status != strings.ToUpper(tt.version.Status) { + t.Errorf("status = %q, want %q", got.status, strings.ToUpper(tt.version.Status)) + } + }) + } +} + +func TestWaitForUploadedModelHashStopsOnTerminalVersionStatus(t *testing.T) { + oldGetModelsForAdd := getModelsForAdd + oldSleepModelHashPoll := sleepModelHashPoll + t.Cleanup(func() { + getModelsForAdd = oldGetModelsForAdd + sleepModelHashPoll = oldSleepModelHashPoll + }) + + getModelsForAdd = func(input *api.GetModelsInput) ([]*api.Model, error) { + return []*api.Model{{ + ID: "model-id", + Owner: "user-id", + Name: "test-model", + Versions: []*api.ModelVersion{{UUID: "version-uuid", Hash: "ph-0123456789abcdef", Status: api.ModelVersionStatusFailed}}, + }}, nil + } + sleepModelHashPoll = func(ctx context.Context, duration time.Duration) error { + t.Fatal("a version that failed server-side must not be polled again") + return nil + } + + var err error + stdout, _ := captureStdStreams(t, func() { + _, err = waitForUploadedModelHash(context.Background(), "user-id", "test-model", &api.Model{ID: "model-id"}, "version-uuid", time.Hour) + }) + + if stdout != "" { + t.Fatalf("stdout must remain empty, got %q", stdout) + } + if err == nil { + t.Fatal("expected an error for a failed model version") + } + if !strings.Contains(err.Error(), "will never become deployable") { + t.Errorf("error should say waiting is pointless, got %v", err) + } + // not `timeout`: that code means the work is still running server-side and + // tells an agent to poll rather than re-upload. Here re-uploading is the fix. + var apiErr *internalapi.APIError + if !errors.As(err, &apiErr) { + t.Fatalf("expected an *internalapi.APIError, got %T: %v", err, err) + } + if apiErr.ErrorCode() != "conflict" { + t.Errorf("code = %q, want conflict", apiErr.ErrorCode()) + } +} + +func TestWaitForUploadedModelHashResolvesDedupedVersion(t *testing.T) { + oldGetModelsForAdd := getModelsForAdd + t.Cleanup(func() { getModelsForAdd = oldGetModelsForAdd }) + + getModelsForAdd = func(input *api.GetModelsInput) ([]*api.Model, error) { + return []*api.Model{{ + ID: "model-id", + Owner: "user-id", + Name: "test-model", + Versions: []*api.ModelVersion{{ + UUID: "version-uuid", + Hash: "ph-0123456789abcdef", + Status: api.ModelVersionStatusDeprecated, + Metadata: map[string]interface{}{ + "dedupedToCanonicalVersion": map[string]interface{}{ + "uuid": "canonical-uuid", + "hash": "canonical-hash", + }, + }, + }}, + }}, nil + } + + var ready *modelReadyOutput + captureStdStreams(t, func() { + var err error + ready, err = waitForUploadedModelHash(context.Background(), "user-id", "test-model", &api.Model{ID: "model-id"}, "version-uuid", time.Hour) + if err != nil { + t.Fatalf("waitForUploadedModelHash returned error: %v", err) + } + }) + + if ready.ModelHash != "canonical-hash" { + t.Fatalf("hash = %q, want the canonical version hash", ready.ModelHash) + } + if !strings.HasSuffix(ready.ModelURL, ":canonical-hash") { + t.Fatalf("model url must name the canonical hash, got %q", ready.ModelURL) } } diff --git a/docs/runpodctl_model_add.md b/docs/runpodctl_model_add.md index e14cda61..15b39fff 100644 --- a/docs/runpodctl_model_add.md +++ b/docs/runpodctl_model_add.md @@ -27,7 +27,7 @@ runpodctl model add [flags] --create-upload create an upload session --credential-reference string credential reference (if required) --credential-type string credential type (if required) - --delete-my-model-files-after-upload delete the uploaded --model-path files once the model version hash is confirmed (requires --wait-for-hash) + --delete-my-model-files-after-upload delete the uploaded --model-path files once the model version is confirmed deployable (requires --wait-for-hash) --file-name string file name for upload --file-size string file size in bytes --hash-timeout duration maximum duration to wait for --wait-for-hash (0 disables timeout) (default 30m0s) @@ -40,7 +40,7 @@ runpodctl model add [flags] --owner string model owner namespace (user or team owner id) --part-size string multipart upload part size in bytes -v, --verbose include upload details in wait-for-hash output - --wait-for-hash wait for completed model-path uploads to be hashed + --wait-for-hash wait for completed model-path uploads to become deployable ``` ### Options inherited from parent commands diff --git a/go.mod b/go.mod index 91173922..e6168750 100644 --- a/go.mod +++ b/go.mod @@ -18,10 +18,10 @@ require ( github.com/schollz/progressbar/v3 v3.14.3 github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.19.0 - golang.org/x/crypto v0.53.0 + golang.org/x/crypto v0.56.0 golang.org/x/crypto/x509roots/fallback v0.0.0-20260213171211-a408498e5541 - golang.org/x/mod v0.37.0 - golang.org/x/term v0.44.0 + golang.org/x/mod v0.38.0 + golang.org/x/term v0.45.0 golang.org/x/time v0.5.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -57,8 +57,8 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/net v0.55.0 // indirect - golang.org/x/sys v0.46.0 // indirect - golang.org/x/text v0.38.0 // indirect + golang.org/x/net v0.57.0 // indirect + golang.org/x/sys v0.47.0 // indirect + golang.org/x/text v0.41.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect ) diff --git a/go.sum b/go.sum index fb4637d7..c6ba6b98 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,6 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -140,24 +138,16 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= -golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= -golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI= -golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q= -golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= -golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= +golang.org/x/crypto v0.56.0 h1:GUh5Ii4J5jtcseSMiRqr1jXCNHoxjeV9Fmekc2oLy6Y= +golang.org/x/crypto v0.56.0/go.mod h1:OMW5y6CY9l38uPLmxU6l6pwcXp1obtLo3e6gT7gQR2I= golang.org/x/crypto/x509roots/fallback v0.0.0-20260213171211-a408498e5541 h1:FmKxj9ocLKn45jiR2jQMwCVhDvaK7fKQFzfuT9GvyK8= golang.org/x/crypto/x509roots/fallback v0.0.0-20260213171211-a408498e5541/go.mod h1:+UoQFNBq2p2wO+Q6ddVtYc25GZ6VNdOMyyrd4nrqrKs= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= -golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= -golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ= -golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0= +golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk= +golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -165,12 +155,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= -golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= -golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= -golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= -golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= -golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= +golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE= +golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -187,24 +173,16 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= -golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= -golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= +golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= -golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= -golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY= -golang.org/x/term v0.42.0/go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY= -golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc= -golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y= +golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0= +golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -212,12 +190,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= -golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= -golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= -golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= -golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= +golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= +golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=