-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(helm-requirements): remove the need for a Chart.yaml file #7544
fix(helm-requirements): remove the need for a Chart.yaml file #7544
Conversation
e65b50c
to
7aa8d54
Compare
Hi, this needs discussion and agreement in an issue first. |
Makes sense, I assumed since it's a backwards compatible change we could skip the discussion process, but I was mistaken, my apologies. Here's the issue #7547 |
7aa8d54
to
628b5bb
Compare
Let's add some hardening around this part:
e.g. we should check that each dep contains both a |
ebf1829
to
42401ef
Compare
Hi @rarkins, I may have gone little overboard with the validations. Let me know what you think. PS: |
Hi @rarkins, any news on this? Unfortunately, the regex approach suggested by #7547 (comment) didn't work as well we would like (it requires a certain order which we guarantee). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's quite hard to evaluate this and be confident when there's so many changes. Is it possible to divide this into multiple PRs to merge one by one?
- Add or change tests only with existing implementation passing.
- Refactor existing implementation, leave tests unchanged.
- Change implementation, add a few tests
The idea is to move as much of the changes as possible to refactoring PRs, where either (a) only tests change, or (b) only implementation changes. Then it's much easier to validate from inspection.
const content = ` | ||
dependencies: | ||
- name: redis | ||
version: 0.9.0 | ||
repository: https://kubernetes-charts.storage.googleapis.com/ | ||
- name: postgresql | ||
version: 0.8.1 | ||
repository: file:///some/local/path/ | ||
repository: https://kubernetes-charts.storage.googleapis.com/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this test changed?
42401ef
to
d0e62fe
Compare
Makes total sense. To be fair, my required changes are very simple: just remove a validation. I think we can break into 2 steps: What do you think? |
Is there any reason not to add the hardening first? |
It's just that deleting code is easier than adding! I started the change in a branch. I have few questions though: 1 - What to do when there's semantic versioning prefix (~^). Should we ignore them or skip altogether? 2 - There can be multiple reasons to skip a dependency (missing name, version, and repository). Is there a way to return all of them? If not, should we pick an order? Which one? 3 - Should we test for a specific skipReason, or just for its presence? 4 - What's the stance on snapshot testing? I see them being used in multiple places, but it seems bit easy to overlook mistakes (I know I did). |
Yes, but my concern is that if we merge this first then we are "unhardened" and lead or warnings/errors unncecessarily.
If we don't support ranges like that yet then we need to add a skipReason
Yes, sounds fine
Sure, skipReason should be deterministic in such cases (based on the order above)
It's certainly a trade-off to use snapshots. If you have the time to write them with literals it's much better because it's harder for someone in future to break them and everyone misses it (especially as diffs an be hard to read). |
Got It -> #8227
Upon some quick investigation, it seems
|
@eh-am if you resolve conflicts and mark as ready for review then we can take a look again |
🎉 This PR is included in version 24.42.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Remove the need for the presence of a
Chart.yaml
file.More context:
Mine is a bit of a special case. I have a custom format on top of helm, that just has a
requirements.yaml
file. I verified renovate works fine against it by commiting a dummyChart.yaml
. By looking at the code it seems that that file's contents don't make a difference, so I believe we could just remove its need from the codebase.Closes #7547