mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 13:45:52 +03:00
[PR #972] [MERGED] Format "generation" field in Pubsub notification as a string #1079
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#1079
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fsouza/fake-gcs-server/pull/972
Author: @danmcgee-soda
Created: 10/28/2022
Status: ✅ Merged
Merged: 10/31/2022
Merged by: @fsouza
Base:
main← Head:notification-generation-string📝 Commits (1)
eddd2c1Format "generation" field in Pubsub notification as a string📊 Changes
2 files changed (+6 additions, -6 deletions)
View changed files
📝
internal/notification/event.go(+5 -5)📝
internal/notification/event_test.go(+1 -1)📄 Description
As documented in the storage objects JSON object representation, all fields are "string formatted as the specified value type", including numbers.
https://cloud.google.com/storage/docs/json_api/v1/objects#resource-representations
strconv.FormatIntwas used for the "size" field, but this wasn't done for generation.We noticed this when doing local testing, and the messages failed JSON unmarshalling from fake-gcs-server, but were properly unmarshalling from real Google Cloud Storage pubsub messages.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.