[PR #823] [MERGED] return attrs for newly created object in rewrite #947

Closed
opened 2026-03-03 12:32:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/823
Author: @jess-sheneberger
Created: 6/7/2022
Status: Merged
Merged: 6/9/2022
Merged by: @fsouza

Base: mainHead: main


📝 Commits (3)

  • f32c22a return attrs for newly created object in rewrite
  • fa1a3c2 update rewrite tests to fail if generation == 0
  • 83441b5 gofumpt

📊 Changes

2 files changed (+8 additions, -2 deletions)

View changed files

📝 fakestorage/object.go (+2 -2)
📝 fakestorage/object_test.go (+6 -0)

📄 Description

When using Copier.Run to copy a file the resulting attributes object had 0 for generation. This change seems to populate the generation field with the value from the created object, but I'm not certain it's actually the correct fix--maybe the other attributes should be from newObject?

Please let me know if you need more information about the issue or the change. The tests appear to be passing.


🔄 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/823 **Author:** [@jess-sheneberger](https://github.com/jess-sheneberger) **Created:** 6/7/2022 **Status:** ✅ Merged **Merged:** 6/9/2022 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`f32c22a`](https://github.com/fsouza/fake-gcs-server/commit/f32c22a8ddfcbc28a2511f6ce7da0c67d236e21e) return attrs for newly created object in rewrite - [`fa1a3c2`](https://github.com/fsouza/fake-gcs-server/commit/fa1a3c2953296e2598301e8be52c86262efaad8b) update rewrite tests to fail if generation == 0 - [`83441b5`](https://github.com/fsouza/fake-gcs-server/commit/83441b554702c53119b920c5804b8df38ac8b30a) gofumpt ### 📊 Changes **2 files changed** (+8 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/object.go` (+2 -2) 📝 `fakestorage/object_test.go` (+6 -0) </details> ### 📄 Description When using [Copier.Run](https://pkg.go.dev/cloud.google.com/go/storage#Copier.Run) to copy a file the resulting attributes object had 0 for generation. This change seems to populate the generation field with the value from the created object, but I'm not certain it's actually the correct fix--maybe the other attributes should be from newObject? Please let me know if you need more information about the issue or the change. The tests appear to be passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:32:21 +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#947
No description provided.