Skip to content

Release v0.3.8(HiatusReturnIsAComingOfAge)

Compare
Choose a tag to compare
@odeke-em odeke-em released this 18 Sep 06:39
· 98 commits to master since this release
9b9b7fd

This release is the end of the summer 2016 release -- a return from a 3 month hiatus, in which a whole lot of bugs were fixed.

It features:

  • Travis install fix. After adding a Makefile, the build was broken. PR #666 by @sselph fixed this bug
  • share, --with-link to avoid public file indexing, but only those with a link can access it.
    This feature was requested for in #568 by @RickCogley and the fix was guided by @thebaddie. The problem was that doing
$ drive pub afile

would make Google publicly index the shared file, of which for private files shouldn't be indexed. The fix for it involved ensuring that property WithLink. It was implemented in PR #674, thus you can now do

$ drive share --with-link release-videos/stewie_dez_nuts.mp4 
Provide access for accountType(s)
    user
    anyone

For roles(s)
    reader

Addressees:
    + Anyone with the link

File(s) to share:
    + stewie_dez_nuts.mp4

Proceed with the changes? [Y/n]:y
successful share for stewie_dez_nuts.mp4 with email "", role "reader" accountType "anyone"
$ drive url release-videos/stewie_dez_nuts.mp4 
/release-videos/stewie_dez_nuts.mp4: https://drive.google.com/open?id=0By5qQkvRAeV2dHhVaUpiUzFibm8
  • Fixed a spurious error when parsing .driverc files, that was caused by function signatures getting changed but variable reuse meant an old error was used. This bug was reported by @dconathan in #677, then duplicate reported by @staltux in #679. It was fixed by PR #678.
  • Added the ability to type select during pull/push ie folders only, files only etc. This feature was requested by @brandoncurtis in #670. It was fixed by #673.
    You can now do
$ drive push --directories a1/m1
$ drive pull --files tf1/tf2
  • Fixed a nil/uninitialized filter dereference. This bug was caused by PR #632. It was reported by @Sjlver in #681. It was fixed by #682.
  • Encryption and decryption key variables can now be recognized in the .driverc configuration file. This bug was reported by @quisar in #683. The bug was that the variables for encryption-key and decryption-key were not recognized. It was fixed by #684
$ cat .driverc
hidden=true
encryption-password=bonjour
decryption-password=bonjour
$ drive push test.mp4 # Should be encrypted at rest
$ drive pull --piped test.mp4 > outf && diff outf test.mp4 # Should be decrypted properly
  • Fixed up --no-clobber description for push. This bug was reported by @kcwu in #685. It was fixed by #688.
  • Updated the QR code dispensing drive-server to write a png image using the response writer's .Write method instead of going first through fmt.Fprintf(res, "%s", pngImage), the code is clearer and faster. This update was made in #689.
  • pull/export can now export to the same directory and level. This feature was requested by @AtcR in #660. The use case is to avoid creating too many exports' directories and to allow your exported files to be placed in one place. It was added in #696.
$ drive pull --explicitly-export --exports-dir ~/Desktop/exp --export pdf,txt,odt --same-exports-dir
Resolving...
+ /test-exports/few.docs
+ /test-exports/few
+ /test-exports/influx
Addition count 3
Proceed with the changes? [Y/n]:y
Exported '/Users/emmanuelodeke/[email protected]/test-exports/influx' to '/Users/emmanuelodeke/Desktop/exp/influx.pdf'
Exported '/Users/emmanuelodeke/[email protected]/test-exports/influx' to '/Users/emmanuelodeke/Desktop/exp/influx.txt'
Exported '/Users/emmanuelodeke/[email protected]/test-exports/few' to '/Users/emmanuelodeke/Desktop/exp/few.pdf'
Exported '/Users/emmanuelodeke/[email protected]/test-exports/few.docs' to '/Users/emmanuelodeke/Desktop/exp/few.docs.txt'
Exported '/Users/emmanuelodeke/[email protected]/test-exports/few.docs' to '/Users/emmanuelodeke/Desktop/exp/few.docs.odt'
Exported '/Users/emmanuelodeke/[email protected]/test-exports/few.docs' to '/Users/emmanuelodeke/Desktop/exp/few.docs.pdf'
  • Disable the automatic creation of *.desktop files on Linux. This feature was requested by @chevillet in #697. It was added in #698 and now you can do
$ drive pull --desktop-links=false

and you could keep this behavior turned on in your .driverc by

$ cat << ! >> .driverc
> desktop-links=false
> !
  • list --trashed now returns all items in the same current working directory. This bug was reported by @njbbaer in #695. It was also fixed by @njbbaer in #700. The diagnosis of the bug was two fold which you can find by reading #700 (comment).
  • --ignore-checksum documentation was made more coherent. This was made by @gjalsem in #703.
  • audited open file descriptors to ensure that they closed to avoid running out of open files ie descriptor leakage. This issue was reported in #711 by a quick audit
