-
Notifications
You must be signed in to change notification settings - Fork 519
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
Add Google Cloud Storage (GCS) Accessor #792
Comments
Hi, thanks a lot for contributing. I generally do not like to accept Lock Providers without automated tests as it makes it impossible to maintain the package. I do not have enough time to do the manual testing. We can do the same as with CosmosDB integration. If you are willing to, just create a GitHub project and release the package. I will be happy to link the provider from ShedLock documentation. Is it OK for you? |
Thanks @lukas-krecan for the reply. I will talk to my team and see what they want to do I totally agree something like this cannot really be properly tested without automated tests and I really like the integration tests you have setup in ShedLock. Once I talk to my team I will let you know which way we decide to go. |
Hi, I have checked the pricing and it should be possible to test it against the real GCS. So if you will make the test work, I can provide an account for CI pieline. |
@lukas-krecan that would be great, yeah I think if you stay within the "free tier" we should be good. Let me work on the integration test using my own GCS bucket and once I have all the tests working I can send in a PR which then you could hook up your GCS account and your CI pipeline to validate everything is good. It's not urgent for me to finish this up, but will probably send you a PR over the next couple weeks when I have some free time. |
Ok, thanks |
Did you ever publish a GCS-provider @mbazos ? |
I am sorry I didn't push it yet, I wanted to do this but we ended up going a different route for this specific work use-case I have. |
@kagkarlsson all that needs to be done is testing the above code with an actual GCP project, I submitted this back in 2021 I am not sure if there is a viable emulator which can be run in a container for GCS bucket which would be ideal. If not @lukas-krecan mentioned he could setup a GCS bucket for tests. If you wanted to get going with this take the code above and use your own private GCS bucket for building the tests and then maybe submit the PR to @lukas-krecan and he could setup a GCS bucket for running the tests for ShedLock |
Ok, thanks for the update. If we end up going this route I will 👍 |
Would like to add a Google Cloud Storage Accessor for Shedlock. This should be possible because of the guarantees here https://cloud.google.com/storage/docs/consistency also there have been other libraries that have popped up but are specific to a GCS implementation. Shedlock has some nice features and would be nice if we could add this as a provider.
I actually went ahead and did some of the coding on this but really got stuck on the testing part. Unfortunately google doesn't offer a GCS emulator that you could use in conjunction with testcontainers.org and I tried https://github.com/fsouza/fake-gcs-server and while it did work it couldn't delete files from a bucket which is needed to test the lock/unlock functionality.
Before sending in a PR I wanted just some general guidance on this and if there are any suggestions on how to go about testing this properly. I could mock the Storage class but that might not really provide the level of testing needed on a library like this. Any suggestions are welcome.
The text was updated successfully, but these errors were encountered: