Skip to content

[ISSUE #5990]🔨Add CI workflow for RocketMQ Dashboard with checks, formatting, and testing#5991

Closed
mxsm wants to merge 5 commits intomainfrom
feat-5990
Closed

[ISSUE #5990]🔨Add CI workflow for RocketMQ Dashboard with checks, formatting, and testing#5991
mxsm wants to merge 5 commits intomainfrom
feat-5990

Conversation

@mxsm
Copy link
Owner

@mxsm mxsm commented Jan 31, 2026

Which Issue(s) This PR Fixes(Closes)

Brief Description

How Did You Test This Change?

Summary by CodeRabbit

  • Chores
    • Added continuous integration workflow for automated code quality checks and cross-platform testing.
    • Updated dependency management to improve compatibility and stability.

✏️ Tip: You can customize this high-level summary in your review settings.

@rocketmq-rust-bot
Copy link
Collaborator

🔊@mxsm 🚀Thanks for your contribution🎉!

💡CodeRabbit(AI) will review your code first🔥!

Note

🚨The code review suggestions from CodeRabbit are to be used as a reference only, and the PR submitter can decide whether to make changes based on their own judgment. Ultimately, the project management personnel will conduct the final code review💥.

@rocketmq-rust-robot rocketmq-rust-robot added the feature🚀 Suggest an idea for this project. label Jan 31, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 2026

Walkthrough

These changes establish a comprehensive GitHub Actions CI pipeline for the RocketMQ Dashboard project and resolve dependency version conflicts by pinning specific core-graphics packages to a consistent git source.

Changes

Cohort / File(s) Summary
CI Workflow Setup
.github/workflows/dashboard-ci.yml
Adds GitHub Actions workflow with check job (cargo fmt and clippy validation) and build-test job executing cross-platform builds and tests across Ubuntu, macOS, and Windows with conditional OS-specific dependency installation.
Dependency Management
Cargo.toml
Introduces [patch.crates-io] section pinning core-graphics and core-graphics-types to a specific git revision from servo/core-foundation-rs to unify version resolution.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰 A workflow now hatched in the CI pipeline bright,
Cross platforms aligned—Ubuntu, Mac, Windows alight!
Linting and testing hop through each line,
Dependencies patched, dependencies fine,
The dashboard hops forward with newfound delight! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes a minor out-of-scope change: dependency patching in Cargo.toml to pin core-graphics versions, which appears unrelated to the CI workflow objective. Either justify the core-graphics patch as necessary infrastructure for the CI workflow or move it to a separate PR focused on dependency management.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly references Issue #5990 and clearly summarizes the main changes: adding a CI workflow for RocketMQ Dashboard with checks, formatting, and testing.
Linked Issues check ✅ Passed The PR successfully implements all coding requirements from issue #5990: adds a CI workflow with automated checks (formatting and Clippy lint), code formatting validation, and cross-platform testing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-5990

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 and usage tips.

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

🤖 Fix all issues with AI agents
In @.github/workflows/dashboard-ci.yml:
- Around line 6-13: The workflow's path filters ('paths' entries under push and
pull_request) restrict runs to 'rocketmq-dashboard/**' and the workflow file,
which can miss changes in shared workspace crates; update the 'paths' for both
push and pull_request to also include shared workspace files (e.g.,
'Cargo.toml', 'Cargo.lock', and any shared crate paths) or remove the path
filters entirely so the dashboard CI triggers on changes to root workspace
manifests and shared crates; ensure you update both the push and pull_request
sections in .github/workflows/dashboard-ci.yml where the 'paths' arrays are
defined.

Comment on lines 6 to 13
paths:
- 'rocketmq-dashboard/**'
- '.github/workflows/dashboard-ci.yml'
pull_request:
branches: [ main, rocketmq-*-dev ]
paths:
- 'rocketmq-dashboard/**'
- '.github/workflows/dashboard-ci.yml'
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Path filters may skip dashboard CI when shared workspace crates change.

If the dashboard depends on crates outside rocketmq-dashboard/**, changes there won’t trigger this workflow. Consider expanding the path filters to include shared workspace files (e.g., root Cargo.toml/Cargo.lock or other shared crate paths) or remove the filter to avoid missing regressions.

🔧 Example adjustment
   push:
     branches: [ main, rocketmq-*-dev ]
     paths:
       - 'rocketmq-dashboard/**'
+      - 'Cargo.toml'
+      - 'Cargo.lock'
       - '.github/workflows/dashboard-ci.yml'
   pull_request:
     branches: [ main, rocketmq-*-dev ]
     paths:
       - 'rocketmq-dashboard/**'
+      - 'Cargo.toml'
+      - 'Cargo.lock'
       - '.github/workflows/dashboard-ci.yml'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
paths:
- 'rocketmq-dashboard/**'
- '.github/workflows/dashboard-ci.yml'
pull_request:
branches: [ main, rocketmq-*-dev ]
paths:
- 'rocketmq-dashboard/**'
- '.github/workflows/dashboard-ci.yml'
paths:
- 'rocketmq-dashboard/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/dashboard-ci.yml'
pull_request:
branches: [ main, rocketmq-*-dev ]
paths:
- 'rocketmq-dashboard/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/dashboard-ci.yml'
🤖 Prompt for AI Agents
In @.github/workflows/dashboard-ci.yml around lines 6 - 13, The workflow's path
filters ('paths' entries under push and pull_request) restrict runs to
'rocketmq-dashboard/**' and the workflow file, which can miss changes in shared
workspace crates; update the 'paths' for both push and pull_request to also
include shared workspace files (e.g., 'Cargo.toml', 'Cargo.lock', and any shared
crate paths) or remove the path filters entirely so the dashboard CI triggers on
changes to root workspace manifests and shared crates; ensure you update both
the push and pull_request sections in .github/workflows/dashboard-ci.yml where
the 'paths' arrays are defined.

@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.63%. Comparing base (173852f) to head (dcbd07c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5991      +/-   ##
==========================================
- Coverage   40.63%   40.63%   -0.01%     
==========================================
  Files         870      870              
  Lines      121650   121650              
==========================================
- Hits        49436    49433       -3     
- Misses      72214    72217       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@rocketmq-rust-bot rocketmq-rust-bot left a comment

Choose a reason for hiding this comment

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

LGTM - All CI checks passed ✅

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

🤖 Fix all issues with AI agents
In @.github/workflows/dashboard-ci.yml:
- Around line 45-48: Change the floating nightly channel in rust-toolchain.toml
to a pinned date format (e.g., channel = "nightly-YYYY-MM-DD") so CI and local
dev use the same known-good toolchain; then in the GitHub Actions workflow
ensure both rust-toolchain steps include the components by adding a with: block
listing components: rustfmt, clippy (the existing step at lines ~45–48 already
has this, so add the same with: components to the later step around lines
~101–103) so clippy/rustfmt are installed in all CI jobs.

Comment on lines +45 to +48
- name: Set up Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

dtolnay rust-toolchain action nightly pinning best practices

💡 Result:

Best practices for nightly pinning with dtolnay/rust-toolchain (GitHub Actions)

  1. Pin nightly by date for reproducibility

    • Put a pinned toolchain in repo (recommended): rust-toolchain.toml with channel = "nightly-YYYY-MM-DD" (plus components/targets as needed). This makes local dev + CI consistent. [2]
    • Rust toolchain names officially support nightly-YYYY-MM-DD archive dates. [3]
  2. Don’t use floating nightly unless you want daily changes

    • uses: dtolnay/rust-toolchain@nightly intentionally tracks “current nightly” (can break any day). The action chooses the Rust toolchain based on the action’s @rev. [1]
  3. If you need a pinned nightly in CI, use @master + toolchain:

    • When you pass an explicit toolchain: input (like nightly-2025-01-01), the project recommends using dtolnay/rust-toolchain@master as the action revision. [1]
    • Example:
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: nightly-2025-01-01
          components: clippy, rustfmt
          targets: wasm32-unknown-unknown
  4. Pin the action itself for supply-chain safety

    • Best practice is to pin GitHub Actions by full commit SHA; dtolnay/rust-toolchain notes that the SHA must be from the history of master (otherwise it may be garbage-collected and your workflow can break). [1]
  5. Automate upgrades of your pinned toolchain

    • Dependabot can now open PRs for toolchain bumps when you define versions in rust-toolchain.toml / rust-toolchain. [4]

Rule of thumb: pin nightly by date for reliability; update it intentionally (manually or via Dependabot), and keep “floating nightly” only for an extra CI job that’s allowed to fail.

Sources: [1] [2] [3] [4]


🏁 Script executed:

# Read the workflow file to inspect lines 45-48 and 101-103
fd "dashboard-ci.yml" --type f | head -5

Repository: mxsm/rocketmq-rust

Length of output: 44


🏁 Script executed:

cat -n .github/workflows/dashboard-ci.yml | sed -n '40,55p; 96,108p'

Repository: mxsm/rocketmq-rust

Length of output: 1133


🏁 Script executed:

find . -name "rust-toolchain.toml" -o -name "rust-toolchain" | head -10

Repository: mxsm/rocketmq-rust

Length of output: 83


🏁 Script executed:

cat -n rust-toolchain.toml

Repository: mxsm/rocketmq-rust

Length of output: 107


Pin Rust nightly to a known-good date to stabilize CI across local development and workflows.

The repo already has a rust-toolchain.toml with channel = "nightly" (floating). Instead of pinning in the GitHub Action, update rust-toolchain.toml to channel = "nightly-YYYY-MM-DD" with a specific date. This keeps dev and CI consistent and allows Dependabot to automate updates.

Also, lines 101–103 are missing a with: block to include the same components (rustfmt, clippy) as lines 45–48.

🤖 Prompt for AI Agents
In @.github/workflows/dashboard-ci.yml around lines 45 - 48, Change the floating
nightly channel in rust-toolchain.toml to a pinned date format (e.g., channel =
"nightly-YYYY-MM-DD") so CI and local dev use the same known-good toolchain;
then in the GitHub Actions workflow ensure both rust-toolchain steps include the
components by adding a with: block listing components: rustfmt, clippy (the
existing step at lines ~45–48 already has this, so add the same with: components
to the later step around lines ~101–103) so clippy/rustfmt are installed in all
CI jobs.

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

🤖 Fix all issues with AI agents
In `@rocketmq-dashboard/Cargo.toml`:
- Around line 48-52: The current [patch.crates-io] block is invalid because it
points to crates.io versions; remove the core-graphics/core-graphics-types
entries from the [patch.crates-io] section and instead unify versions by adding
them under the workspace (e.g., add a [workspace.dependencies] block with
core-graphics = "0.25" and core-graphics-types = "0.2"), then update member
Cargo.toml files that depend on these crates to use core-graphics = { workspace
= true } and core-graphics-types = { workspace = true }; if you truly need a
fork, replace the entries in [patch.crates-io] with a git/path source (e.g.,
core-graphics = { git = "..." }) instead of a plain version.

@mxsm mxsm closed this Feb 1, 2026
@rocketmq-rust-bot rocketmq-rust-bot added approved PR has approved and removed ready to review waiting-review waiting review this PR labels Feb 1, 2026
@mxsm mxsm deleted the feat-5990 branch February 22, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI review first Ai review pr first approved PR has approved auto merge feature🚀 Suggest an idea for this project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature🚀] Add CI workflow for RocketMQ Dashboard with checks, formatting, and testing

3 participants