fake-gcs-server icon indicating copy to clipboard operation
fake-gcs-server copied to clipboard

Race-free Preconditions

Open rawler opened this issue 2 years ago • 5 comments

This fixes an issue we've experienced, where "IfNotExist"-style uploads have exhibited racy behavior, specified to not exist in production GCS.

rawler avatar Sep 29 '22 07:09 rawler

Apologies in advance for my lack of Go experience. I'm sure much of this patch is non-idiomatic, and it is submitted as much as a basis for discussion, as an actual proposal.

rawler avatar Sep 29 '22 07:09 rawler

Thank you for contributing! I'll take a look at this change over the next couple of days, but there's definitely no reason to apologize, if anything in the code needs improvements, we'll work on it!

fsouza avatar Oct 03 '22 04:10 fsouza

@rawler can you take a look at the build failure?

fsouza avatar Oct 07 '22 02:10 fsouza

@rawler can you take a look at the build failure?

I looked into them, but I don't understand how it's caused by what I did. From what I see, the cause seems to be:

bucket_test.go:278: rename C:\Users\RUNNER~1\AppData\Local\Temp\fakestorage-test-root-1941404170\some-bucket\fake-gcs-object3621328271 C:\Users\RUNNER~1\AppData\Local\Temp\fakestorage-test-root-1941404170\some-bucket\img%2Fhi-res%2Fparty-01.jpg: Access is denied.

rawler avatar Oct 12 '22 08:10 rawler

@rawler ugh ok, I'll dig into that. Thank you for your patience!

fsouza avatar Oct 14 '22 03:10 fsouza

Any time to work on this? Let me know if I can contribute in any way.

I'm not blocked by this, but carrying a fork that I'd love to clean up :)

rawler avatar Oct 20 '22 11:10 rawler

Hey, sorry, things have been a bit busy on my side, but I believe I'll have a chance to look into it (both the test failure and review the code) this weekend.

Thank you very much for your contribution and your patience!

fsouza avatar Oct 20 '22 14:10 fsouza