-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix(egressRecord): Remove unnecessary multiplication for ts conversion #1588
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
travis
approved these changes
Nov 22, 2024
This was referenced Nov 22, 2024
fforbeck
pushed a commit
that referenced
this pull request
Nov 25, 2024
🤖 I have created a release *beep* *boop* --- ## [18.1.3](upload-api-v18.1.2...upload-api-v18.1.3) (2024-11-22) ### Fixes * **egressRecord:** Remove unnecessary multiplication for ts conversion ([#1588](#1588)) ([b7bc90e](b7bc90e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fforbeck
added a commit
to storacha/w3infra
that referenced
this pull request
Nov 25, 2024
**Context** I've identified an issue in our DynamoDB table where egress events were not being stored correctly. This was traced back to the configuration of our partition key (PK) and sort key (SK). In DynamoDB, the partition key is crucial for uniquely identifying each item, while the sort key helps organize data within a partition. This change ensures that the combination of partition key and sort key is unique for each record, preventing DynamoDB from overriding existing records in case of a collision. **Changes Made** 1. **Modification of Partition Key (PK) & Sort Key (SK):** - The PK was updated to ensure it uniquely identifies each record. Previously, key collisions occurred because multiple records were using the same PK value, leading to storage issues. 2. **Inclusion of `cause` in Stripe Idempotent Key:** - Added `cause` as part of the Stripe idempotent key to ensure the uniqueness of requests to Stripe, preventing duplicate processing. 3. **Renaming of Table from `egress-traffic` to `egress-traffic-events`:** - Since existing partition keys and sort keys cannot be updated, the table was renamed and the keys were updated. The existing table will be dropped to accommodate these changes. **Impact** - These changes resolve the storage issues for egress events and improve data integrity and retrieval efficiency. - The renaming and restructuring of the table ensure that future records are stored and managed correctly. Blocked by storacha/w3up#1588
fforbeck
added a commit
to storacha/freeway
that referenced
this pull request
Nov 25, 2024
Added the `nonce` as suggested per @alanshaw, but also set it to not expire, so we can process the invocation any time. The `servedAt` field doesn't need to be converted to seconds. Blocked by storacha/w3infra#443 & storacha/w3up#1588
fforbeck
pushed a commit
that referenced
this pull request
Dec 9, 2024
🤖 I have created a release *beep* *boop* --- ## [18.0.0](capabilities-v17.4.1...capabilities-v18.0.0) (2024-12-05) ### ⚠ BREAKING CHANGES * content serve authorization ([#1590](#1590)) ### Features * content serve authorization ([#1590](#1590)) ([8b553a5](8b553a5)) ### Fixes * **egressRecord:** Remove unnecessary multiplication for ts conversion ([#1588](#1588)) ([b7bc90e](b7bc90e)) ### Other Changes * **main:** release w3up-client 16.4.1 ([#1577](#1577)) ([1482d69](1482d69)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fforbeck
added a commit
to storacha/upload-service
that referenced
this pull request
Dec 11, 2024
storacha#1588) ### Context This PR fixes the handling of the `servedAt` timestamp in the `packages/upload-api/src/space/record.js` file. The previous implementation included a multiplication by 1000, assuming a conversion from seconds to milliseconds was necessary. This change removes the conversion.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
This PR fixes the handling of the
servedAt
timestamp in thepackages/upload-api/src/space/record.js
file.The previous implementation included a multiplication by 1000, assuming a conversion from seconds to milliseconds was necessary. This change removes the conversion.