Skip to content

Make version optional for local chart dependencies - #10096

Closed
felipecrs wants to merge 8 commits into
helm:mainfrom
felipecrs:optional-version
Closed

felipecrs wants to merge 8 commits into
helm:mainfrom
felipecrs:optional-version

Conversation

@felipecrs

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Fixes #10095

Special notes for your reviewer:

References https://github.com/helm/helm-www/pull/1183/files
References SchemaStore/schemastore#1815
References SchemaStore/schemastore#1816

If applicable:

  • this PR contains documentation
    The --help text was updated to reflect that version is optional for local charts. Also, the referenced PR changes the same in the website.
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility
    Everything should remain functional, this only prevents an uneeded failure. The fact that none of the unit tests were touched is already a good signal of that.

@helm-bot helm-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 3, 2021
Comment thread internal/resolver/resolver.go Resolved
Comment thread internal/resolver/resolver.go Resolved
Comment thread internal/resolver/resolver.go Resolved
Comment thread internal/resolver/resolver.go Resolved
@crabique

Copy link
Copy Markdown

Are there any blockers to get this merged? This is a really silly problem and the PR has been cooking for years now.

@felipecrs

Copy link
Copy Markdown
Contributor Author

@crabique, I rebased it. It's ready again for review.

@felipecrs
felipecrs requested a review from yxxhero February 17, 2025 16:50
@gjenkins8 gjenkins8 added the docs needed Indicates that a PR includes changes that need to be documented. Should not block a PR being merged label Feb 22, 2025

@gjenkins8 gjenkins8 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a behavioral difference I think. And overall (it is hard to quantify), it feels like this change is significantly increasing the complexity of the logic here. Reducing the complexity would be preferred :)

Comment thread cmd/helm/dependency.go Resolved
Comment thread internal/resolver/resolver.go Resolved
Comment thread internal/resolver/resolver.go Resolved
Comment thread internal/resolver/resolver.go Resolved
Comment thread internal/resolver/resolver.go Resolved
Comment thread internal/resolver/resolver.go Outdated
Comment on lines +74 to +75
if d.Repository == "" || strings.HasPrefix(d.Repository, "file://") {
if d.Repository == "" {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this conditional IMHO has made the code more complex. The empty repository and file:// loading logic has been combined into a single branch. With the intent of utilizing the same version processing logic.

But... (while this sounds like a good thing) the subtle differences in these code paths is leading to lots of conditional checks. It would be great to find a way to simplify the conditional logic here I think.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, but I don't think it's as bad as it sounds. We know that in real life helm will never have to iterate on these conditions long enough to make a difference in performance. It's not like there will be a chart with thousands of dependencies (which is probably still a low number of iterations).

Nevertheless, I'm still thinking about it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gjenkins8 I guess I became dumber over time. I had to ask Claude Sonnet 4 to help me.

But I reviewed the outcome, and it looks fine.

Can you please review this again?

@felipecrs

felipecrs commented Feb 24, 2025 •

Copy link
Copy Markdown
Contributor Author

@gjenkins8 thanks a lot for reviewing this PR too.

It has been so much since I wrote this that I'll need to spend some time trying to understand everything I did to address your feedback.

I will probably not be able to finish this before next weekend, thus I will mark it as Draft for now.

@felipecrs
felipecrs marked this pull request as draft February 24, 2025 01:50
@crabique

Copy link
Copy Markdown

@felipecrs hi, do you plan to resume this effort in the foreseeable future?

@felipecrs
felipecrs requested a review from gjenkins8 July 9, 2025 22:01
@felipecrs
felipecrs marked this pull request as ready for review July 9, 2025 22:01
@felipecrs

felipecrs commented Jul 9, 2025 •

Copy link
Copy Markdown
Contributor Author

@felipecrs hi, do you plan to resume this effort in the foreseeable future?

Yes, I just rebased and handled @gjenkins8 comments. Hopefully in a satisfactory manner.

@github-actions

github-actions Bot commented Oct 8, 2025

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 Oct 8, 2025
@felipecrs

Copy link
Copy Markdown
Contributor Author

@gjenkins8 maybe you can have a new look into this?

@github-actions github-actions Bot removed the Stale label Oct 9, 2025
@crabique

Copy link
Copy Markdown

@gjenkins8 @yxxhero please have a look, if released who knows, it may be a good enough reason for people to switch to v4 😄

@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 Apr 17, 2026
@felipecrs

Copy link
Copy Markdown
Contributor Author

Not stale.

@github-actions github-actions Bot removed the Stale label Apr 18, 2026
@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 Jul 17, 2026
@felipecrs

Copy link
Copy Markdown
Contributor Author

Not stale.

@github-actions github-actions Bot removed the Stale label Jul 18, 2026
@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.

@felipecrs

felipecrs commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Sad. :(

I can rebase the PR if someone reopens it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs needed Indicates that a PR includes changes that need to be documented. Should not block a PR being merged size/M Denotes a PR that changes 30-99 lines, ignoring generated files. Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

5 participants