Skip to content

Not providing a chart version fails to download latest from OCI repos #1047

Description

@kaldvelski

Operating system

Windows 10

Helmfile Version

0.157

Helm Version

3.9.4

Bug description

I don't provide an explicit version for a chart release then a value of "latest" is passed to the helm pull command. Put for my OCI registry this is failing with "Error: Improper constraint: latest". I can replicate this issue running the helm pull directly.

This appears to be because "latest" is not a valid Semver value (helm/helm#10670).

If you omit the --version parameter to helm pull then it automatically downloads the latest version.

Example helmfile.yaml

releases:

  • name: ocirepo/mychart

Error message you've seen (if any)

Pulling europe-west2-docker.pkg.dev/helm/orchestrator-service:latest
in ./15_ms-platform-helmfile.yaml: [release "orchestrator-service": command "c:\\Dev\\Programs\\helm-3.9\\helm.exe" exited with non-zero status:
  c:\Dev\Programs\helm-3.9\helm.exe

ARGS:
  0: helm (4 bytes)
  1: pull (4 bytes)
  2: oci://europe-west2-docker.pkg.dev/helm/orchestrator-service (75 bytes)
  3: --version (9 bytes)
  4: latest (6 bytes)
  5: --destination (13 bytes)
  6: C:\Users\craigb\AppData\Local\Temp\helmfile575716312\docgen-develop\orchestrator-service\orchestrator-service\latest (116 bytes)
  7: --untar (7 bytes)

ERROR:
  exit status 1

EXIT STATUS
  1

STDERR:
  Error: improper constraint: latest`

Steps to reproduce

Run any build/template command on a release that has no version.

Working Helmfile Version

0.157.0

Relevant discussion

helm/helm#10670

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions