Implement cleanup of temporary files after execution - #62
Conversation
…helmfile_release_set to NewCommandWithKubeconfig of helmfile_release_set. This is a function that actually executes helmfile binary.
7182039 to
34dba79
Compare
…t used temporarty helmfile path. Handle tmpHelmfilPath removal in all places where `NewCommandWithKubeconfig` executed. Unify path for temporart helmfile and other tmp provider resources.
… cause it causes issue that dir not exist. Making provider delete tmp directory after run
|
@mumoshu PR is ready for review. |
|
@mumoshu PR is ready for review. Each change and it's reason described in commit messages |
|
Any chance to get it merged? |
| // panic: interface conversion: interface {} is nil, not string | ||
| if path := d.Get(KeyPath); path != nil { | ||
| f.Path = path.(string) | ||
| } |
There was a problem hiding this comment.
I'm going to merge this and make necessary changes(if any) later but one thing to ask here- What was the rationale behind removing this feature (specifying an existing path) in this pull request?
There was a problem hiding this comment.
@mumoshu When I started finding root cause of persisting tmp files, i found that there's two separate pieces of code creating tmp files for releases:
- Creation of helmfile for standalone helm release
- Copying existing helmfile before apply
This cases had completely different places where tmp files were created, so I refactored both cases to pass helmfile content same way and make same tmp file creation code for them.
When I sent this PR I tested that both terraform resources works fine with this PR, so my idea was unification of tmp file creation without breaking how terraform resources works
Implement cleanup of temporary helmfiles after execution
/fix #59