Skip to content

Commit e0d4ced

Browse files
Use 'latest' tag as default for ModelKit references (#935)
* latest tag Signed-off-by: mohammed <[email protected]> * fix filed test Signed-off-by: mohammed <[email protected]> --------- Signed-off-by: mohammed <[email protected]>
1 parent 20ea73c commit e0d4ced

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/lib/repo/util/reference.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ func ParseReference(refString string) (reference *registry.Reference, extraTags
104104
ref = unprocessed[index+1:]
105105
} else {
106106
// No tag or digest
107+
ref = "latest"
107108
repo = unprocessed
108109
}
109110

pkg/lib/repo/util/reference_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ func TestParseReference(t *testing.T) {
6666
},
6767
{
6868
input: "a/b/c/d",
69-
expectedRef: reference("localhost", "a/b/c/d", ""),
69+
expectedRef: reference("localhost", "a/b/c/d", "latest"),
7070
expectedTags: []string{},
7171
},
7272
{
7373
input: "test.io/a/b/c/d",
74-
expectedRef: reference("test.io", "a/b/c/d", ""),
74+
expectedRef: reference("test.io", "a/b/c/d", "latest"),
7575
expectedTags: []string{},
7676
},
7777
{

0 commit comments

Comments
 (0)