Skip to content

Commit

Permalink
fix: Use latest image tag when version is untagged. Fixes #8188 (#…
Browse files Browse the repository at this point in the history
…8191)

Signed-off-by: Alex Collins <[email protected]>
  • Loading branch information
alexec authored Mar 18, 2022
1 parent 6d6d23d commit e2b2883
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ var (
gitTreeState = "" // determined from `git status --porcelain`. either 'clean' or 'dirty'
)

// ImageTag return the image tag.
// GetVersion().Version adulterates the version making it useless as the image tag.
func ImageTag() string {
if version != "untagged" {
return version
}
return "latest"
}

// GetVersion returns the version information
func GetVersion() wfv1.Version {
var versionStr string
Expand Down
2 changes: 1 addition & 1 deletion workflow/controller/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (wfc *WorkflowController) executorImage() string {
if v := wfc.Config.GetExecutor().Image; v != "" {
return v
}
return fmt.Sprintf("quay.io/argoproj/argoexec:" + argo.GetVersion().Version)
return fmt.Sprintf("quay.io/argoproj/argoexec:" + argo.ImageTag())
}

// executorImagePullPolicy returns the imagePullPolicy to use for the workflow executor
Expand Down

0 comments on commit e2b2883

Please sign in to comment.