Skip to content

Conversation

@sitaowang1998
Copy link
Collaborator

@sitaowang1998 sitaowang1998 commented Jul 14, 2025

Description

As title.

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

task docs:site builds successfully and local website from task docs:serve looks as expected.

Summary by CodeRabbit

  • Documentation
    • Added a new architecture overview page outlining the components and design principles of the Spider system.
    • Updated the developer documentation index with a link to the new architecture overview for easier navigation.

@sitaowang1998 sitaowang1998 requested a review from a team as a code owner July 14, 2025 02:33
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 14, 2025

Walkthrough

A new architecture documentation file for the Spider system was added, detailing its components, design, and fault tolerance. The developer documentation index was updated to include a link to this new architecture page, along with a description and navigation entry. No code or API changes were made.

Changes

File(s) Change Summary
docs/src/dev-docs/architecture.md Added a new document describing Spider's architecture, components, data abstraction, and fault tolerance.
docs/src/dev-docs/index.md Added a grid card and navigation entry linking to the new architecture documentation.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Storage
    participant Scheduler
    participant Worker

    Client->>Storage: Submit job / Query results
    Scheduler->>Storage: Heartbeat / Fetch state
    Worker->>Scheduler: Request task
    Scheduler->>Worker: Assign task
    Worker->>Storage: Fetch inputs
    Worker->>Worker: Execute task
    Worker->>Storage: Store outputs
    Worker->>Storage: Heartbeat
    Scheduler->>Storage: Heartbeat

    Note over Scheduler, Storage: On failure, Scheduler restarts and fetches state
    Note over Scheduler, Worker: On worker failure, Scheduler detects and recovers tasks
Loading

Suggested reviewers

  • kirkrodrigues

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b2236b4 and 872dc00.

📒 Files selected for processing (1)
  • docs/src/dev-docs/architecture.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/src/dev-docs/architecture.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: lint
  • GitHub Check: non-storage-unit-tests (ubuntu-24.04)
  • GitHub Check: non-storage-unit-tests (ubuntu-22.04)

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
docs/src/dev-docs/index.md (1)

9-15: Minor wording & ordering tweaks will polish the new navigation card

  1. The description line already contains the word “Architecture”, so the heading + description pair currently reads “Architecture / Architecture overview of Spider.” – consider re-phrasing the description to avoid the immediate word repetition.
  2. In the hidden toctree, inserting the new architecture entry above testing keeps the list alphabetically ordered (current style throughout the docs).
-Architecture overview of Spider.
+Overview of Spider’s architecture.

These are purely cosmetic, but they improve readability and maintain consistency.

Also applies to: 27-28

docs/src/dev-docs/architecture.md (3)

13-15: Fix typo “Spdier” → “Spider” & tighten sentence

-`Spdier` relies on a fault-tolerant and ACID storage, e.g. MariaDB, to store all the states of the
-system.
+`Spider` relies on fault-tolerant, ACID-compliant storage (e.g., MariaDB) to persist all system state.

45-48: Grammar: add article & preposition for smoother reading

-A worker executes tasks allocated by the scheduler. It runs the following steps in loop:
+A worker executes tasks allocated by the scheduler and runs the following steps in a loop:

75-79: Correct wording in failure-recovery bullet list

-- Identify all the failed tasks inside a job
-- Compute the minimum subgraph that contains the fail tasks where all inputs to the subgraph are
+- Identify all failed tasks within the job
+- Compute the minimal sub-graph that contains the failed tasks where all inputs to the sub-graph are
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fdfd8f2 and 56437dd.

