concourse / semver-resource

automated semantic version bumping
Apache License 2.0
97 stars 105 forks source link

handle error from closing GCS writer #126

Closed robwhitby closed 3 years ago

robwhitby commented 3 years ago

Sometimes writing the version file to GCS can silently fail and the file is empty after a put. The error only surfaces on subsequent get or check (see https://github.com/concourse/semver-resource/issues/125).

This change no longer ignores errors returned when closing the GCS writer, as the library docs state:

Since writes happen asynchronously, Write may return a nil error even though the write failed (or will fail). Always use the error returned from Writer.Close to determine if the upload was successful.