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

Don't run stack test on Buildkite #2961

Merged
merged 2 commits into from
Oct 13, 2021
Merged

Conversation

sevanspowell
Copy link
Contributor

@sevanspowell sevanspowell commented Oct 8, 2021

Reduce flakiness of CI by not running Stack test step in Buildkite pipeline.

@jonathanknowles reported a flaky Stack test run in this build: https://buildkite.com/input-output-hk/cardano-wallet/builds/17155#77dce73e-664a-4bb6-9e6b-d5a898a47d5d.

One way we can reduce this flakiness is by not running the tests in the Buildkite pipeline.

My argument for doing so it that doing so adds very little to our test coverage:

The differences between the two invocations are:

  1. One uses Cabal to build and run, the other Stack.
  2. The Nix environment provided to each invocation is ever-so-slightly different.

So what we are testing by invoking the tests twice is:

  • That given the same tests, Stack succeeds iff Cabal succeeds.
  • The Nix environment provided to the tests of the Stack build work.

For 1, I believe that this isn't something we care to test. This will only find bugs in Stack. For 2, We aren't removing the Stack build step, just the Stack test step, we are still testing that the Stack build works in the given Nix environment.

I do foresee some risks:

  • We might make some environment or configuration modification that causes the Stack tests to fail, but not the Cabal tests. The CI would pass but for those developing locally with Stack, their tests would fail. I can't imagine under what circumstances this would happen, but it's a theoretical possibility.

- The `stack test` on Buildkite is flaky, and arguably, doesn't add much to our
  test coverage. Don't run the tests on Buildkite to avoid this.
@sevanspowell sevanspowell force-pushed the feature/dont-run-tests-buildkite branch from 73aaa46 to 85634f0 Compare October 8, 2021 08:46
@sevanspowell sevanspowell changed the title WIP Don't run stack test on Buildkite Oct 8, 2021
@sevanspowell sevanspowell self-assigned this Oct 8, 2021
@sevanspowell sevanspowell marked this pull request as ready for review October 8, 2021 09:03
Copy link
Contributor

@piotr-iohk piotr-iohk left a comment

Choose a reason for hiding this comment

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

Let's add Hydra badge to the readme also maybe.

@sevanspowell
Copy link
Contributor Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 13, 2021

Build succeeded:

@iohk-bors iohk-bors bot merged commit 1f9809d into master Oct 13, 2021
@iohk-bors iohk-bors bot deleted the feature/dont-run-tests-buildkite branch October 13, 2021 04:59
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.

3 participants