Skip to content

Conversation

vincenzopalazzo
Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo commented Aug 13, 2025

Sometimes it is nice to have a fixup commit and be able to run the tests without having to pass clippy or other repo rules passing before running the e2e tests.

Built in #98, but independent from it

Summary by CodeRabbit

  • Chores

    • CI updated to decouple linting from tests: tests no longer wait on linting; linting runs after builds complete across platforms.
    • Linting now runs with strict warnings to enforce code quality post-build.
  • Notes

    • No user-facing changes; app behavior and public APIs remain unchanged.

Copy link

coderabbitai bot commented Aug 13, 2025

Walkthrough

CI workflow updated: clippy was removed from the initial gating position and decoupled from tests; unit-tests and e2e-tests no longer depend on clippy. A new clippy job was added at the bottom that runs after wasm_ubuntu and wasm_macos, using stable toolchain, rust-cache, all targets/features and -D warnings.

Changes

Cohort / File(s) Summary of changes
CI Workflow
.github/workflows/ci.yml
Removed the initial/clippy gating job; removed needs: [clippy] from unit-tests and e2e-tests; added a new clippy job at the bottom that depends on wasm_ubuntu and wasm_macos and runs cargo clippy --all-targets --all-features -- -D warnings using stable toolchain and rust-cache.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant GH as GitHub Actions
  participant UT as unit-tests
  participant E2E as e2e-tests
  participant WU as wasm_ubuntu
  participant WM as wasm_macos
  participant CL as clippy

  rect rgba(200,200,255,0.20)
  note over GH: New CI flow (clippy decoupled)
  GH->>UT: Run
  GH->>E2E: Run
  GH->>WU: Run
  GH->>WM: Run
  par Builds finish independently
    UT-->>GH: Complete
    E2E-->>GH: Complete
    WU-->>GH: Complete
    WM-->>GH: Complete
  end
  GH->>CL: Run after WU & WM complete
  CL-->>GH: Lint results (-D warnings)
  end
Loading
sequenceDiagram
  autonumber
  participant GH as GitHub Actions
  participant CL as clippy
  participant UT as unit-tests
  participant E2E as e2e-tests

  rect rgba(255,230,200,0.20)
  note over GH: Prior CI flow (clippy gated)
  GH->>CL: Run first
  CL-->>GH: Complete
  GH->>UT: Run (needed clippy)
  GH->>E2E: Run (needed clippy)
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5f8121e and 438bc44.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml
⏰ 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). (2)
  • GitHub Check: clippy
  • GitHub Check: e2e-tests (v0.7.0) / build-tests
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch macros/ci-fix--

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit 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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

run: RUST_BACKTRACE=1 cargo test --workspace --exclude ark-secp256k1

e2e-tests:
needs: [ clippy ]
Copy link
Collaborator

Choose a reason for hiding this comment

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

The downside of this change though is that the e2e-tests will run twice if there was a clippy error.

Copy link
Collaborator Author

@vincenzopalazzo vincenzopalazzo Aug 14, 2025

Choose a reason for hiding this comment

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

The downside of this change though is that the e2e-tests will run twice if there was a clippy error.

true, but I think it is important to have prototype code able to run e2e without focusing of crap clippy warning, will a git pre-commit hook addressing your concern?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think what we could do is have a step in ci.yml which ensures that the tests build with or without warnings (before running the clippy step). Then we can replace clippy here, to know that the e2e tests can actually run, which I think is the main purpose of this needs declaration.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mh, do you think that the clippy could be the last step of the CI? I mean looks like just the right command for the final touch.

What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm okay with this tbh.

What do you think, @bonomat?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Personally, I always optimize for CI-minute usage, i.e. run the fastest checks first and not run long tasks first which will need to run again if a short one fails.
Assuming clippy fails, you will need to push again and we will run the whole e2e tests again (even if they succeeded in the first run).

Long story short: I'm not convinced 😅 we shouldn't use CI as a unit or e2e test testbed (also given they are sometimes flaky).

@vincenzopalazzo
Copy link
Collaborator Author

Rebased on master and implemented the version described in #103 (comment)

The reason to implement #103 (comment) is that I would like to run and build the e2e before caring about the clippy warnings that are important for the general sanity of the code base, but not essential to make a PoC like I was doing in #98

Please let me know what do you think

Sometimes it is nice to have a fixup commit and be able to
run the tests without having to pass clippy or other repo rules
passing before running the e2e tests.

In other works clippy is a final touch check from the code
prospective, so probably make sense move to the end.

Signed-off-by: Vincenzo Palazzo <[email protected]>
@vincenzopalazzo
Copy link
Collaborator Author

Make sense the point of @bonomat in #103 (comment), so closing this and I will keep this for reference, no need to spend more brain cycle on this :D

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.

3 participants