Skip to content

Conversation

@lklimek
Copy link
Contributor

@lklimek lklimek commented Jan 23, 2026

Issue being fixed or feature implemented

When running rs-drive-abci tests, almost 200 MB of logs is generated.

What was done?

For crates:

  • rs-drive-abci
  • rs-sdk

Logs are suppressed unless:

  • error occurs, or
  • ACTIONS_STEP_DEBUG or ACTIONS_RUNNER_DEBUG env var is true

How Has This Been Tested?

Run cargo test -p drive-abci.

Then run ACTIONS_STEP_DEBUG=true cargo test -p drive-abci

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • Tests

    • Enhanced test logging infrastructure with centralized configuration and conditional output routing based on environment variables.
    • Improved resource allocation by increasing stack size limits for specific test suites to prevent stack overflow issues.
  • Refactor

    • Refactored test logging initialization to use a unified helper function for consistent behavior across test suites.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

The changes refactor test logging initialization to support conditional log output routing. A new TestWriter destination variant is introduced to the logging system with environment-variable-based logic to emit test logs to either stdout or a test writer. Stack size attributes are also added to specific test functions to increase per-thread stack space.

Changes

Cohort / File(s) Summary
Logging Destination Infrastructure
packages/rs-drive-abci/src/logging/destination.rs
Introduces TestWriter variant to LogDestination and LogDestinationWriter enums with corresponding Display, From<&str>, and TryFrom implementations. Wires TestWriter through the logging destination conversion pipeline and adds tracing_subscriber prelude import.
Logging Initialization Helper
packages/rs-drive-abci/src/logging/mod.rs, packages/rs-sdk/tests/fetch/common.rs
Adds should_emit_test_logs_to_stdout() helper function (duplicated across packages) that determines log destination based on ACTIONS_STEP_DEBUG or ACTIONS_RUNNER_DEBUG environment variables. Refactors test logging setup to conditionally route output to stdout or TestWriter.
Test Configuration Migration
packages/rs-drive-abci/src/execution/validation/.../block_based.rs
Replaces manual tracing_subscriber configuration with centralized drive_abci::logging::init_for_tests helper call, consolidating test logging setup.
Test Stack Size Annotations
packages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rs, packages/rs-drive-abci/tests/strategy_tests/test_cases/identity_and_document_tests.rs
Adds #[stack_size(4 * 1024 * 1024)] attributes to multiple test functions to increase per-thread stack space allocation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 whiskers twitch with logging glee,
Test writers route where they should be,
Stack grows tall, from here to there,
Debug logs float through GitHub's air!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: suppressing tracing logs in test output for drive-abci. It is specific, clear, and directly reflects the primary objective of the PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ 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

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

@github-actions
Copy link

github-actions bot commented Jan 23, 2026

✅ gRPC Query Coverage Report

================================================================================
gRPC Query Coverage Report - NEW QUERIES ONLY
================================================================================

Total queries in proto: 53
Previously known queries: 47
New queries found: 6

================================================================================

New Query Implementation Status:
--------------------------------------------------------------------------------
✓ getAddressInfo                                /home/runner/work/platform/platform/packages/rs-sdk/src/platform/query.rs
✓ getAddressesBranchState                       /home/runner/work/platform/platform/packages/rs-sdk/src/platform/address_sync/mod.rs
✓ getAddressesInfos                             /home/runner/work/platform/platform/packages/rs-sdk/src/platform/fetch_many.rs
✓ getAddressesTrunkState                        /home/runner/work/platform/platform/packages/rs-sdk/src/platform/query.rs
✓ getRecentAddressBalanceChanges                /home/runner/work/platform/platform/packages/rs-sdk/src/platform/query.rs
✓ getRecentCompactedAddressBalanceChanges       /home/runner/work/platform/platform/packages/rs-sdk/src/platform/query.rs

================================================================================
Summary:
--------------------------------------------------------------------------------
New queries implemented: 6 (100.0%)
New queries missing: 0 (0.0%)

Total known queries: 53
  - Implemented: 50
  - Not implemented: 2
  - Excluded: 1

Not implemented queries:
  - getConsensusParams
  - getTokenPreProgrammedDistributions

@lklimek lklimek force-pushed the test/suppress-successful-test-output branch from 44729d8 to 2b6b165 Compare January 23, 2026 12:40
@lklimek lklimek changed the base branch from featupdate-platform-address-hrp to v3.1-dev January 23, 2026 12:40
@github-actions github-actions bot added this to the v3.1.0 milestone Jan 23, 2026
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