-
Notifications
You must be signed in to change notification settings - Fork 1
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
w32023-to-w3up #3
Conversation
…de those in output
…not upload.cid cid
Now this invokes |
⚡ npm -s start -w packages/w3 -- list --json | migrate-w32023-to-w3up --space "$space" { type: 'Add', object: 'bagbaierakuersmo7wndedhwk43e5xwcpzwenuda3dhpcsvkfibewg5gxl7oa', upload: W32023Upload { _id: '315318962269342672', type: 'Car', name: 'Upload at 2024-01-22T19:10:44.048Z', created: '2024-01-22T19:10:44.048+00:00', updated: '2024-01-22T19:10:44.048+00:00', cid: 'bafybeieevwnu57cbcp5u6jsy6wxpj2waq5gfq5gc4spss4skpzk34vvxyy', dagSize: 8848144, pins: [ { status: 'Pinned', updated: '2024-01-22T19:10:44.048+00:00', peerId: 'bafzbeibhqavlasjc7dvbiopygwncnrtvjd2xmryk5laib7zyjor6kf3avm', peerName: 'elastic-ipfs', region: null }, [length]: 1 ], parts: [ 'bagbaierakuersmo7wndedhwk43e5xwcpzwenuda3dhpcsvkfibewg5gxl7oa', [length]: 1 ], deals: [ [length]: 0 ] }, receipt: { cid: 'bafyreieu5or326j53kx6hj4b7auwkkjnsvnh65xmcggizntm3whldonf7u', out: { ok: { url: 'https://carpark-prod-0.s3.us-west-2.amazonaws.com/bagbaierakuersmo7wndedhwk43e5xwcpzwenuda3dhpcsvkfibewg5gxl7oa/bagbaierakuersmo7wndedhwk43e5xwcpzwenuda3dhpcsvkfibewg5gxl7oa.car?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIAXLN6VFMMTKTJNYUK%2F20240124%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20240124T010036Z&X-Amz-Expires=86400&X-Amz-Security-Token=IQoJb3JpZ2luX2VjELH%2F%2F%2F%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b7d4f7bd24ab12170706&X-Amz-SignedHeaders=content-length%3Bhost%3Bx-amz-checksum-sha256&x-id=PutObject', link: CID(bagbaierakuersmo7wndedhwk43e5xwcpzwenuda3dhpcsvkfibewg5gxl7oa), with: 'did:key:z6MkmvzdDBYoNcCg9NKkUEq6w1mDP4JnciG28p9EUhxyf8A5', status: 'upload', headers: { 'content-length': '8848144', 'x-amz-checksum-sha256': 'VQkZMd+zRkGeyubJ29hPzYjaDBsZ3ilVRUBJY3TXX9w=' }, allocated: 0 } } } } { type: 'Add', object: 'bagbaierayx2sfg6oq5pgazwlzxvi6pcexp7eq5hleut5khpwr4nl4y3rfuhq', upload: W32023Upload { _id: '315318962269342671', type: 'Car', name: 'Upload at 2024-01-22T19:10:23.808Z', created: '2024-01-22T19:10:23.808+00:00', updated: '2024-01-22T19:10:23.808+00:00', cid: 'bafybeicmidbuoilkli5w3bttmcndhpikk7zt6ydv3m6rihxl266c546qpi', dagSize: 8848085, pins: [ { status: 'Pinned', updated: '2024-01-22T19:10:23.808+00:00', peerId: 'bafzbeibhqavlasjc7dvbiopygwncnrtvjd2xmryk5laib7zyjor6kf3avm', peerName: 'elastic-ipfs', region: null }, [length]: 1 ], parts: [ 'bagbaierayx2sfg6oq5pgazwlzxvi6pcexp7eq5hleut5khpwr4nl4y3rfuhq', [length]: 1 ], deals: [ [length]: 0 ] }, receipt: { cid: 'bafyreichyyergghpyfzarxufnpyp43tsyoy2zj25sxpnhej4lc3apywl2m', out: { ok: { url: 'https://carpark-prod-0.s3.us-west-2.amazonaws.com/bagbaierayx2sfg6oq5pgazwlzxvi6pcexp7eq5hleut5khpwr4nl4y3rfuhq/bagbaierayx2sfg6oq5pgazwlzxvi6pcexp7eq5hleut5khpwr4nl4y3rfuhq.car?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIAXLN6VFMMQSPAZJ2R%2F20240124%2Fus-west-2%2Fs3%2Faws4_request&X-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HgPlaE2znOVbLdIK9ZOMfmU7jgpLVCZ%2BpcjsC%2Bd1awfi&X-Amz-Signature=8746a24686431c32ec9c91f015298cfeb1e3a139b4394437925e3e8139df67f3&X-Amz-SignedHeaders=content-length%3Bhost%3Bx-amz-checksum-sha256&x-id=PutObject', link: CID(bagbaierayx2sfg6oq5pgazwlzxvi6pcexp7eq5hleut5khpwr4nl4y3rfuhq), with: 'did:key:z6MkmvzdDBYoNcCg9NKkUEq6w1mDP4JnciG28p9EUhxyf8A5', status: 'upload', headers: { 'content-length': '8848085', 'x-amz-checksum-sha256': 'xfUim86HXmBmy83qjzxEu/5IdOslJ9Ud9o8avmNxLQ8=' }, allocated: 0 } } } } ``` |
tolerate errors when migrating parts, and allow migrating the rest and logging failures
cli has command to extract uploads from failures in a log, and test uses it
I merged #6 into here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! ❤️
README.md
Outdated
# wait quite some time | ||
migration2_log="/tmp/migrate-to-w3up.$migration_start.log" | ||
# retry migrating any uploads from UploadMigrationFailure | ||
migrate-to-w3up log get-uploads-from-failures "$migration2_log" | migrate-to-w3up --space "$space" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little buried - I'd perhaps have a separate heading to highlight this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I'll add a separate heading for the 'retry' stuff, which is I think what you mean. lmk if you meant some other way of grouping it.
migrate-to-w3up.js
Outdated
const digest = Digest.decode(digestBytes) | ||
return Link.create(CAR_CODE, digest) | ||
} catch (error) { | ||
errParseBase32 = error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is errParseCid
and errParseBase32
doing? They are unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to include them in the error.cause that gets thrown if a CID cannot be created from the input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Motivation:
Dependencies
migrate-to-w3up
bin script with spacey wizardmigrate-to-w3up
cli usage in README--expect-store-add-status=done
on big accounts. But I did run into other errors that I want to improve in followup PRs as described below.