Skip to content

feat(spider)!: Remove legacy Spider support from Docker Compose deployment. - #2452

Open
sitaowang1998 wants to merge 14 commits into
y-scope:mainfrom
sitaowang1998:remove-spider-compose
Open

feat(spider)!: Remove legacy Spider support from Docker Compose deployment.#2452
sitaowang1998 wants to merge 14 commits into
y-scope:mainfrom
sitaowang1998:remove-spider-compose

Conversation

@sitaowang1998

@sitaowang1998 sitaowang1998 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Description

This PR removes the user-facing configuration and docker compose deployment for the legacy Spider orchestration, as tracked by #2440:

  • Remove legacy Spider services and configuration from Docker Compose.
  • Make Celery the only compression orchestration option.
  • Remove the legacy Spider scheduler and database configuration.
  • Remove the obsolete Spider database initialization script.
  • Update Python and Rust configuration models accordingly.
  • Update package and Helm configuration templates.

Note

Note to reviewer: Make sure the changes do not conflict with #2418, which adds helm support for Spider huntsman.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

  • GitHub workflows pass.

Summary by CodeRabbit

  • Removed Features

    • Removed Spider orchestration, scheduling, worker services, database credentials, and related deployment configuration.
    • Removed the Spider-specific Docker Compose configuration.
    • Docker Compose deployments now use the standard configuration.
  • Configuration

    • Removed Spider database and scheduler settings from configuration templates, Helm values, and generated credentials.
    • Compression scheduling now uses Celery exclusively.
  • Maintenance

    • Updated the Helm chart version.

@sitaowang1998
sitaowang1998 requested a review from a team as a code owner August 2, 2026 22:40
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The changes remove Spider orchestration from configuration models, database initialization, compression scheduling, controller wiring, templates, and deployment configuration. Celery remains the compression scheduler implementation.

Changes

Spider orchestration removal

