Skip to content

refactor: use stack_size macro in tests - #2902

Merged
lklimek merged 5 commits into
feat/platformAddressesfrom
test(drive-abci)--macro-to-define-stack-size-in-tests
Dec 16, 2025
Merged

lklimek merged 5 commits into
feat/platformAddressesfrom
test(drive-abci)--macro-to-define-stack-size-in-tests

Conversation

@lklimek

@lklimek lklimek commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Some of our tests run out of stack space.
A workaround is to manually start new thread for each of them, but it's not very convenient.

What was done?

  1. Added #[stack_size(BYTES)] macro that can be used to annotate test functions
  2. Renamed crate rs-dapi-grpc-macros to rs-dash-platform-macros to have one place for utility proc macros in the project

How Has This Been Tested?

github actions should pass

Breaking Changes

None

Renamed crate is internal so it should have no impact.

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

@coderabbitai

coderabbitai Bot commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test(drive-abci)--macro-to-define-stack-size-in-tests

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

github-actions Bot commented Dec 16, 2025 •

Copy link
Copy Markdown
Contributor

✅ gRPC Query Coverage Report

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

Total queries in proto: 49
Previously known queries: 47
New queries found: 2

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

New Query Implementation Status:
--------------------------------------------------------------------------------
✓ getAddressInfo                                /home/runner/work/platform/platform/packages/rs-sdk/src/platform/query.rs
✓ getAddressesInfos                             /home/runner/work/platform/platform/packages/rs-sdk/src/platform/fetch_many.rs

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

Total known queries: 49
  - Implemented: 46
  - Not implemented: 2
  - Excluded: 1

Not implemented queries:
  - getConsensusParams
  - getTokenPreProgrammedDistributions

@github-actions

github-actions Bot commented Dec 16, 2025 •

Copy link
Copy Markdown
Contributor

✅ DashSDKFFI.xcframework built for this PR.

SwiftPM (host the zip at a stable URL, then use):

.binaryTarget(
  name: "DashSDKFFI",
  url: "https://your.cdn.example/DashSDKFFI.xcframework.zip",
  checksum: "596050833a3dd3600cacfa12cb82a8d3f61d13a1ead3ae044a01719de47a5059"
)

Xcode manual integration:

  • Download 'DashSDKFFI.xcframework' artifact from the run link above.
  • Drag it into your app target (Frameworks, Libraries & Embedded Content) and set Embed & Sign.
  • If using the Swift wrapper package, point its binaryTarget to the xcframework location or add the package and place the xcframework at the expected path.

@lklimek

lklimek commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

…t(drive-abci)--macro-to-define-stack-size-in-tests
@lklimek
lklimek merged commit fcd5f2e into feat/platformAddresses Dec 16, 2025
@lklimek
lklimek deleted the test(drive-abci)--macro-to-define-stack-size-in-tests branch December 16, 2025 13:19

Copilot AI 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.

Pull request overview

This PR refactors test infrastructure by introducing a #[stack_size] macro to handle stack overflow issues in tests and renames the rs-dapi-grpc-macros crate to rs-dash-platform-macros to better reflect its expanded scope.

Key Changes:

  • Introduced #[stack_size(BYTES)] attribute macro to run test functions with custom stack sizes
  • Renamed crate from rs-dapi-grpc-macros to rs-dash-platform-macros across the entire codebase
  • Replaced manual thread spawning in three tests with the new stack_size macro

Reviewed changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/rs-dapi-grpc-macros/src/lib.rs Added stack_size proc macro attribute implementation
packages/rs-dapi-grpc-macros/Cargo.toml Renamed crate to dash-platform-macros
packages/rs-drive-abci/tests/strategy_tests/test_cases/identity_and_document_tests.rs Applied stack_size macro to three tests, removing manual thread spawning
packages/rs-drive-abci/tests/strategy_tests/stack_size.rs Added stack size logging utilities for debugging
packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs Added BlockInfo import
packages/rs-sdk/Cargo.toml Updated dependency from dapi-grpc-macros to dash-platform-macros
packages/dapi-grpc/Cargo.toml Updated dependency reference
packages/dapi-grpc/build.rs Updated macro paths in code generation
Multiple package files Updated references from dapi_grpc_macros to dash_platform_macros
Dockerfile Updated build paths for renamed crate
Cargo.toml Updated workspace member
.github/package-filters/*.yml Updated CI filter paths for renamed crate

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@thephez thephez added this to the v3.0 milestone Dec 22, 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.

4 participants