-
Notifications
You must be signed in to change notification settings - Fork 22
feature: implement ipfs upload in worker #609
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
Conversation
…ap for file validation tasks
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.
Pull Request Overview
This PR adds optional IPFS file upload support in the worker: when enabled via a CLI flag, files are uploaded to IPFS (in addition to S3). It refactors the file‐upload logic into dedicated functions and wires IPFS through the task bridge.
- Extracted S3 upload and signed‐URL retrieval into separate async functions and added an IPFS upload helper.
- Propagated an
Option<Ipfs>
through TaskBridge and CLI, with new--with-ipfs-upload
and--ipfs-port
flags. - Updated Cargo manifests to include
rust-ipfs
,cid
, and enabledtokio_unstable
in CI.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
crates/worker/src/docker/taskbridge/file_handler.rs | Factored S3+IPFS upload into handle_file_upload_s3 and handle_file_upload_ipfs , added IPFS flag |
crates/worker/src/docker/taskbridge/bridge.rs | Added ipfs: Option<Ipfs> to config, threaded through TaskBridge and tests |
crates/worker/src/cli/command.rs | Introduced with_ipfs_upload /ipfs_port args and IPFS node setup |
crates/worker/Cargo.toml | Added workspace deps: rust-ipfs , cid |
Cargo.toml | Added root deps: ipld-core , rust-ipfs , cid |
.github/workflows/checks.yml | Enabled --cfg tokio_unstable for CI builds |
Comments suppressed due to low confidence (2)
crates/worker/src/docker/taskbridge/file_handler.rs:109
- The new IPFS branch isn't covered by existing tests; add unit or integration tests that simulate
with_ipfs_upload = true
to verifyhandle_file_upload_ipfs
logic.
if let Some(ipfs) = ipfs {
crates/worker/src/cli/command.rs:122
- [nitpick] Add a doc comment above
with_ipfs_upload
(andipfs_port
) to explain its purpose, expected behavior, and any constraints.
#[arg(long, default_value = "false")]
with_ipfs_upload
config flag is supplied