Layer / File(s) Summary
Remove Spider configuration contracts
components/clp-py-utils/clp_py_utils/clp_config.py, components/clp-rust-utils/src/clp_config/package/config.rs, components/package-template/src/etc/*, tools/deployment/package-helm/*, components/clp-tdl-package/src/task/compression/compress.rs
Removed Spider enums, credentials, scheduler settings, database names, validation, and configuration fields. Test fixtures and Helm output no longer provide the Spider database name. The Helm chart version was updated.
Simplify database and scheduler runtime
components/clp-py-utils/clp_py_utils/create-db-tables.py, components/job-orchestration/job_orchestration/scheduler/compress/compression_scheduler.py, components/clp-py-utils/clp_py_utils/sql_adapter.py
Database creation now initializes the metadata and orchestration databases. Compression scheduling always creates a CeleryTaskManager. SQL error reporting now reads the CLP database name from database_config.names.
Remove Spider controller wiring
components/clp-package-utils/clp_package_utils/controller.py, components/clp-package-utils/clp_package_utils/general.py, docs/src/user-docs/guides-docker-compose-deployment.md
Removed Spider environment setup, credentials, and Compose selection. Startup always uses docker-compose.yaml. Deployment documentation no longer marks queue and Redis services as Celery-only.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • y-scope/clp#2404: Adds Spider orchestration and compression components affected by this removal.
  • y-scope/clp#2418: Adds Spider Helm integration removed by this PR.
  • y-scope/clp#2436: Removes related Spider orchestration deployment and documentation support.

Suggested reviewers: junhaoliao

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the breaking removal of legacy Spider support from Docker Compose, which is a central change in the pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sitaowang1998 sitaowang1998 changed the title feat(spider): Remove legacy Spider Docker compose orchestration. feat(spider)!: Remove legacy Spider Docker compose orchestration. Aug 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
tools/deployment/package-helm/templates/configmap.yaml (1)

70-95: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Remove the remaining Spider configuration block.

This template still reads .Values.spider.enabled and emits compression_coordinator and spider. The updated Python and Rust configuration models no longer define these fields. If an existing values file keeps spider.enabled: true, Helm generates a clp-config.yaml that the updated parsers cannot load. Delete this block and the remaining Spider value reference.

🤖 Prompt for 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.

In `@tools/deployment/package-helm/templates/configmap.yaml` around lines 70 - 95,
Remove the Spider-specific template block from configmap.yaml by deleting the
.Values.spider.enabled guard and the emitted compression_coordinator and spider
sections, since the updated configuration models no longer support those fields.
Update the template to stop referencing spider-enabled values entirely and keep
the remaining ConfigMap generation path unchanged so Helm no longer produces
clp-config.yaml entries the parsers cannot load.
tools/deployment/package-helm/Chart.yaml (1)

18-22: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Remove the legacy Spider Helm integration as one change.

The chart still retains the Spider dependency and public values while clpConfig.database.names.spider was removed. This leaves an enableable deployment path with an incomplete configuration. Remove the dependency and both Spider values blocks, or update all three sites to the supported Huntsman contract before release.

  • tools/deployment/package-helm/Chart.yaml#L18-L22: remove the spider dependency and spider.enabled condition.
  • tools/deployment/package-helm/values.yaml#L192-L193: keep the database contract aligned with the remaining chart components.
  • tools/deployment/package-helm/values.yaml#L386-L423: remove the legacy Spider values block.
🤖 Prompt for 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.

In `@tools/deployment/package-helm/Chart.yaml` around lines 18 - 22, Remove the
legacy Spider integration consistently: delete the spider dependency and
condition in tools/deployment/package-helm/Chart.yaml lines 18-22, align the
database names contract in tools/deployment/package-helm/values.yaml lines
192-193 with the remaining components, and remove the Spider values block in
lines 386-423. Do not replace it with an unsupported integration.
🤖 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.

Outside diff comments:
In `@tools/deployment/package-helm/Chart.yaml`:
- Around line 18-22: Remove the legacy Spider integration consistently: delete
the spider dependency and condition in tools/deployment/package-helm/Chart.yaml
lines 18-22, align the database names contract in
tools/deployment/package-helm/values.yaml lines 192-193 with the remaining
components, and remove the Spider values block in lines 386-423. Do not replace
it with an unsupported integration.

In `@tools/deployment/package-helm/templates/configmap.yaml`:
- Around line 70-95: Remove the Spider-specific template block from
configmap.yaml by deleting the .Values.spider.enabled guard and the emitted
compression_coordinator and spider sections, since the updated configuration
models no longer support those fields. Update the template to stop referencing
spider-enabled values entirely and keep the remaining ConfigMap generation path
unchanged so Helm no longer produces clp-config.yaml entries the parsers cannot
load.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f4dc6421-ad3b-47f5-a204-c00023d7d891

📥 Commits

Reviewing files that changed from the base of the PR and between 62cee7f and 04f996e.

📒 Files selected for processing (3)
  • tools/deployment/package-helm/Chart.yaml
  • tools/deployment/package-helm/templates/configmap.yaml
  • tools/deployment/package-helm/values.yaml

@LinZhihao-723 LinZhihao-723 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

TODO and future work are listed as following:

  1. In the user doc here, we still have (if using Celery) labels which should be removed (since Celery is the only option now).
  2. When cross-referencing PRs for Spider Wolf integration, the coding agent found a bug that was missed from the very beginning in this line: self.database_config.name will be an unresolved key; it has been renamed to names. I'm ok for either fixing it in this PR or creating a separate PR for it.
  3. The current clp_config.py explicitly rejects database.names.spider, but it will not complain if compression_scheduler.type or spider_scheduler is given as they will be silently ignored. Consider we probably don't have real users for the old Spider scheduler, I'm ok with this behavior. Just need a sanity check with @junhaoliao.
    • The proper fix for this is to add @model_validator(mode="before") validator to reject any removed keys. But I'm not sure if we ever need to do it.
  4. This PR doesn't remove Spider Wolf's build and installation flow. I've added a followup comment in #2440 (comment) to keep track of this. I think it's worth to cut Spider from our build flow for this release, while we can keep the Python side implementation untouched since we may want to remove compression-scheduler all at once.

SPIDER = auto()


class ClpDbNameType(KebabCaseStrEnum):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rust mirrors this config in clp-rust-utils which is not updated:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The rust side has already removed the spider option.

@sitaowang1998

Copy link
Copy Markdown
Contributor Author

TODO and future work are listed as following:

  1. In the user doc here, we still have (if using Celery) labels which should be removed (since Celery is the only option now).

  2. When cross-referencing PRs for Spider Wolf integration, the coding agent found a bug that was missed from the very beginning in this line: self.database_config.name will be an unresolved key; it has been renamed to names. I'm ok for either fixing it in this PR or creating a separate PR for it.

1 and 2 fixed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-py-utils/clp_py_utils/sql_adapter.py`:
- Around line 142-143: Update the logging.exception call surrounding the
database-existence error in the SQL adapter to avoid eager f-string
interpolation: use a logging format placeholder and pass
self.database_config.names[ClpDbNameType.CLP] as a separate argument, preserving
the existing message.
🪄 Autofix

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 Plus

Run ID: 601ae902-24af-40ed-ac92-a59e61e9576d

📥 Commits

Reviewing files that changed from the base of the PR and between 04f996e and 373d1c7.

📒 Files selected for processing (2)
  • components/clp-py-utils/clp_py_utils/sql_adapter.py
  • docs/src/user-docs/guides-docker-compose-deployment.md

Comment thread components/clp-py-utils/clp_py_utils/sql_adapter.py Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
components/clp-tdl-package/src/task/compression/compress.rs (2)

406-411: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clear an inherited AWS_SESSION_TOKEN when no token is selected.

s3_credential_env only adds AWS_SESSION_TOKEN when credentials contain a token, but run_log_converter and run_clp_s inherit the parent environment by default. This lets the child keep the parent token while using different access credentials. Clear the child environment or explicitly remove AWS_SESSION_TOKEN before applying the resolved credentials.

🤖 Prompt for 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.

In `@components/clp-tdl-package/src/task/compression/compress.rs` around lines 406
- 411, Update the environment setup in the compression credential flow around
s3_credential_env so AWS_SESSION_TOKEN is explicitly cleared or removed when
session_token is absent, while preserving the existing insertion when a token is
present. Ensure run_log_converter and run_clp_s receive the resolved credentials
without inheriting an unrelated parent session token.

384-401: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Bind or refresh short-lived default credentials for clp-s.

Default AwsAuthentication::Default resolves one credential set and passes only AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN to clp-s. clp-s authenticates with these env vars directly, not through the AWS SDK provider chain. If the default provider returns an expiring role or session credential and the compression task outlives it, the child will keep using the stale credentials and fail. Pass an expiring credential boundary as the clp-s timeout, or refresh the child credentials during the run.

🤖 Prompt for 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.

In `@components/clp-tdl-package/src/task/compression/compress.rs` around lines 384
- 401, Update the AwsAuthentication::Default credential handoff in the
compression task so clp-s does not retain stale short-lived credentials:
propagate the resolved credential expiration as the child’s timeout boundary, or
refresh and rebind the AWS environment credentials before they expire. Preserve
the existing access key, secret key, and optional session token values while
ensuring long-running compression remains authenticated.
🤖 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.

Outside diff comments:
In `@components/clp-tdl-package/src/task/compression/compress.rs`:
- Around line 406-411: Update the environment setup in the compression
credential flow around s3_credential_env so AWS_SESSION_TOKEN is explicitly
cleared or removed when session_token is absent, while preserving the existing
insertion when a token is present. Ensure run_log_converter and run_clp_s
receive the resolved credentials without inheriting an unrelated parent session
token.
- Around line 384-401: Update the AwsAuthentication::Default credential handoff
in the compression task so clp-s does not retain stale short-lived credentials:
propagate the resolved credential expiration as the child’s timeout boundary, or
refresh and rebind the AWS environment credentials before they expire. Preserve
the existing access key, secret key, and optional session token values while
ensuring long-running compression remains authenticated.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c602d59a-9050-48d4-aed9-eef7714ad2b4

📥 Commits

Reviewing files that changed from the base of the PR and between 373d1c7 and 4110823.

📒 Files selected for processing (1)
  • components/clp-tdl-package/src/task/compression/compress.rs

@LinZhihao-723 LinZhihao-723 changed the title feat(spider)!: Remove legacy Spider Docker compose orchestration. feat(spider)!: Remove legacy Spider Docker Compose orchestration. Aug 6, 2026
@LinZhihao-723 LinZhihao-723 changed the title feat(spider)!: Remove legacy Spider Docker Compose orchestration. feat(spider)!: Remove legacy Spider support from Docker Compose deployment. Aug 6, 2026

@LinZhihao-723 LinZhihao-723 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • Directly modified the PR title. Notice that it should be "Docker Compose" not "Docker compose".
  • Make sure CI passes before you merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants