Skip to content
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

chore: cron pin update for [email protected] #1228

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@ipld/dag-pb": "^2.0.2",
"@magic-ext/oauth": "^0.8.0",
"@magic-sdk/admin": "^1.3.0",
"@nftstorage/ipfs-cluster": "^4.0.0",
"@nftstorage/ipfs-cluster": "^5.0.0",
"@web3-storage/db": "^4.0.0",
"@web3-storage/multipart-parser": "^1.0.0",
"cborg": "^1.6.0",
Expand Down
9 changes: 6 additions & 3 deletions packages/api/test/car.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ import { sha256, sha512 } from 'multiformats/hashes/sha2'
import * as pb from '@ipld/dag-pb'
import { CarWriter } from '@ipld/car'
import fetch, { Blob } from '@web-std/fetch'
import { Cluster } from '@nftstorage/ipfs-cluster'
import { endpoint, clusterApi, clusterApiAuthHeader } from './scripts/constants.js'
import { createCar } from './scripts/car.js'
import { MAX_BLOCK_SIZE } from '../src/constants.js'
import { getTestJWT } from './scripts/helpers.js'
import { PIN_OK_STATUS } from '../src/utils/pin.js'

// Cluster client needs global fetch
Object.assign(global, { fetch })

describe('POST /car', () => {
it('should add posted CARs to Cluster', async () => {
const name = 'car'
Expand Down Expand Up @@ -44,13 +48,12 @@ describe('POST /car', () => {
const status = await statusRes.json()
const pinInfo = status.pins.find(pin => PIN_OK_STATUS.includes(pin.status))
assert(pinInfo, `status is one of ${PIN_OK_STATUS}`)

const clusterPeersRes = await fetch(new URL('peers', clusterApi), {
const cluster = new Cluster(clusterApi, {
headers: {
Authorization: clusterApiAuthHeader
}
})
const clusterPeers = await clusterPeersRes.json()
const clusterPeers = await cluster.peerList()
// assert that peerId from the status belongs to one of the cluster ipfs nodes.
assert(clusterPeers.some(peer => peer.ipfs.id === pinInfo.peerId))
})
Expand Down
3 changes: 2 additions & 1 deletion packages/api/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ bindings = [{ name = "NAME_ROOM", class_name = "NameRoom0" }]
account_id = "fffa4b4363a7e5250af8357087263b3a" # Protocol Labs CF account
zone_id = "7eee3323c1b35b6650568604c65f441e" # web3.storage zone
route = "https://api-staging.web3.storage/*"
vars = { CLUSTER_API_URL = "https://web3.storage.ipfscluster.io/api/", ENV = "staging", PG_REST_URL = "https://web3-storage-pgrest-staging.herokuapp.com", GATEWAY_URL = "https://ipfs.io" }
# nft.storage.ipfscluster.io is the staging cluster
vars = { CLUSTER_API_URL = "https://nft.storage.ipfscluster.io/api/", ENV = "staging", PG_REST_URL = "https://web3-storage-pgrest-staging.herokuapp.com", GATEWAY_URL = "https://ipfs.io" }

[env.staging.durable_objects]
bindings = [{ name = "NAME_ROOM", class_name = "NameRoom0" }]
Expand Down
2 changes: 1 addition & 1 deletion packages/cron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"author": "Alan Shaw",
"license": "(Apache-2.0 OR MIT)",
"dependencies": {
"@nftstorage/ipfs-cluster": "^4.0.0",
"@nftstorage/ipfs-cluster": "^5.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"@nftstorage/ipfs-cluster": "^5.0.0",
"@nftstorage/ipfs-cluster": "^5.0.1",

"@web-std/fetch": "^2.0.1",
"@web3-storage/db": "^4.0.0",
"debug": "^4.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/docker/cluster/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:

cluster0:
container_name: cluster0
image: ipfs/ipfs-cluster:v0.14.5
image: ipfs/ipfs-cluster:v1.0.0-rc3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
image: ipfs/ipfs-cluster:v1.0.0-rc3
image: ipfs/ipfs-cluster:v1.0.0-rc4

will have conflict once #1227 merged

depends_on:
- ipfs0
environment:
Expand Down