⛔ Files ignored due to path filters (1)
  • docs/src/dev-docs/arch.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • docs/src/dev-docs/architecture.md (1 hunks)
  • docs/src/dev-docs/index.md (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: davidlion
PR: y-scope/spider#100
File: src/spider/worker/worker.cpp:205-230
Timestamp: 2025-04-09T17:15:24.552Z
Learning: Documentation should be added to new functions in the spider codebase, as already discussed with the user.
docs/src/dev-docs/architecture.md (1)
Learnt from: davidlion
PR: y-scope/spider#100
File: src/spider/worker/worker.cpp:205-230
Timestamp: 2025-04-09T17:15:24.552Z
Learning: Documentation should be added to new functions in the spider codebase, as already discussed with the user.
🪛 LanguageTool
docs/src/dev-docs/index.md

[duplication] ~10-~10: Possible typo: you repeated a word.
Context: ... :gutter: 2 :::{grid-item-card} 🔗 architecture Architecture ^^^ Architecture overview of Spider. ::...

(ENGLISH_WORD_REPEAT_RULE)

docs/src/dev-docs/architecture.md

[duplication] ~36-~36: Possible typo: you repeated a word.
Context: ...Worker ID - Heartbeat timestamps ### Scheduler Scheduler is responsible for: - Allocating tasks ...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~53-~53: Possible typo: you repeated a word.
Context: ... only executes one task at a time. ### Client Client communicates only with the storage to s...

(ENGLISH_WORD_REPEAT_RULE)

@sitaowang1998 sitaowang1998 changed the title doc: Add architecture doc in developer guide. docs: Add architecture doc in developer guide. Jul 14, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
docs/src/dev-docs/architecture.md (3)

13-15: Fix typo in component name (“Spdier” → “Spider”)

The very first mention of the storage component spells the project name incorrectly, which looks unpolished in published docs.

-`Spdier` relies on a fault-tolerant …
+`Spider` relies on a fault-tolerant …

46-48: Tighten wording (“in loop” → “in a loop”)

Minor grammar tweak for readability.

-A worker executes tasks allocated by the scheduler. It runs the following steps in loop:
+A worker executes tasks allocated by the scheduler. It runs the following steps in a loop:

75-77: Correct typo in recovery steps (“fail tasks” → “failed tasks”)

-- Compute the minimum subgraph that contains the fail tasks where all inputs to the subgraph are
+- Compute the minimum subgraph that contains the failed tasks where all inputs to the subgraph are
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 56437dd and b2236b4.

📒 Files selected for processing (2)
  • docs/src/dev-docs/architecture.md (1 hunks)
  • docs/src/dev-docs/index.md (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: davidlion
PR: y-scope/spider#100
File: src/spider/worker/worker.cpp:205-230
Timestamp: 2025-04-09T17:15:24.552Z
Learning: Documentation should be added to new functions in the spider codebase, as already discussed with the user.
docs/src/dev-docs/architecture.md (1)
Learnt from: davidlion
PR: y-scope/spider#100
File: src/spider/worker/worker.cpp:205-230
Timestamp: 2025-04-09T17:15:24.552Z
Learning: Documentation should be added to new functions in the spider codebase, as already discussed with the user.
🪛 LanguageTool
docs/src/dev-docs/architecture.md

[duplication] ~36-~36: Possible typo: you repeated a word.
Context: ...Worker ID - Heartbeat timestamps ### Scheduler Scheduler is responsible for: - Allocating tasks ...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~53-~53: Possible typo: you repeated a word.
Context: ... only executes one task at a time. ### Client Client communicates only with the storage to s...

(ENGLISH_WORD_REPEAT_RULE)

docs/src/dev-docs/index.md

[duplication] ~10-~10: Possible typo: you repeated a word.
Context: ... :gutter: 2 :::{grid-item-card} 🔗 architecture Architecture ^^^ Overview of Spider's architecture. ...

(ENGLISH_WORD_REPEAT_RULE)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: lint
  • GitHub Check: non-storage-unit-tests (ubuntu-24.04)
  • GitHub Check: non-storage-unit-tests (ubuntu-22.04)
🔇 Additional comments (1)
docs/src/dev-docs/index.md (1)

9-14: LGTM – new card integrates cleanly

The added Architecture card and toctree entry render fine and follow existing conventions.

Copy link
Member

@LinZhihao-723 LinZhihao-723 left a comment

Choose a reason for hiding this comment

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

Before we move forward: can we use the config from the latest yscope-dev-utils to lint this markdown file manually?
The command:

npx markdownlint-cli2 --config yscope-dev-utils/exports/lint-configs/.markdownlint-cli2.yaml --fix docs/src/dev-docs/architecture.md

Not sure if upgrading dev utils will cause any other issues to the existing tasks. We can use a local version for now.

@sitaowang1998
Copy link
Collaborator Author

@CodeRabbit Please open an issue to upgrade yscope-dev-utils version and add markdown lint tasks.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 14, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@sitaowang1998 I'll create a GitHub issue for upgrading yscope-dev-utils and adding markdown lint tasks.


🏁 Script executed:

#!/bin/bash
# Create a GitHub issue for upgrading yscope-dev-utils and adding markdown lint tasks
gh issue create \
  --title "Upgrade yscope-dev-utils version and add markdown lint tasks" \
  --body "## Description

This issue tracks the need to upgrade the \`yscope-dev-utils\` version and add markdown lint tasks to improve the documentation workflow and quality.

## Tasks

- [ ] Upgrade \`yscope-dev-utils\` to the latest version
- [ ] Add markdown lint tasks to the development workflow
- [ ] Ensure markdown linting is properly configured for the documentation files
- [ ] Update any related documentation or configuration files

## Context

This issue was created as a follow-up to PR #163 which added architecture documentation to the developer guide.

## Backlinks

- Related PR: https://github.com/y-scope/spider/pull/163
- Requested by: @sitaowang1998" \
  --assignee sitaowang1998

Length of output: 826


Perfect! I've successfully created GitHub issue #164 for upgrading yscope-dev-utils version and adding markdown lint tasks.

Issue created: #164

The issue includes:

The issue is now ready for you to work on when convenient!


🧠 Learnings used
Learnt from: davidlion
PR: y-scope/spider#100
File: src/spider/worker/worker.cpp:205-230
Timestamp: 2025-04-09T17:15:24.552Z
Learning: Documentation should be added to new functions in the spider codebase, as already discussed with the user.

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