Skip to content

helm dependency update complains about lack of version even when repository is not set #10095

Closed

Description

@felipecrs

Let's say I have:

# Chart.yaml
apiVersion: v2
appVersion: "0.1"
description: A Helm chart for Kubernetes
name: chart-b
version: 0.0.1

dependencies:
  - name: chart-a
    condition: chart-a.enabled

And my chart-a is under chart-b/charts/chart-a.

The following happens:

$ cd chart-a
$ helm dependency update
Error: dependency "chart-a" has an invalid version/constraint format: improper constraint:

Nonetheless, if I put the version, the following happens:

$ helm dependency update
Saving 1 charts
Dependency chart-a did not declare a repository. Assuming it exists in the chart directory
Deleting outdated charts

As it is stated in the output, as repository is not set, helm correctly assumes that we are managing the charts/chart-a by ourselves. Thus, it is redundant for checking the presence of version when repository is not set.

It is even a problem because when we bump the version of the chart-a, now it needs to be bumped in chart-b as well, even though the dependency is directly linked on the file system.

Activity

  1. added 2 commits that reference this issue on Sep 3, 2021
    579a56e
    3f7a288
  2. felipecrs commented on Sep 15, 2021

    @felipecrs
    ContributorAuthor

    The workaround for this issue is to write the dependencies like so:

    dependencies:
      - name: chart-a
        condition: chart-a.enabled
        version: ">0.0.0-0"

    So that, no specific version is specified, and helm dep up does not fail.

  3. github-actions commented on Dec 15, 2021

    @github-actions

    This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

  4. felipecrs commented on Dec 16, 2021

    @felipecrs
    ContributorAuthor

    I would appreciate some feedback on this...

  5. github-actions commented on Mar 17, 2022

    @github-actions

    This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

  6. added a commit that references this issue on Feb 16, 2024
    bb66fb3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions