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

storage.create function deprecated - storage.createFrom() hangs #1624

Open
oliverjstack opened this issue May 30, 2024 · 1 comment
Open

Comments

@oliverjstack
Copy link

Overview

Using the com.google.cloud:spring-cloud-gcp-storage:5.0.4 library the storage.create() function has now been listed as deprecated to upload files to GCS bucket.

They now have a createFrom() function that achieves the same outcome however seems when it interacts with the GCS server (fake-gcs-server) it fails.

Notes

  • The post request sent to the GCS Server using the createFrom() returns a 200
"POST /upload/storage/v1/b/<bucketName>/o?ifGenerationMatch=0&name=<fileName>&uploadType=resumable HTTP/1.1\" 200 772\n"
  • The post request sent to the GCS Server using the create() function returns 200
"POST /upload/storage/v1/b/<bucketName>/o?ifGenerationMatch=0&projection=full&uploadType=multipart HTTP/1.1\" 200 1007\n"
  • The create() function successfully uploads the file to the container and is verified with buy running a java script which lists all files within the bucket using the Storage client. The createFrom() does not have the file listed.
  • The -log-level "debug" does not show any debug logs within the container.
  • The -log-level "trace, panic" return a "not a valid logging level" message in the container on startup.

Summary

I appreciate that you guys are seemingly the only way to create a fake gcs server allowing integration testing to proceed. I think its crazy that Google has no simple image that can emulate their own server functionality.

Let me know if I need to add anything or what you guys require from me. For now, Ill just be using the GCP SDK local helper client to emulate the storage but would love to use your solution if this problem is resolved.

@fsouza
Copy link
Owner

fsouza commented May 30, 2024

Can you share a stack trace of the failure and how to reproduce it?

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

No branches or pull requests

2 participants