Skip to content
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

envfiles: remove sync call since we don't actually need to flush data… #2417

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

jy19
Copy link
Contributor

@jy19 jy19 commented Mar 31, 2020

… to disk, close file manually before rename

Summary

This commit removes the .Sync call we make to flush files to disk - we don't actually need to flush data to disk in case the instance under agent crashes. In such a case, for environment files, the task resource would be created again anyway. This commit also calls .Close on the temporary file instead of deferring the close because windows was having issues with the file being open in another process during rename .

Implementation details

Testing

make test successful, changes off forked branch tested against both AL2 and windows MACIS functional tests

New tests cover the changes:

Description for the changelog

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jy19 jy19 merged commit d881a3a into aws:env_files Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants