Skip to content

fix: reduce resources consumption in ci - #2462

Merged
tac0turtle merged 1 commit into
mainfrom
marko/2425
Jul 14, 2025
Merged

fix: reduce resources consumption in ci#2462
tac0turtle merged 1 commit into
mainfrom
marko/2425

Conversation

@tac0turtle

@tac0turtle tac0turtle commented Jul 14, 2025

Copy link
Copy Markdown
Contributor

Overview

This pr reduces the amount of nodes we run and increases the timeout in order to try to make ci more consistent

closes #2425

Summary by CodeRabbit

  • Tests
    • Reduced the number of nodes involved in a transaction gossiping test for improved efficiency.
    • Adjusted synchronization and shutdown timing to better match the new test configuration.

@coderabbitai

coderabbitai Bot commented Jul 14, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

The integration test TestTxGossipingMultipleNodesNoDA was updated to use fewer nodes (3 instead of 4), reduce the number of blocks for synchronization, and increase the shutdown timeout. The test logic and structure remain unchanged, with adjustments made for stability and timing.

Changes

File(s) Change Summary
node/full_node_integration_test.go Reduced node count, decreased block sync target, increased shutdown timeout in TestTxGossipingMultipleNodesNoDA

Sequence Diagram(s)

sequenceDiagram
    participant Sequencer
    participant FullNode1
    participant FullNode2
    participant Test

    Test->>Sequencer: Start sequencer node
    Sequencer-->>Test: Wait for first block
    Test->>FullNode1: Start full node 1
    Test->>FullNode2: Start full node 2
    Test->>Sequencer: Inject transaction
    Sequencer-->>FullNode1: Gossip transaction/block
    Sequencer-->>FullNode2: Gossip transaction/block
    FullNode1-->>Test: Reach target block height
    FullNode2-->>Test: Reach target block height
    Test->>Sequencer: Shutdown
    Test->>FullNode1: Shutdown
    Test->>FullNode2: Shutdown
    Test-->>Test: Assert all nodes synchronized
Loading

Assessment against linked issues

