This repository was archived by the owner on Jan 27, 2026. It is now read-only.
feature: implement ipfs upload in worker#609
Merged
Merged
Conversation
…ap for file validation tasks
Contributor
There was a problem hiding this comment.
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-uploadand--ipfs-portflags. - Updated Cargo manifests to include
rust-ipfs,cid, and enabledtokio_unstablein 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 = trueto verifyhandle_file_upload_ipfslogic.
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")]
JannikSt
approved these changes
Jul 8, 2025
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
with_ipfs_uploadconfig flag is supplied