-
Couldn't load subscription status.
- Fork 22
Helm from GitHub #123
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
Helm from GitHub #123
Conversation
fsutils/afero.go
Outdated
| "github.com/spf13/afero" | ||
| ) | ||
|
|
||
| func SetupTemporaryFiles(fs afero.Fs) (file afero.File, dir string, err error) { |
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.
I think a utils lib like this is useful, but I feel this function is too specific to get any reuse outside of github archive downloads. The resources it creates tar-dir- and tar-file- are pretty specific.
How about moving this to the helm chart package where it's used or renaming it something like SetupTemporaryFilesForGitArchive
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.
So I actually copied them over from solobot and didn’t want to modify or make private here so I could delete them there. Don’t mind leaving them in helm / install utils, but in the solobot case it’s for changelog verification, nothing to do with helm.
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.
On second thought, you're right -- added a better utility and moved these to private helpers. Should be pretty easy to make use of the new function in solobot.
fsutils/afero.go
Outdated
| return "", err | ||
| } | ||
| if len(files) != 1 { | ||
| return "", fmt.Errorf("expected only one folder from archive tar, found (%d)", len(files)) |
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.
similar comment to above, this util has some strong assumptions, consider privatizing it or renaming
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.
fixed
| Context("load from github", func() { | ||
| It("works for a single chart", func() { | ||
| ref := GithubChartRef{ | ||
| Ref: "c00d740c83ec5b5439bf2f58fee110a546af7177", |
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.
good idea locking to a ref, was going to suggest you make some dummy helm resources in this repo's test resources directory. Might still be worth doing so you can test various helm ignore rules.
Though it produces a chicken-and-egg problem, can't test against it till it merges
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.
FWIW the helm ignore rules are designed to be used during packaging, not rendering. So I'm not sure there's a ton of value in adding testing around that. That said, I did take a look at a few of the charts and rendered manifests just to make sure things checked out.
fsutils/afero.go
Outdated
| @@ -0,0 +1,42 @@ | |||
| package fsutils | |||
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.
consider calling this vfsutils as it seems to be oriented towards virtual filesystems
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.
looks good @rickducott, I have some small comments, looks like you might still be iterating, let me know when I should take another look
|
Thanks @mitchdraft, done iterating -- could you take another look? |
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.
looks good
BOT NOTES:
resolves #121
resolves #122