feat(clp-tdl-package): Add the Spider TDL package that registers CLP's compression tasks. - #2404
Merged
Merged
Conversation
The initial and maximum job-state poll backoffs were fixed constants inside the Spider implementation, so a caller had no way to tune how aggressively a job is polled. Both are now `Duration` parameters of `run_s3_compression_job_to_completion`, leaving the pacing decision with the caller that knows how long its jobs typically run.
Contributor
WalkthroughAdds shared S3 compression data types, a Spider TDL package with initialization and task entrypoints, and a compression coordinator crate defining job submission and completion APIs. ChangesCompression workflow
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@components/clp-tdl-package/src/common.rs`:
- Around line 77-91: Update init_stderr_tracing_subscriber to be idempotent by
treating an already-installed global tracing subscriber as a successful
initialization instead of propagating the try_init failure. Preserve propagation
of other initialization errors so package_init retains meaningful failure
behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: c4a7eb4b-1286-46ad-a31f-7506db3f9b25
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (18)
Cargo.tomlcomponents/clp-rust-utils/src/clp_config/package/config.rscomponents/clp-rust-utils/src/lib.rscomponents/clp-rust-utils/src/task_io.rscomponents/clp-rust-utils/src/task_io/compression.rscomponents/clp-tdl-package/Cargo.tomlcomponents/clp-tdl-package/src/common.rscomponents/clp-tdl-package/src/lib.rscomponents/clp-tdl-package/src/task/compression/commit.rscomponents/clp-tdl-package/src/task/compression/compress.rscomponents/clp-tdl-package/src/task/compression/mod.rscomponents/clp-tdl-package/src/task/mod.rscomponents/compression-coordinator/Cargo.tomlcomponents/compression-coordinator/src/compression_job_submitter/mod.rscomponents/compression-coordinator/src/compression_job_submitter/spider.rscomponents/compression-coordinator/src/error.rscomponents/compression-coordinator/src/lib.rstaskfile.yaml
5 tasks
# Conflicts: # Cargo.lock # Cargo.toml
3 tasks
sitaowang1998
approved these changes
Jul 21, 2026
5 tasks
Bill-hbrhbr
approved these changes
Jul 21, 2026
Merged
5 tasks
Merged
3 tasks
This was referenced Jul 22, 2026
This was referenced Jul 31, 2026
3 tasks
4 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR depends on #2401.
This PR adds
clp-tdl-package, the Spider TDL package that a Spider task executor loads to run CLP's compression work. This PR is the skeleton: the package registers itself, sets up everything the tasks need at load time, and declares the two tasks. Both task bodies are intentionally left unimplemented — they follow in a subsequent PR.Why a separate crate
The package builds as a
cdylib, which the task executordlopens. That is a different artifact from anything else in the workspace, so it gets its own crate rather than a target inside an existing one. It is also built as anrlibso it can be linked normally by tests.Package initialization
Spider's TDL supports an
inithook that runs once when the package is loaded, before any task is dispatched.package_inituses it to prepare four pieces of process-global state, so that a misconfigured deployment fails at load with a clear message rather than at task time:CLP_CONFIG_PATHCLP_HOMEtracingsubscriberThat last one is not optional. The task executor and this
dlopened package each statically link their own copy oftracing, so they have independent global dispatchers. The executor's subscriber is invisible from inside the package, and without installing one here every task-side event hitsNoSubscriberand is silently dropped. The subscriber mirrors the executor's format — JSON to stderr,RUST_LOG-driven filter — so both streams interleave readably in the same executor log file.Each piece is exposed through an accessor that panics if the init hook has not run. Initialization is idempotent, so a repeated load is a no-op rather than an error.
Module layout
The
#[task]wrappers are kept separate from the workers they will call so that the Spider-facing surface — task names, parameter and return types — stays readable independently of the compression logic.Config type
SpiderTaskExecutorConfigis added toclp-rust-utilsas an empty placeholder. The executor config is a narrower view of CLP's config thanConfig, and its fields are added in the PR that adds the code which reads them.Build
task rustnow also builds this package.cargo build --binsdoes not buildcdylibtargets, so the explicit second invocation is required for the.soto be produced.Checklist
breaking change.
Validation performed
Summary by CodeRabbit
New Features
Build & Packaging