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

Catch a 409 when creating a bucket and continue. #1044

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

dlorenc
Copy link
Contributor

@dlorenc dlorenc commented Sep 26, 2018

I think this should fix #947

@codecov-io
Copy link

Codecov Report

Merging #1044 into master will decrease coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1044      +/-   ##
==========================================
- Coverage   39.98%   39.91%   -0.07%     
==========================================
  Files          70       70              
  Lines        3079     3084       +5     
==========================================
  Hits         1231     1231              
- Misses       1721     1726       +5     
  Partials      127      127
Impacted Files Coverage Δ
pkg/skaffold/build/gcb/cloud_build.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3dbf5ac...989f674. Read the comment docs.

@dgageot dgageot merged commit e8257a0 into GoogleContainerTools:master Sep 27, 2018
if e, ok := err.(*googleapi.Error); ok {
if e.Code == http.StatusConflict {
// 409 errors are ok, there could have been a race condition or eventual consistency.
logrus.Debugf("Not creating bucket, got a 409 error indicating it already exists.")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd probably log the err here for diagnostics (i.e. in case some other 409 is returned in the future)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

skaffold trying to create a bucket and failing
4 participants