Repository navigation
Add Travis, linter, commit hooks and fix races - #13
Merged
Merged
Conversation
* Put locking around the tvm Get() call instead of download(). This should prevent multiple downloads from taking place due to the fact that two threads both seeing that the requested Terraform version is not present in the repository. * Improve the mkdir calls. Instead of checking to see if a directory exists before creating it, just create it and then ignore a "file exists" error.
btromanova
reviewed
Dec 28, 2018
btromanova
left a comment
Contributor
There was a problem hiding this comment.
It's not related to this diff, but I've noticed that help for tvm command doesn't tell you to specify the version you want to get. Maybe you can fix it in this PR as well. If not, I can create a separate issue for that:
tr-C02Q34JGG8WM:astro tatianaromanova$ tvm install --help
Download and link the specified version of Terraform
Usage:
tvm install [flags]
Flags:
-h, --help help for install
--path string path to link Terraform binary to (default: /usr/local/bin/terraform )
Global Flags:
--repo string path to store versions (default is $HOME/.tvm)
Contributor
Author
Binaries weren't being rebuilt when Go source files changed.
btromanova
approved these changes
Dec 28, 2018
CorgiMan
reviewed
Dec 28, 2018
CorgiMan
reviewed
Dec 28, 2018
CorgiMan
approved these changes
Dec 28, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Travis configuration, a
make lintand precommit hook for lintinglocally.
This also fixes issues in the Makefile where
make testwas returning trueeven when tests failed (due to shell pipe in Makefile) and where binaries
weren't rebuilt when source files changed.
Finally, this also fixes some race conditions that were showing up as flakey
tests. Namely, fixed a race in downloading of the Terraform binary and also
when creating download directories.