Closed eikehartmann closed 1 month ago
Looks like this PR successfully break server for ruby SDKs:
Ruby 3.3.1 Google storage gem 1.45.0
irb(main):003> b.create_file(StringIO.new('hello'), '1/1.txt')
Intiating resumable upload command to http://storage.test:4443/upload/storage/v1/b/cpl-dev-config-storage/o?name=1%2F1.txt
Error - #<Date::Error: invalid date>
(irb):3:in `<main>': invalid date (Date::Error)
options[:parse_filter] = ->(fragment, _doc, *_args) { DateTime.parse(fragment) }
build from https://github.com/fsouza/fake-gcs-server/commit/619c4a7f793b4724e1f92c6eeb1bf7aff798c026 before this merge - no issues:
> b.create_file(StringIO.new('hello'), '1/1.txt')
Intiating resumable upload command to http://storage.test:4443/upload/storage/v1/b/cpl-dev-config-storage/o?name=1%2F1.txt
Success - #<Google::Apis::StorageV1::Object:0x00000001506fc1a0
@acl=
[#<Google::Apis::StorageV1::ObjectAccessControl:0x00000001506fb818
@bucket="cpl-dev-config-storage",
@entity="projectOwner-test-project",
@etag="RVRhZw==",
@kind="storage#objectAccessControl",
@object="1/1.txt",
@project_team=
#<Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam:0x00000001506f9680>,
@role="OWNER">],
@bucket="cpl-dev-config-storage",
@generation=0,
@id="cpl-dev-config-storage/1/1.txt",
@kind="storage#object",
@media_link=
"http://storage.test:4443/download/storage/v1/b/cpl-dev-config-storage/o/1%2F1.txt?alt=media",
@metageneration=1,
@name="1/1.txt",
@self_link=
"http://storage.test:4443/storage/v1/b/cpl-dev-config-storage/o/1%2F1.txt",
@size=0>
Sending upload command to http://storage.test:4443/upload/storage/v1/b/cpl-dev-config-storage/o?uploadType=resumable&name=1%2F1.txt&upload_id=fb06e38958e90dc12e126bfcd926ae1d
Success - #<Google::Apis::StorageV1::Object:0x0000000136e37768
@acl=
[#<Google::Apis::StorageV1::ObjectAccessControl:0x0000000150b3c4e0
@bucket="cpl-dev-config-storage",
@entity="projectOwner-test-project",
@etag="RVRhZw==",
@kind="storage#objectAccessControl",
@object="1/1.txt",
@project_team=
#<Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam:0x00000001506b38d8>,
@role="OWNER">],
@bucket="cpl-dev-config-storage",
@content_type="application/json",
@crc32c="mnG7TA==",
@etag="XUFAKrxLKna5cZ2REBfFkg==",
@generation=1717098900664927,
@id="cpl-dev-config-storage/1/1.txt",
@kind="storage#object",
@md5_hash="XUFAKrxLKna5cZ2REBfFkg==",
@media_link=
"http://storage.test:4443/download/storage/v1/b/cpl-dev-config-storage/o/1%2F1.txt?alt=media",
@metageneration=1,
@name="1/1.txt",
@self_link=
"http://storage.test:4443/storage/v1/b/cpl-dev-config-storage/o/1%2F1.txt",
@size=5,
@time_created=Thu, 30 May 2024 19:55:00 +0000,
@updated=Thu, 30 May 2024 19:55:00 +0000>
=>
#<Google::Cloud::Storage::File:0x0000000150792c40
@gapi=
#<Google::Apis::StorageV1::Object:0x0000000136e37768
@acl=
[#<Google::Apis::StorageV1::ObjectAccessControl:0x0000000150b3c4e0
@bucket="cpl-dev-config-storage",
@entity="projectOwner-test-project",
@etag="RVRhZw==",
@kind="storage#objectAccessControl",
@object="1/1.txt",
@project_team=#<Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam:0x00000001506b38d8>,
@role="OWNER">],
@bucket="cpl-dev-config-storage",
@content_type="application/json",
@crc32c="mnG7TA==",
@etag="XUFAKrxLKna5cZ2REBfFkg==",
@generation=1717098900664927,
@id="cpl-dev-config-storage/1/1.txt",
@kind="storage#object",
@md5_hash="XUFAKrxLKna5cZ2REBfFkg==",
@media_link=
"http://storage.test:4443/download/storage/v1/b/cpl-dev-config-storage/o/1%2F1.txt?alt=media",
@metageneration=1,
@name="1/1.txt",
@self_link="http://storage.test:4443/storage/v1/b/cpl-dev-config-storage/o/1%2F1.txt",
@size=5,
@time_created=Thu, 30 May 2024 19:55:00 +0000,
@updated=Thu, 30 May 2024 19:55:00 +0000>,
@service=Google::Cloud::Storage::Service(anything-importer-dev),
@user_project=nil>
Probably not covered all alpakka operations, (just ran into some timeout with resumable upload) but for get object the easy catch was to just add some fields that are required by the format alpakka's
GCStorage.getObject
expects - would appreciate very much if this could be added!Tested with