[PR #1524] [MERGED] Additional object response attributes #1575

Closed
opened 2026-03-03 12:35:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/1524
Author: @manuteleco
Created: 3/8/2024
Status: Merged
Merged: 3/18/2024
Merged by: @fsouza

Base: mainHead: additional_object_response_attributes


📝 Commits (3)

  • 013aee0 Additional object response attributes
  • 97841f3 fixup! Additional object response attributes
  • 6c65141 fixup! Additional object response attributes

📊 Changes

4 files changed (+32 additions, -15 deletions)

View changed files

📝 fakestorage/object.go (+5 -5)
📝 fakestorage/object_test.go (+9 -0)
📝 fakestorage/response.go (+13 -5)
📝 fakestorage/upload.go (+5 -5)

📄 Description

Some GCS client libraries (like this one), are quite strict when it comes to the set of attributes they expect to find in the response. If any of those attributes is missing, they fail to deserialize the response.

Here we introduce three new attributes in the Object response:

  • SelfLink
  • MediaLink
  • Metageneration

SelfLink cannot be tested using the Go GCS client library, as it is not included in the ObjectAttrs struct.

For the Metageneration we just hardcode the value "1", considering that we are not keeping track of it internally and "1" happens to be the correct value most of the times anyway.


Edited: I believe this PR fixes #758, which I only noticed after the fact.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/1524 **Author:** [@manuteleco](https://github.com/manuteleco) **Created:** 3/8/2024 **Status:** ✅ Merged **Merged:** 3/18/2024 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `additional_object_response_attributes` --- ### 📝 Commits (3) - [`013aee0`](https://github.com/fsouza/fake-gcs-server/commit/013aee051fbbd1763ab3c183cc9c0ca638cb07bb) Additional object response attributes - [`97841f3`](https://github.com/fsouza/fake-gcs-server/commit/97841f314eeccaf1a662ba82b130e4123e92df1a) fixup! Additional object response attributes - [`6c65141`](https://github.com/fsouza/fake-gcs-server/commit/6c651415e3dd7ae030e3cb183c04db196632d475) fixup! Additional object response attributes ### 📊 Changes **4 files changed** (+32 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/object.go` (+5 -5) 📝 `fakestorage/object_test.go` (+9 -0) 📝 `fakestorage/response.go` (+13 -5) 📝 `fakestorage/upload.go` (+5 -5) </details> ### 📄 Description Some GCS client libraries (like [this one][1]), are quite strict when it comes to the set of attributes they expect to find in the response. If any of those attributes is missing, they fail to deserialize the response. Here we introduce three new attributes in the Object response: * `SelfLink` * `MediaLink` * `Metageneration` `SelfLink` cannot be tested using the Go GCS client library, as it is not included in the [`ObjectAttrs`][2] struct. For the `Metageneration` we just hardcode the value `"1"`, considering that we are not keeping track of it internally and `"1"` happens to be the correct value most of the times anyway. [1]: https://crates.io/crates/google-cloud-storage [2]: https://pkg.go.dev/cloud.google.com/go/storage@v1.39.0#ObjectAttrs --- Edited: I believe this PR fixes #758, which I only noticed after the fact. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:35:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#1575
No description provided.