-
Notifications
You must be signed in to change notification settings - Fork 0
feat: rewrite go-runner to use overlay files #49
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
feat: rewrite go-runner to use overlay files #49
Conversation
There was a problem hiding this comment.
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 rewrites the go-runner implementation to use overlay files instead of the previous templating approach. The main changes include removing large testing packages (hugo and caddy) from the test suite and restructuring the runner's architecture.
Key changes:
- Rewrote go-runner to use an overlay-based architecture for handling Go benchmark files
- Removed hugo and caddy test projects (hugo: slow CI builds, caddy: benchmark crashes)
- Deleted multiple quicktest and slogassert package files and their associated tests
- Simplified test utilities and CLI argument handling
Reviewed changes
Copilot reviewed 111 out of 362 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go-runner/src/runner/overlay/templates.rs | Added new template system for overlay files with placeholders for instrument hooks and profile directories |
| go-runner/tests/utils.rs | Simplified test utilities, removing package-specific helpers in favor of CLI-based approach |
| go-runner/tests/pkg_arg.rs | Updated tests to use simplified CLI interface, removed dry_run parameter |
| go-runner/tests/error_file.rs | Migrated from args-based to CLI-based test execution |
| go.mod | Removed dependencies for testing frameworks (go-cmp, kr/pretty) |
| pkg/quicktest/, pkg/slogassert/ | Removed entire testing utility packages |
| go-runner/src/utils.rs | Deleted utility functions for directory copying and git operations |
| go-runner/src/snapshots/* | Updated benchmark result snapshots to reflect new package ordering |
| go-runner/src/main.rs | Fixed profile_dir type conversion in main runner call |
| go-runner/src/builder/snapshots/* | Removed mixed import styles test snapshot |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merging this PR will improve performance by 18.67%
Performance Changes
Comparing Footnotes
|
1140bd3 to
2357078
Compare
6c21740 to
2ca1bed
Compare
art049
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm overall, nice to see deletions.
|
To avoid conflict with modcache, you could run each of those test in a temp directory, just like we do for integration tests in codspeed-rust |
GuillaumeLagrange
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, apart from the modcache issue, where Arthur's suggestion should do fine
| .join(project_name); | ||
|
|
||
| if !can_build_project(&project_dir) { | ||
| warn!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is integration tests, shouldnt we just fail here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I don't think we can remove this. Or at least it will not be as clean as just those few lines.
The main reason we do it like this is because some projects only work with 1.25+ which then would break the integration test for 1.24. In order to fix it, we'd have to add an additional check in ci.yml where we exclude tests 1.25-only tests from running with GO1.24.
With the can_build_project we could just skip it and always run with all the go versions (which seems a bit simpler). I could add a comment explaining why we do this, then we wouldn't need to handle each case separately. Wdyt?
9de28d9 to
3e1c66c
Compare
It's super slow, taking alone around 15-20 minutes which isn't ideal for CI. Since we are using the `go test` CLI now, the other tests will cover all of the edge cases and we can safely remove it.
It's unstable and panics in one of the benchmarks, which makes the overall test fail. We shouldn't try to handle this, it has to be fixed upstream.
…c ordering It's possible for two benchmarks to have the same name, which causes non-deterministic ordering in the benchmarks.
This avoid infinite recursions since the runner tries to intercept and forward `go test` executions to the `go-runner`
3e1c66c to
59c0bda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 89 out of 367 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
GuillaumeLagrange
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Changes in this PR:
go-runnerFixes #46