-
Notifications
You must be signed in to change notification settings - Fork 3
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 Storage as a storage backend #75
Conversation
This is related to issue #74. Its very lightly tested as I'm hoping to get some feedback from people that understand this code base and scala better. However, I was able to push blobs to google storage using the getting started steps in your README.md |
Thanks for your PR. Yes I think we could merge something like this if we added some more tests. Can we use this only through config. specifying a different endpoint url for GS? |
@simao - it should be possible. I don't actually know Scala, so this was just the most obvious way to construct the s3client. I'll try and carve out some time this week to make it work via an endpoint config option. |
Services like Google Storage expose s3 compatible APIs that can accessed with a non-aws URL. Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Andy Doan <andy@foundries.io>
I've done a new force push that makes the config of this almost identical to what I've done for the ota-tuf reposerver. I wasn't able to run the unit tests properly and am not really sure the best way to achieve testing here. Feel free to just copy my idea and do it differently if you'd like. |
@doanac I pushed some commits to make it tests green. I don't have a google account to run these tests with valid credentials. Can you run them with valid google credentials? You need to set these env variables:
and then run I ran them with valid aws credentials and they are green for us. |
@simao - I get a couple of failures from AWS assumptions:
Is there a more generic string we could search for in this test to make it work for both google storage and AWS? I also see this failure:
I'm wondering if the best way to deal with that failure would be to make a single "createS3Client" function in com.advancedtelematic.treehub.object_store and then have S3DeltaStorage, S3BlobStore, and S3DeltaStorageIntegrationSpec all use this function for creating the s3Client? NOTE: I've also tested this with with an updated version of: https://github.com/doanac/ota-compose/ and have garage-push operations working. |
I think we could just match on the
Yes that might be a good idea but not sure how it would look, would have to spend some time on it.
|
I bet |
With the latest 2 commits I was able to run the integration tests against a google storage bucket. |
Added a commit and all good from our side, just need DCO on some commits. |
Signed-off-by: Simão Mata <simao.mata@here.com>
Signed-off-by: Simão Mata <simao.mata@here.com>
Signed-off-by: Andy Doan <andy@foundries.io>
Also, I needed to force push as I forgot to sign off on my previous commits and needed to rebase yours on top of my commits. Sorry about that. |
This gives the test class access to the properly configured s3Client to make sure the tests run properly Signed-off-by: Andy Doan <andy@foundries.io>
Signed-off-by: Simão Mata <simao.mata@here.com>
@simao - i think this is ready now |
@doanac Great. Thanks again for opening a pr. |
This works with a Google Storage project configured with S3
interoperability.
Signed-off-by: Andy Doan andy@foundries.io