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

improve internal_indexer_test.rs and error it gives #15109

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

igor-aptos
Copy link
Contributor

Description

When changing something in the framework, that changes genesis (even new stdlib module), this test fails cryptically:

thread 'test_db_indexer_data' panicked at execution/executor/tests/internal_indexer_test.rs:196:5:
assertion `left == right` failed
  left: 151
 right: 152

Changing it so that:

  • error message is clearer
  • fixing it is clearer (instead of just changing number - you modify the key that your PR changes)

How Has This Been Tested?

unit tested on PRs changing genesis

Type of Change

  • Tests

Copy link

trunk-io bot commented Oct 29, 2024

⏱️ 1h 46m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
execution-performance / single-node-performance 47m 🟩🟩
execution-performance / test-target-determinator 10m 🟩🟩
test-target-determinator 9m 🟩🟩
check 8m 🟩🟩
rust-cargo-deny 5m 🟩🟩🟩
rust-doc-tests 5m 🟩
rust-doc-tests 5m 🟩
check-dynamic-deps 4m 🟩🟩🟩
fetch-last-released-docker-image-tag 3m 🟩🟩
rust-move-tests 2m 🟩
rust-move-tests 2m 🟩
rust-move-tests 2m 🟩
semgrep/ci 1m 🟩🟩🟩
general-lints 1m 🟩🟩🟩
file_change_determinator 36s 🟩🟩🟩

🚨 1 job on the last run was significantly faster/slower than expected

Job Duration vs 7d avg Delta
execution-performance / test-target-determinator 5m 4m +28%

settingsfeedbackdocs ⋅ learn more about trunk.io


fn assert_vec_eq<T: Eq + Debug>(left: &[T], right: &[T]) {
for i in 0..left.len().min(right.len()) {
assert_eq!(left[i], right[i], "difference at position {}", i);
Copy link
Contributor

Choose a reason for hiding this comment

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

why not print the item out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

assert_eq will print them out itself.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm dumb.

@igor-aptos igor-aptos enabled auto-merge (rebase) October 29, 2024 19:16

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@igor-aptos igor-aptos force-pushed the igor/improve_indexer_test branch from 1e46aa5 to e06d788 Compare October 29, 2024 23:00

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on e06d7885c974821e2f084da9e5693e05df628dee

two traffics test: inner traffic : committed: 14414.72 txn/s, latency: 2755.47 ms, (p50: 2700 ms, p70: 2700, p90: 2900 ms, p99: 3100 ms), latency samples: 5480800
two traffics test : committed: 100.03 txn/s, latency: 1734.32 ms, (p50: 1400 ms, p70: 1400, p90: 1600 ms, p99: 11000 ms), latency samples: 1660
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 1.961, avg: 1.545", "ConsensusProposalToOrdered: max: 0.324, avg: 0.295", "ConsensusOrderedToCommit: max: 0.373, avg: 0.362", "ConsensusProposalToCommit: max: 0.668, avg: 0.657"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.88s no progress at version 2930843 (avg 0.20s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 8.49s no progress at version 2930841 (avg 8.49s) [limit 15].
Test Ok

Copy link
Contributor

✅ Forge suite framework_upgrade success on 9c922ebe94f5ff4b58df4617f3ff003e2ce10ccd ==> e06d7885c974821e2f084da9e5693e05df628dee

Compatibility test results for 9c922ebe94f5ff4b58df4617f3ff003e2ce10ccd ==> e06d7885c974821e2f084da9e5693e05df628dee (PR)
Upgrade the nodes to version: e06d7885c974821e2f084da9e5693e05df628dee
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1154.82 txn/s, submitted: 1156.97 txn/s, failed submission: 2.15 txn/s, expired: 2.15 txn/s, latency: 2967.71 ms, (p50: 2700 ms, p70: 3000, p90: 5100 ms, p99: 6500 ms), latency samples: 96600
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1188.26 txn/s, submitted: 1190.75 txn/s, failed submission: 2.48 txn/s, expired: 2.48 txn/s, latency: 2587.97 ms, (p50: 2400 ms, p70: 2700, p90: 4200 ms, p99: 6000 ms), latency samples: 105360
5. check swarm health
Compatibility test for 9c922ebe94f5ff4b58df4617f3ff003e2ce10ccd ==> e06d7885c974821e2f084da9e5693e05df628dee passed
Upgrade the remaining nodes to version: e06d7885c974821e2f084da9e5693e05df628dee
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1123.30 txn/s, submitted: 1125.29 txn/s, failed submission: 1.99 txn/s, expired: 1.99 txn/s, latency: 2654.92 ms, (p50: 2400 ms, p70: 3000, p90: 4200 ms, p99: 5800 ms), latency samples: 101640
Test Ok

Copy link
Contributor

✅ Forge suite compat success on 9c922ebe94f5ff4b58df4617f3ff003e2ce10ccd ==> e06d7885c974821e2f084da9e5693e05df628dee

Compatibility test results for 9c922ebe94f5ff4b58df4617f3ff003e2ce10ccd ==> e06d7885c974821e2f084da9e5693e05df628dee (PR)
1. Check liveness of validators at old version: 9c922ebe94f5ff4b58df4617f3ff003e2ce10ccd
compatibility::simple-validator-upgrade::liveness-check : committed: 13754.21 txn/s, latency: 2337.40 ms, (p50: 1900 ms, p70: 2000, p90: 3000 ms, p99: 9000 ms), latency samples: 525120
2. Upgrading first Validator to new version: e06d7885c974821e2f084da9e5693e05df628dee
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 6366.35 txn/s, latency: 4381.34 ms, (p50: 4800 ms, p70: 5200, p90: 5500 ms, p99: 5700 ms), latency samples: 115580
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 6352.53 txn/s, latency: 5109.98 ms, (p50: 5500 ms, p70: 5800, p90: 6500 ms, p99: 6900 ms), latency samples: 208940
3. Upgrading rest of first batch to new version: e06d7885c974821e2f084da9e5693e05df628dee
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 5661.95 txn/s, latency: 5060.50 ms, (p50: 5900 ms, p70: 6100, p90: 6200 ms, p99: 6400 ms), latency samples: 109760
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 5674.08 txn/s, latency: 5781.63 ms, (p50: 6400 ms, p70: 6600, p90: 6800 ms, p99: 7000 ms), latency samples: 198200
4. upgrading second batch to new version: e06d7885c974821e2f084da9e5693e05df628dee
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 7598.83 txn/s, latency: 3595.22 ms, (p50: 3300 ms, p70: 4200, p90: 5900 ms, p99: 7000 ms), latency samples: 142540
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 7823.68 txn/s, latency: 4002.90 ms, (p50: 3200 ms, p70: 5100, p90: 6500 ms, p99: 7300 ms), latency samples: 264200
5. check swarm health
Compatibility test for 9c922ebe94f5ff4b58df4617f3ff003e2ce10ccd ==> e06d7885c974821e2f084da9e5693e05df628dee passed
Test Ok

@igor-aptos igor-aptos merged commit 2d6f3f5 into main Oct 29, 2024
48 checks passed
@igor-aptos igor-aptos deleted the igor/improve_indexer_test branch October 29, 2024 23:30
@igor-aptos igor-aptos mentioned this pull request Nov 21, 2024
22 tasks
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