Skip to content

Introduce import-values strategy + revert default strategy for backwards compat - #11162

Closed
Cybermaxke wants to merge 1 commit into
helm:mainfrom
Cybermaxke:fix-import-values
Closed

Cybermaxke wants to merge 1 commit into
helm:mainfrom
Cybermaxke:fix-import-values

Conversation

@Cybermaxke

@Cybermaxke Cybermaxke commented Jul 18, 2022 •

Copy link
Copy Markdown

What this PR does / why we need it:
With the introduction of a bug fix #9940 5d017e1 there was a breaking introduced that makes it no longer possible to import values from a sub-chart that override values that are already defined in the importing chart. This issue is described in #10899

Between the original behavior and the one that "fixed" there are two possible scenarios for a string value:

  1. override: import values from the sub-chart and override everything in the parent chart (old behavior)
  2. ifNotPresent: import values from the sub-chart and only import the value if it's not defined in the chart chart (current behavior since the "fix")

Something else I noticed is that the ifNotPresent behavior was already applied to an import-values entry with child and parent paths before, so it was not consistently implemented even before the "fix". Even though the helm docs mention "override" behavior.

Type Original behavior Since "fix" With PR Docs
string override ifNotPresent override override (not explicitly mentioned, but I assume the same as child + parent path)
child + parent path ifNotPresent ifNotPresent ifNotPresent override

So the aim of this PR is to revert the breaking changes, which should happen at major versions. And additionally introduce a "strategy" to explictly define the behavior (naming can still be discussed). Adding the strategy looks at follows:

# alternative for string with a different strategy
dependencies:
  - name: child
    import-values:
      - key: data
        strategy: override
# child + parent path with a strategy
dependencies:
  - name: child
    import-values:
      - child: default.data
        parent: myimports
        strategy: ifNotPresent

A few todos/questions:

  • does the json spec of Chart.yaml need to updated somewhere? I wasn't able to find it in the repo.
  • if desired for short term, we could just revert to the "fix PR" and you can use child + parent path instead
  • docs will need to be adjusted, unless we want to change the default behavior of child + parent path from ifNotPresent to override to reflect the docs?
  • expand unit tests?

Closes #10899

Special notes for your reviewer:

If applicable:

  • this PR contains documentation
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

@pull-request-size pull-request-size Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 18, 2022
@antaloala

Copy link
Copy Markdown

This PR looks to be waiting for approval for some long time.
Is there anything preventing it to happen? I understand there could be a discussion on the new proposed yamls fields to introduce in the Chart.yaml schema ... but nothing is "happening" around that (?)
We are not able to upgrade Helm from 3.8.1 to any newer release due to the NBC introduced by 3.8.2 on imported-values behavior; it looks we are not the only ones "suffering" this problem.

Asking here in order to understand if not accepting (yet) this PR is only because Helm guys allowed to accept it are overloaded ... or is it because they see some "issues/problems" on accepting it (?).

Thanks in advance.

@joejulian

Copy link
Copy Markdown
Contributor

Yes, the project does need more maintainers. If you're interested, the first step is contributing code.

Come join the developer meeting, if you can: https://github.com/helm/community/blob/main/communication.md#meetings.

Post your interest in becoming a maintainer on the mailing list.

I also recommend familiarizing yourself with the existing hips

Even if you're not interested in becoming a maintainer, the developer meeting is a great place to meet the maintainers and shed light on issues or PRs that need attention.

@gusyag

gusyag commented Nov 4, 2022

Copy link
Copy Markdown

Hello!
Would it be possible to have this PR merged? Is there anything missing?
We cannot use Helm >= 3.8.2 since #10110 was introduced.
Thanks!

@gusyag

gusyag commented Nov 22, 2022

Copy link
Copy Markdown

Hello @joejulian ,
I see you included this in 3.11.0 milestone, does it mean it will be implemented in that release?
Thanks!

@joejulian

Copy link
Copy Markdown
Contributor

I'm just a triage maintainer. No promises 😕.

That's the first opportunity for it to be released. Actual inclusion depends on the core maintainers.

@mattfarina mattfarina modified the milestones: 3.11.0, 3.12.0 Jan 18, 2023
@joejulian joejulian modified the milestones: 3.12.0, 3.13.0 May 5, 2023
@hedayat hedayat mentioned this pull request Jul 2, 2023
3 tasks
@mattfarina mattfarina modified the milestones: 3.13.0, 3.14.0 Sep 25, 2023
@mattfarina mattfarina modified the milestones: 3.14.0, 3.15.0 Mar 13, 2024
@mattfarina mattfarina modified the milestones: 3.15.0, 3.16.0 Jun 12, 2024
@scottrigby scottrigby modified the milestones: 3.16.0, 3.17.0 Sep 11, 2024
@scottrigby scottrigby modified the milestones: 3.17.0, 3.18.0 Jan 15, 2025
@mattfarina mattfarina modified the milestones: 3.18.0, 3.19 May 19, 2025
@github-actions

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the Stale label Aug 25, 2025
@scottrigby scottrigby added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 11, 2025
@scottrigby scottrigby modified the milestones: 3.19.0, 4.1.0 Sep 11, 2025
@scottrigby

Copy link
Copy Markdown
Member

Needs rebase onto main — Helm 3 is not accepting new features.

@github-actions github-actions Bot removed the Stale label Sep 13, 2025
@github-actions

Copy link
Copy Markdown

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

@github-actions github-actions Bot added the Stale label Dec 12, 2025
@github-actions github-actions Bot closed this Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Values in library subcharts are ignored Value files precedence behaviour changes when custom values file is used

6 participants