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

fix: go-corset running test in CI #1554

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

DavePearce
Copy link
Collaborator

@DavePearce DavePearce commented Nov 24, 2024

This disables the use of parallel forks in gradle unless this is
explicitly requested. The issue is that parallel forks interferes with
go-corset which is highly concurrent. Hence, running go-corset tasks in
parallel can (in some cases) lead to out-of-resource issues and workflow
tasks being cancelled unexpectedly.

However, since using parallel forks does improve the runtime for Rust
corset, this option is retained when specifically specified via the
UNIT_TESTS_PARALLELISM environment variable.

@DavePearce DavePearce linked an issue Nov 24, 2024 that may be closed by this pull request
@DavePearce DavePearce force-pushed the 1553-fix-go-corset-in-fastreplaytests1 branch from 0dd151d to 0848a6b Compare November 24, 2024 22:43
@DavePearce DavePearce force-pushed the 1553-fix-go-corset-in-fastreplaytests1 branch 4 times, most recently from 187dd4d to 04658a7 Compare November 25, 2024 01:27
@DavePearce DavePearce enabled auto-merge (squash) November 25, 2024 02:49
@DavePearce DavePearce force-pushed the 1553-fix-go-corset-in-fastreplaytests1 branch from 04658a7 to 77266ff Compare November 25, 2024 03:09
gradle/tests.gradle Show resolved Hide resolved
@DavePearce DavePearce force-pushed the 1553-fix-go-corset-in-fastreplaytests1 branch 2 times, most recently from 5238276 to f9dccd4 Compare November 25, 2024 20:29
This disables the use of parallel forks in gradle unless this is
explicitly requested.  The issue is that parallel forks interferes with
go-corset which is highly concurrent.  Hence, running go-corset tasks in
parallel can (in some cases) lead to out-of-resource issues and workflow
tasks being cancelled unexpectedly.

However, since using parallel forks does improve the runtime for Rust
corset, this option is retained when specifically specified via the
REPLAY/WEEKLY/REFERENCE_TESTS_PARALLELISM environment variables.
This allows the level of parallelism used for the unit tests to be
configured via an environment variable `UNIT_TESTS_PARALLELISM`.
Specifically, if this is left unset then no parallelism is used (which
is desirable when running go-corset).
@DavePearce DavePearce force-pushed the 1553-fix-go-corset-in-fastreplaytests1 branch from f9dccd4 to 649c0b0 Compare November 26, 2024 06:40
Comment on lines +121 to +127
if (System.getenv().containsKey("UNIT_TESTS_PARALLELISM")) {
// Only set this if parallelism is explicitly requested.
// Specifically, because this option is not compatible with
// go-corset.
maxParallelForks = System.getenv().get("UNIT_TESTS_PARALLELISM").toInteger()
println "Enabled parallel forks."
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (System.getenv().containsKey("UNIT_TESTS_PARALLELISM")) {
// Only set this if parallelism is explicitly requested.
// Specifically, because this option is not compatible with
// go-corset.
maxParallelForks = System.getenv().get("UNIT_TESTS_PARALLELISM").toInteger()
println "Enabled parallel forks."
}
System.getenv().getOrDefault("UNIT_TESTS_PARALLELISM", "1").toInteger())

@DavePearce DavePearce merged commit dd28bd9 into arith-dev Nov 26, 2024
5 checks passed
@DavePearce DavePearce deleted the 1553-fix-go-corset-in-fastreplaytests1 branch November 26, 2024 08:04
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.

Fix go-corset in fastReplayTests1
2 participants