Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[indexer-alt] pruning tests for kv_epoch_ends and pipelines that don't need CpSeqeuenceNumbers #20925

Merged
merged 8 commits into from
Jan 22, 2025

Conversation

wlmyng
Copy link
Contributor

@wlmyng wlmyng commented Jan 19, 2025

Description

Extend TestCheckpointDataBuilder to advance an epoch by creating an advance epoch tx with or without the SystemEpochInfoEvent depending on safe_mode. Usage:

        let mut builder = TestCheckpointDataBuilder::new(0);
        let checkpoint = Arc::new(builder.advance_epoch(true));
        let values = KvEpochEnds.process(&checkpoint).unwrap();
        KvEpochEnds::commit(&values, &mut conn).await.unwrap();

I had originally considered extending the current tx workflow of builder.start_transaction() to then .advance_epoch().build_checkpoint(), but ultimately kept it standalone as we'd largely be discarding modifications if any made to the current transaction. A user can still create multiple transactions for the checkpoint, and after .finish_transaction(), would call advance_epoch() instead of build_checkpoint().

This saves us from having to use simulacrum to test epoch-boundary behavior (and dealing with potential flakiness)

Test plan

New tests written


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Copy link

vercel bot commented Jan 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 5:45am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2025 5:45am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2025 5:45am

@wlmyng wlmyng force-pushed the indexer-alt-prune-tests-epoch branch from 59bc8ef to fd7e3e1 Compare January 19, 2025 00:45
@wlmyng wlmyng temporarily deployed to sui-typescript-aws-kms-test-env January 19, 2025 00:46 — with GitHub Actions Inactive
Base automatically changed from indexer-alt-prune-tests to main January 21, 2025 18:42
@wlmyng wlmyng temporarily deployed to sui-typescript-aws-kms-test-env January 22, 2025 01:01 — with GitHub Actions Inactive
@wlmyng wlmyng changed the title [indexer-alt] pruning tests for epoch-related pipelines [indexer-alt] pruning tests for kv_epoch_ends and pipelines that don't need CpSeqeuenceNumbers Jan 22, 2025
@wlmyng wlmyng marked this pull request as ready for review January 22, 2025 01:15
@wlmyng wlmyng temporarily deployed to sui-typescript-aws-kms-test-env January 22, 2025 01:15 — with GitHub Actions Inactive
@wlmyng wlmyng temporarily deployed to sui-typescript-aws-kms-test-env January 22, 2025 01:41 — with GitHub Actions Inactive
@wlmyng wlmyng temporarily deployed to sui-typescript-aws-kms-test-env January 22, 2025 05:44 — with GitHub Actions Inactive
@wlmyng wlmyng merged commit c769fa5 into main Jan 22, 2025
51 checks passed
@wlmyng wlmyng deleted the indexer-alt-prune-tests-epoch branch January 22, 2025 07:15
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