-
Notifications
You must be signed in to change notification settings - Fork 81
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
Implement hs-lib@repl test as integration_test #1692
Conversation
@k1nkreet It looks like CI is failing with a couple instances of
Maybe worth asking on BuildBuddy Slack for some help. |
There was a discussion on the BuildBuddy slack about month ago about exactly the same issue occurred when "running multiple bazel invocations one after the other in github actions". Here is the fixes proposed in the thread:
And for the question "is --keep_backend_build_event_connections_alive=false affects builds performance" the answer was given:
|
@k1nkreet Thank you for digging into this. Yes, either option is worth a shot. |
https://github.com/tweag/rules_haskell/blob/master/.bazelrc#L67 It looks like we've already tried to fix exactly same problem with the second solution :) |
.github/workflows/workflow.yaml
Outdated
@@ -50,6 +50,7 @@ jobs: | |||
nix-shell --arg docTools false --pure --run ' | |||
set -euo pipefail | |||
./tests/run-start-script.sh --use-nix | |||
bazel shutdown | |||
bazel build //tests:run-tests | |||
./bazel-ci-bin/tests/run-tests |
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.
One issue might be that tests/run-tests
runs a couple Bazel commands as well.
…ng to" This reverts commit 82db9bc.
I've found out this test wasn't supposed to be passing on macos-bindist because |
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.
Good work, thank you!
A couple minor comments. Feel free to merge once addressed.
@@ -29,6 +29,7 @@ jobs: | |||
env: | |||
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} | |||
run: | | |||
[[ ${{ runner.os }} == Linux ]] && sudo sysctl -w net.ipv4.tcp_keepalive_time=60 |
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.
[[ ${{ runner.os }} == Linux ]] && sudo sysctl -w net.ipv4.tcp_keepalive_time=60 | |
# Avoid failures of the form `deadline exceeded after 14999958197ns DEADLINE_EXCEEDED`. | |
# See https://github.com/tweag/rules_haskell/issues/1498 and https://github.com/tweag/rules_haskell/pull/1692. | |
[[ ${{ runner.os }} == Linux ]] && sudo sysctl -w net.ipv4.tcp_keepalive_time=60 |
@@ -77,6 +78,7 @@ jobs: | |||
env: | |||
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} | |||
run: | | |||
sudo sysctl -w net.ipv4.tcp_keepalive_time=60 |
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.
sudo sysctl -w net.ipv4.tcp_keepalive_time=60 | |
# Avoid failures of the form `deadline exceeded after 14999958197ns DEADLINE_EXCEEDED`. | |
# See https://github.com/tweag/rules_haskell/issues/1498 and https://github.com/tweag/rules_haskell/pull/1692. | |
sudo sysctl -w net.ipv4.tcp_keepalive_time=60 |
@@ -121,6 +123,7 @@ jobs: | |||
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} | |||
shell: bash | |||
run: | | |||
[[ ${{ runner.os }} == Linux ]] && sudo sysctl -w net.ipv4.tcp_keepalive_time=60 |
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.
[[ ${{ runner.os }} == Linux ]] && sudo sysctl -w net.ipv4.tcp_keepalive_time=60 | |
# Avoid failures of the form `deadline exceeded after 14999958197ns DEADLINE_EXCEEDED`. | |
# See https://github.com/tweag/rules_haskell/issues/1498 and https://github.com/tweag/rules_haskell/pull/1692. | |
[[ ${{ runner.os }} == Linux ]] && sudo sysctl -w net.ipv4.tcp_keepalive_time=60 |
}, | ||
local_snapshot = "@rules_haskell//:stackage_snapshot.yaml", | ||
packages = [ | ||
"array", |
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.
Nit: Looks like there is some inconsistent indentation.
], | ||
}, | ||
local_snapshot = "@rules_haskell//:stackage_snapshot.yaml", | ||
packages = [ |
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.
Do we really need all these packages, or could this be slimmed down a bit?
func TestMain(m *testing.M) { | ||
it.TestMain(m, ` | ||
-- WORKSPACE -- | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
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.
Perhaps some of this boilerplate could be factored out?
Doesn't have to be in this PR, but, once we see what's common across these tests, it would make sense to factor that out.
Since #1645 is merged we can gradually implement integration tests from
RunTests.hs
asintegration_test
rules. Here we have hs-lib@repl test scenario reimplemented this way