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

ci: enable snapshot testing #5037

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/edr-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ jobs:
- name: Run benchmark
run: pnpm run -s benchmark

# - name: Validate regressions
# run: pnpm run -s verify
- name: Validate regressions
run: pnpm run -s verify

- name: Generate report for github-action-benchmark
run: pnpm run -s report | tee report.json
Expand Down
8 changes: 8 additions & 0 deletions crates/tools/js/benchmark/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ async function verify(benchmarkResultPath) {
));

for (let scenarioName in snapshotResult) {
// Snapshot testing is unreliable for these scenarios
if (
scenarioName.includes("openzeppelin") ||
Copy link
Member

Choose a reason for hiding this comment

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

Could this be related to #5036 (comment)?

Copy link
Member Author

@agostbiro agostbiro Mar 28, 2024

Choose a reason for hiding this comment

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

Thanks good idea, but I don't think so. I updated the openzeppelin scenario to a version in this PR that was collected after Franco's PR to fix the issue in openzeppelin landed: OpenZeppelin/openzeppelin-contracts#4942

Copy link
Member

Choose a reason for hiding this comment

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

Just an FYI, when I enabled logging for a repo - that suffers from the described problem - and compared the generated logs, the order of calls wasn't deterministic. This was a sign to me that tests were being executed in parallel.

This might be a relatively straightforward way of testing the hypothesis for other repos.

scenarioName.includes("neptune-mutual")
) {
continue;
}

let snapshotFailures = new Set(snapshotResult[scenarioName].failures);
let benchFailures = new Set(benchmarkResult[scenarioName].failures);

Expand Down
Binary file not shown.
Binary file not shown.
Loading