-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: put to r2 and check linkdex-api for dag structure (#2204)
Porting web3-storage/web3.storage#1785 ### Adds - put CARs to R2 in parallel with S3. Both must succed for a succesful upload, so we add p-retry around both - linkdex-api to fetch dag completeness report over CARs in S3, to replace what ipfs-cluster was doing for us. - `updatePinStatus` to the db client, so we can update the status immediately if linkdex-api tells us the DAG is now complete... previously this only happened via a direct db update in a cron job. - ElasticIpfs as an entry in the ClusterService enum, and changes so that we add a "pin" record for the one we have on e-ipfs... the e-ipfs pin will now be the only one for an upload, and it's status will determine if we tell the user it is "Pinned" or "Pinning"... and we can now find the dag status immediately after upload, so the time to mark a thing as Pinned will be massively reduced. - mocking fetch requests in miniflare, to simulate linkdex-api responses. See: https://miniflare.dev/core/standards#mocking-outbound-fetch-requests adds env vars - `CARPARK` - an R2 Bucket binding - `CARPARK_URL` - the public url prefix to use when recording the r2 backup_url - `LINKDEX_URL` - url for linkdex-api ### Removes - pinning to ipfs-cluster after upload completes. It's all e-ipfs now. ## Notes - It looks like we've been using the wrong `dagSize` for things uploaded via `/store`. Uploading a single CBOR block CAR to cluster and asking it for the dag size just gives you the total bytes of the blocks in the CAR... not the size of the reachable dag from that root. This PR will change that to store the full dagSize as the sum of the size of all the blocks. see: https://github.com/ipfs-cluster/ipfs-cluster/blob/f376cf5106deeeb903b58e7e2431fa63bdea6900/adder/adder.go#L303 License: MIT Signed-off-by: Oli Evans <[email protected]>
- Loading branch information
Showing
28 changed files
with
1,198 additions
and
189 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TYPE service_type ADD VALUE 'ElasticIpfs'; |
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
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
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
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
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
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
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
Oops, something went wrong.