Objective (Issue #) Addressed Explanation
Improve integration test stability to reduce flakiness (#2425)

Suggested reviewers

  • julienrbrt

Poem

Three nodes now dance, not four in line,
Fewer blocks to count, more time to shine.
The tests grow strong, the flakiness fades,
Rabbits rejoice in stable upgrades!
🐇✨


📜 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 f57fbb9 and 998ecee.

📒 Files selected for processing (1)
  • node/full_node_integration_test.go (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*_test.go

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
**/*.go

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
🧠 Learnings (2)
📓 Common learnings
Learnt from: Manav-Aggarwal
PR: rollkit/rollkit#2280
File: sequencers/based/sequencer_test.go:89-89
Timestamp: 2025-05-26T10:26:59.799Z
Learning: In DummyDA test cases, the height ticker (StartHeightTicker/StopHeightTicker) is not needed for tests that don't rely on time-based height progression, such as TestSequencer_GetNextBatch_ExceedsMaxDrift which only tests max drift behavior without requiring height advancement over time.
node/full_node_integration_test.go (2)
Learnt from: tzdybal
PR: rollkit/rollkit#1875
File: da/da_test.go:88-88
Timestamp: 2025-01-27T22:03:14.288Z
Learning: In the rollkit codebase, the `github.com/rollkit/go-da` package is imported with different aliases in test (`da`) and production code (`goDA`), but they refer to the same package. Suggestions to change between these aliases are unnecessary as they don't affect functionality.
Learnt from: Manav-Aggarwal
PR: rollkit/rollkit#2280
File: sequencers/based/sequencer_test.go:89-89
Timestamp: 2025-05-26T10:26:59.799Z
Learning: In DummyDA test cases, the height ticker (StartHeightTicker/StopHeightTicker) is not needed for tests that don't rely on time-based height progression, such as TestSequencer_GetNextBatch_ExceedsMaxDrift which only tests max drift behavior without requiring height advancement over time.
⏰ 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). (9)
  • GitHub Check: lint / markdown-lint
  • GitHub Check: test / Run Integration Tests
  • GitHub Check: test / Run Unit Tests
  • GitHub Check: test / Build Rollkit Docker Image
  • GitHub Check: test / Build Rollkit EVM Single Docker Image
  • GitHub Check: test / Build All Rollkit Binaries
  • GitHub Check: Analyze (rust)
  • GitHub Check: Analyze (go)
  • GitHub Check: Summary
🔇 Additional comments (4)
node/full_node_integration_test.go (4)

17-17: Documentation update aligns with implementation changes.

The comment accurately reflects the reduced node count (3 nodes: 1 sequencer, 2 full nodes) and maintains clear test documentation.


23-23: Node count reduction achieves CI resource optimization.

Reducing from 4 to 3 nodes effectively decreases resource consumption while maintaining sufficient test coverage for multi-node transaction gossiping and synchronization scenarios.


51-51: Block count reduction optimizes test duration.

Reducing the blocks to wait for from 5 to 3 is appropriate for this test scenario. With 3 nodes, waiting for 3 blocks is sufficient to verify that transaction injection and multi-node synchronization work correctly.


58-58: Timeout increase improves CI stability.

Doubling the shutdown timeout from 5 to 10 seconds provides better stability in CI environments where resource constraints might cause slower shutdown processes, reducing flaky test failures.

✨ Finishing Touches
  • 📝 Generate Docstrings

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.

@github-actions

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow CI and Release / buf-check (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedJul 14, 2025, 8:43 AM

@tac0turtle
tac0turtle marked this pull request as ready for review July 14, 2025 08:43

@gemini-code-assist gemini-code-assist 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.

Summary of Changes

Hello @tac0turtle, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on optimizing the Continuous Integration (CI) pipeline by reducing resource consumption and improving test consistency. It achieves this by modifying an existing integration test to use fewer simulated nodes and adjusting timeouts to make the test more reliable.

Highlights

  • CI Resource Optimization: Reduced the number of simulated nodes in the TestTxGossipingMultipleNodesNoDA integration test from 4 (1 sequencer, 3 full nodes) to 3 (1 sequencer, 2 full nodes). This aims to decrease resource consumption during CI runs.
  • Test Consistency Improvement: Adjusted parameters within the TestTxGossipingMultipleNodesNoDA integration test to improve its consistency. This includes reducing the number of blocks to wait for from 5 to 3, and increasing the shutdownAndWait timeout from 5 seconds to 10 seconds, allowing more time for graceful node shutdown.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@tac0turtle
tac0turtle enabled auto-merge July 14, 2025 08:44

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request reduces resource consumption in CI by decreasing the number of nodes and blocks used in the TestTxGossipingMultipleNodesNoDA integration test. It also increases the shutdown timeout to improve test stability.

Comment thread node/full_node_integration_test.go
@codecov

codecov Bot commented Jul 14, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.09%. Comparing base (f57fbb9) to head (998ecee).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2462      +/-   ##
==========================================
- Coverage   73.15%   73.09%   -0.07%     
==========================================
  Files          68       68              
  Lines        6542     6542              
==========================================
- Hits         4786     4782       -4     
- Misses       1359     1362       +3     
- Partials      397      398       +1     
Flag Coverage Δ
combined 73.09% <ø> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@tac0turtle
tac0turtle added this pull request to the merge queue Jul 14, 2025
Merged via the queue into main with commit 173fea5 Jul 14, 2025
32 of 33 checks passed
@tac0turtle
tac0turtle deleted the marko/2425 branch July 14, 2025 09:02
@github-project-automation github-project-automation Bot moved this to Done in Evolve Jul 14, 2025
@tac0turtle tac0turtle removed this from Evolve Aug 25, 2025
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.

test: integration tests are flaky

2 participants