Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle error from closing GCS writer #126

Merged

Conversation

robwhitby
Copy link
Contributor

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 #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.

@robwhitby robwhitby requested a review from taylorsilva as a code owner May 25, 2021 12:05
@robwhitby robwhitby force-pushed the handle-gcs-write-close-error branch from d1965c7 to 74dd7bb Compare May 25, 2021 12:08
Copy link
Member

@taylorsilva taylorsilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the PR!

@taylorsilva taylorsilva merged commit 6a1a171 into concourse:master May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants