Skip to content

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

Merged
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
dlorenc:409
Sep 27, 2018
Merged

Catch a 409 when creating a bucket and continue.#1044
dgageot merged 1 commit intoGoogleContainerTools:masterfrom
dlorenc:409

Conversation

@dlorenc
Copy link
Copy Markdown
Contributor

@dlorenc dlorenc commented Sep 26, 2018

I think this should fix #947

@codecov-io
Copy link
Copy Markdown

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
Copy Markdown
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