$ git grep -E 'os.Open\(' src/* config/* drive-gen/*.go
src/misc.go:    f, fErr := os.Open(p)
src/remote.go:          file, err := os.Open(fsAbsPath)
src/types.go:   fh, err := os.Open(f.BlobAt)

in which I noticed some opens but no accompanying closes.
Alas there was a call site that leaked its descriptors ie during file upload. This behavior was fixed by #712. The fix involved avoiding unnecessary opens but also attaching a file.Close handler to clean up after the caller returned. That change results in better performance and less resource exhaustion.

  • Fixed push mounted(push -m) that always unloaded entries in the root as reported in #641.
    This bug was a regression from #616. It was fixed by #713. The fix also ensured that we caught erraneous proceedings after push mounted had returned due to a failure to return when done.
  • list --sort now accepts multiple sort properties. This bug was reported in #714. It was fixed by #715 that ensures that sorters can be passed in delimited by comma. It also updated the doc on list sorting. So now we can perform composite sorts for example by name in descending order, then modification time in ascending:
    order:
$ drive list -sort name_r,modtime
  • Fedora package for drive. This was contributed by @agrez in #717. Please see https://github.com/odeke-em/drive/blob/master/platform_packages.md#fedora for how to get drive on Fedora.
  • return a non-zero error after fixing clashes so that scripts can refresh and then re-pull. This was reported by @yottabit42 in #720. Given that a call for fixing clashes during pull or push stops the operation, it is necessary that the outside world be relayed to, that the operation can be retried, e.g by a shell script. This behavior was fixed by @sselph in #722.
  • touch now allows custom times to be set. This feature was requested by @bjohas in #726. It was implemented in #729.
    Now you can set the desired times on your remote files instead of them just always being at the time that drive touch was performed on the remote server. You can do pass in custom times, and custom time formats for example:
$ drive touch --time 20120202120000 ComedyPunchlineDrumSound.mp3
/share-testing/ComedyPunchlineDrumSound.mp3: 2012-02-02 12:00:00 +0000 UTC
$
$ drive touch --format "2006-01-02-15:04:05.0000Z" --time "2016-02-03-08:12:15.0070Z" outf.go
/share-testing/outf.go: 2016-02-03 08:12:15 +0000 UTC
$
$ drive touch --duration -30h ComedyPunchlineDrumSound.mp3 outf.go
/share-testing/outf.go: 2016-09-10 08:06:39 +0000 UTC
/share-testing/ComedyPunchlineDrumSound.mp3: 2016-09-10 08:06:39 +0000 UTC
  • Fixed pulling from a deprecated Google Web Hosting URL. This bug was a notice from Google Drive https://support.google.com/drive/answer/2881970?hl=en. However it was reported by @dermesser in #734 (comment) and revealed by @cdown's bug report in #734. It was fixed by @dermesser in #735. It was then updated by #736.
  • Fixed unrelayed errors on pulls. This bug was reported by @cdown in #734. It was fixed by #737.
  • Documented lone modification time change handling during checksum verification. This request for clarity was made by @tkeith in #690. It was fixed by #742.
  • Propagating and handling errors from remote file resolution/pagination. This bug was catastrophic and had plagued drive for a full year and more. The problem was in the design of the pagination where the paginator asynchronously retrieved files and only returned a channel of files. The problem was that during resolving files, we would encounter a remote Google Drive error e.g from its servers crashing, or from quota/rate-limit exhaustion. Not propagating the encountered error meant that during a pull or push, the remote side would be reported to not have files which would cause a full upload/deletion. This bug was reported in very many places; to name a few:
  • @CountryBumkin reported #480. #480 is probably the most commented on issue in drive because a rate limiting bug on Google Drive's backend(which may still exist as of writing) on drive's globally used quota caused spurious deletions and reuploads for users all around the world.
  • @brandoncurtis reported #668 in which intermittent 503 errors from Google Drive permitted pushes(because the 503 was never propagated to the caller) and then caused spurious conflicts so the user would be stuck in a state of limbo.
  • @jimr6007 reported #728 in which duplicate files were being pushed upstream because a previous 500 intermittent error on Google Drive would cause the remote files to be reported as non-existent.
  • @creighto reported #738 in which the opposite of @jimr6007's case ie a pull instead of a push, caused a spurious need for deletions.

Binaries

$ make
CGO_ENABLED=0 GOOS=linux GOARM=5 GOARCH=arm go build -o ./bin/drive_armv5 ./cmd/drive
CGO_ENABLED=0 GOOS=linux GOARM=6 GOARCH=arm go build -o ./bin/drive_armv6 ./cmd/drive
CGO_ENABLED=0 GOOS=linux GOARM=7 GOARCH=arm go build -o ./bin/drive_armv7 ./cmd/drive
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ./bin/drive_armv8 ./cmd/drive
CGO_ENABLED=0 GOOS=darwin go build -o ./bin/drive_darwin ./cmd/drive
CGO_ENABLED=0 GOOS=linux go build -o ./bin/drive_linux ./cmd/drive
rm -f ./bin/md5Sums.txt
find ./bin -type f -name "drive_*" -exec md5 {} >> ./bin/md5Sums.txt \;
cat ./bin/md5Sums.txt
MD5 (./bin/drive_armv5) = 56521b19ec572f27b4fc434e987e1c10
MD5 (./bin/drive_armv6) = 2dfba2e2f4d40fe4987f0f641ddaaccb
MD5 (./bin/drive_armv7) = 831790fc2e66a033cee20b5bd6b03695
MD5 (./bin/drive_armv8) = 894901be67472b1fe49c4acc962cdc8b
MD5 (./bin/drive_darwin) = 6e9968de26e93448eedc9835b66ef5fb
MD5 (./bin/drive_linux) = e175943bc56a8f01b7c7574ddf383986

This release is very interesting because it is a deal breaker for a lot of reliability and trust that users can now get in drive. My biggest apologies to all the users that were affected by lack of error propagation during remote resolution/pagination. Unfortunately I hadn't had much time to work on it, but this afternoon felt right.

This was the end of the summer release and reflecting back on the lessons learned while working on drive in my spare time, getting help from numerous volunteers and well wishers, interacting with the users both on the issue tracker and via email; I have to say this is a great experience. Fighting these fires has given me wisdom and experience to keep working on other things.

With this release, I hope this takes us to new frontiers establishing drive as a product that users can rely on with reliability, speed, performance and ease of use with all the features contained in here.

I am looking forward to the next release!

The Summer has ended but have a great Fall season and keep filing those bugs, tell your friends about drive and enjoy!

obamamicdrop

lastcall