-
Notifications
You must be signed in to change notification settings - Fork 14
feat: integration test batching with timing-based auto-balancing #1132
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
base: main
Are you sure you want to change the base?
Conversation
Implements 4-way test splitting for integration tests across all OS platforms using hashicorp-forge/go-test-split-action with JUnit XML timing data. Changes: - Add gotestsum tool to Makefile for JUnit XML generation - Split integration-tests job into 4 parallel batches per OS (12 total jobs) - Download timing data from main branch for intelligent test distribution - Add combine-test-summaries job to merge timing reports (main branch only) - Preserve all platform-specific setup (Xvfb, clipboard tools, Pact) - First run uses even file-count split, subsequent runs use timing-based balancing Implementation follows hashicorp-forge/go-test-split-action recommended pattern: - Individual splits upload node-summary.xml per batch - Separate job merges reports using junit-report-merger - Main branch provides canonical timing baseline for all PRs - 90-day retention for merged timing data, 1-day for individual splits
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Summary of ChangesHello @nick-y-snyk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the integration test infrastructure by implementing a robust batching and load-balancing mechanism. It aims to improve test efficiency and feedback speed by distributing integration tests across multiple parallel jobs, intelligently balancing the workload based on historical timing data. This change also integrates Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces test batching for integration tests using gotestsum to improve CI performance. However, a significant security concern is the use of the latest version tag for gotestsum, which can lead to non-deterministic builds and increases the risk of supply chain attacks by automatically pulling potentially compromised upstream packages. To ensure robust dependency management, build stability, and reproducibility, it's crucial to pin gotestsum to a specific version, aligning with the established practice for other tools in the Makefile.
| OVERRIDE_GOCI_LINT_V := v2.6.1 | ||
| GOLICENSES_V := v1.6.0 | ||
| PACT_V := 2.4.2 | ||
| GOTESTSUM_V := latest |
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.
The GOTESTSUM_V variable is set to latest, which causes the go install command to pull the most recent version of the tool every time the tools target is run. This introduces non-determinism into the build process and poses a supply chain risk. If the upstream gotestsum package is compromised, the malicious version will be automatically incorporated into the build environment. To ensure build stability and reproducibility, it is recommended to pin the version to a specific, verified tag, consistent with the other tools defined in this Makefile (e.g., OVERRIDE_GOCI_LINT_V, GOLICENSES_V).
GOTESTSUM_V := v1.12.0
Summary
Implements 4-way test splitting for integration tests across all OS platforms using hashicorp-forge/go-test-split-action with JUnit XML timing data for intelligent load balancing.
Changes
Makefile
gotestsumtool installation target.bin/directoryGitHub Actions Workflow
split-index: [0, 1, 2, 3]dimension (12 total jobs: 3 OS × 4 batches)dawidd6/action-download-artifact@v6hashicorp-forge/go-test-split-action@v1for intelligent distributionnode-summary.xmlto unique artifactcombine-test-summariesjob merges 4 splits per OS (main branch only)Implementation Pattern
Follows hashicorp-forge/go-test-split-action recommended setup:
Testing Notes
First run behavior:
Workaround for this PR:
branch: mainto test without main baselineExpected Results
Acceptance Criteria Coverage
From tech-spec:
/cc @snyk/hammerhead