Commit ca9f6c2
Feature: DynamoDB Lock (#46)
* Copied from terragrunt v0.6.2
* Moving stuff to another directory
* Adding initial code, assuming DynamoDB table exists already
* Initial clean up
* Add function for playground
* Getting package ready for importing
* Add logging
* Change logging output to Info
* Add skeleton for testing
* Passing logger as input
* Add unit-test skeleton
* Asserts that it creates and releases lock
* Using Retry library and remove global vars
* Remove comments
* removing logging, as message is passed to retry logic
* Update session creation
* rename function with interface
* Create DynamoDB table if parameter passed in
* Updating dependencies
* Update function signatures
* Adding releaseLock public interface
* Updating AcquireTest to use options
* Updating test
* use require.NoError instead of assert
* using unique IDs for the test
* Oops, we want uniqueID only for the string, not the table
* Update test to use GetLockStatus
* Updating comments
* Update lock/lock.go
Co-authored-by: Ben Whaley <bwhaley@gmail.com>
* Update lock/lock.go
Co-authored-by: Ben Whaley <bwhaley@gmail.com>
* Update lock/lock.go
Co-authored-by: Ben Whaley <bwhaley@gmail.com>
* Update lock/lock.go
Co-authored-by: Ben Whaley <bwhaley@gmail.com>
* Update lock/lock.go
Co-authored-by: Ben Whaley <bwhaley@gmail.com>
* Update lock/lock.go
Co-authored-by: Ben Whaley <bwhaley@gmail.com>
* Update lock/lock.go
Co-authored-by: Ben Whaley <bwhaley@gmail.com>
* Adding comments & sorting the struct declaration
* Update lock/lock_test.go
Co-authored-by: Ben Whaley <bwhaley@gmail.com>
* Addressing PR feedback
* Fix some comments
* Adding deleting table to cleanup after test
* Cleaning up table from test
* Fix error message that it tests for
* Remove cleanup of dynamodb table
* Removing retryRelease
* Update lock/lock.go
* Apply suggestions from code review
Update comments
Co-authored-by: Ana Krivokapic <ana@gruntwork.io>
Co-authored-by: Marina Limeira <marinaflessa@gmail.com>
Co-authored-by: Marina Limeira <marina@gruntwork.io>
Co-authored-by: Ben Whaley <bwhaley@gmail.com>1 parent a3c7d1f commit ca9f6c2
4 files changed
+582
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
| 18 | + | |
15 | 19 | | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
| 26 | + | |
18 | 27 | | |
| 28 | + | |
19 | 29 | | |
20 | 30 | | |
21 | 31 | | |
| 32 | + | |
22 | 33 | | |
| 34 | + | |
23 | 35 | | |
24 | 36 | | |
| 37 | + | |
25 | 38 | | |
| 39 | + | |
| 40 | + | |
26 | 41 | | |
0 commit comments