s3-recursive-acl icon indicating copy to clipboard operation
s3-recursive-acl copied to clipboard

Fix not waiting reliably for all updates to complete

Open panos-- opened this issue 6 years ago • 0 comments
trafficstars

Due to WaitGroup.Add being called inside the goroutine the program does not reliably wait for all updates to complete before exiting.

Fixed by moving WaitGroup.Add outside of the goroutine.

Can be reproduced by testing with only a small number of objects:

$ AWS_PROFILE=default ./s3-recursive-acl --bucket foo --region bar --path baz/ --acl public-read
Successfully updated permissions on 3 objects

Note that there is no output "Updating ..."

Output after applying the fix:

$ AWS_PROFILE=default ./s3-recursive-acl --bucket foo --region bar --path baz/ --acl public-read
Updating 'baz/two'
Updating 'baz/one'
Updating 'baz/three'
Successfully updated permissions on 3 objects

panos-- avatar Aug 18 '19 09:08 panos--