Skip to content

Commit 5ea18ac

Browse files
authored
fix: Remove unnecessary hash for Model Repo uploads and bump Go version (#230)
1 parent 0eac229 commit 5ea18ac

5 files changed

Lines changed: 4 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v4
8-
- name: Setup Go 1.24
8+
- name: Setup Go 1.25.7
99
uses: actions/setup-go@v5
1010
with:
11-
go-version: 1.24
11+
go-version: 1.25.7
1212
# You can test your matrix by printing the current Go version
1313
- name: Display Go version
1414
run: go version

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Set up Go
2626
uses: actions/setup-go@v5
2727
with:
28-
go-version: "1.24.x"
28+
go-version: "1.25.7"
2929

3030
- name: Run GoReleaser
3131
uses: goreleaser/goreleaser-action@v6

api/model.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ type CreateModelRepoUploadInput struct {
201201
Name string `json:"name,omitempty"`
202202
FileName string `json:"fileName"`
203203
FileSizeBytes string `json:"fileSizeBytes"`
204-
ModelVersionHash string `json:"modelVersionHash,omitempty"`
205204
PartSizeBytes string `json:"partSizeBytes,omitempty"`
206205
ContentType string `json:"contentType,omitempty"`
207206
Metadata map[string]interface{} `json:"metadata,omitempty"`
@@ -648,7 +647,6 @@ func CreateModelRepoUpload(input *CreateModelRepoUploadInput) (*ModelRepoMutatio
648647
addString("contentType", input.ContentType)
649648
addString("credentialType", input.CredentialType)
650649
addString("credentialReference", input.CredentialReference)
651-
addString("modelVersionHash", input.ModelVersionHash)
652650

653651
if len(input.Metadata) > 0 {
654652
payload["metadata"] = input.Metadata

cmd/model/addModelToRepo.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,10 @@ func collectModelFiles(dir string) ([]modelFile, error) {
258258
}
259259

260260
func uploadModelFiles(files []modelFile, baseInput *api.CreateModelRepoUploadInput) error {
261-
var modelVersionHash string
262-
263261
for _, file := range files {
264262
input := *baseInput
265263
input.FileName = file.RelativePath
266264
input.FileSizeBytes = strconv.FormatInt(file.Size, 10)
267-
if modelVersionHash != "" {
268-
input.ModelVersionHash = modelVersionHash
269-
}
270265

271266
result, err := api.CreateModelRepoUpload(&input)
272267
if err != nil {
@@ -275,12 +270,6 @@ func uploadModelFiles(files []modelFile, baseInput *api.CreateModelRepoUploadInp
275270
if result.Upload == nil {
276271
return fmt.Errorf("upload response missing upload session details for %s", file.RelativePath)
277272
}
278-
if modelVersionHash == "" {
279-
if result.Version == nil || result.Version.Hash == "" {
280-
return fmt.Errorf("upload response missing model version hash for %s", file.RelativePath)
281-
}
282-
modelVersionHash = result.Version.Hash
283-
}
284273

285274
if err = completeModelUpload(result.Upload, file.AbsolutePath); err != nil {
286275
return fmt.Errorf("upload %s: %w", file.RelativePath, err)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/runpod/runpodctl
22

3-
go 1.24
3+
go 1.25.7
44

55
require (
66
github.com/denisbrodbeck/machineid v1.0.1

0 commit comments

Comments
 (0)