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

Retry LSP tests in case of error #5342

Merged
merged 4 commits into from
Apr 19, 2024
Merged

Conversation

atomb
Copy link
Member

@atomb atomb commented Apr 19, 2024

Description

This PR changes how the language server unit tests execute, retrying them up to three times if they fail. Ultimately, this is what we're doing by hand, anyway, so we might as well automate it.

The proper solution to this problem is to ensure that the language server tests don't spuriously fail, but this will accelerate our development process in the meantime.

How has this been tested?

By running CI normally.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@MikaelMayer
Copy link
Member

Seems like a good compromise, as much as it's an OR of tests and not an AND that would detect instability

@atomb atomb merged commit 44ca1b2 into dafny-lang:master Apr 19, 2024
20 checks passed
@keyboardDrummer
Copy link
Member

keyboardDrummer commented Apr 23, 2024

I think we should revert this change, because it makes it easier for unstable tests to be merged, which is really bad.

What we were already doing was running the IDE tests twice, which makes it more likely that a build will fail if there are unstable tests. This PR achieves the opposite, of making a failure less likely when there are unstable tests. Doing both at the same time, as we are now, is interesting :D

Ultimately, this is what we're doing by hand, anyway, so we might as well automate it.

I think doing it by hand is a mistake. We should fix the instability. I think it's very little work and there is no reason not to put it at the top of the priorities.

The reason we haven't done it I think is because it's too easy to rerun the tests. I think ideally we would run the IDE tests not twice but a 100 times, so retrying becomes ineffective.

@atomb
Copy link
Member Author

atomb commented Apr 23, 2024

What we were already doing was running the IDE tests twice, which makes it more likely that a build will fail if there are unstable tests. This PR achieves the opposite, of making a failure less likely when there are unstable tests. Doing both at the same time, as we are now, is interesting :D

We're not doing both at the same time. This PR removes the double execution.

I think doing it by hand is a mistake. We should fix the instability. I think it's very little work and there is no reason not to put it at the top of the priorities.

I entirely agree that we should fix the instability, and that it should be high priority. I'm not as confident that it's easy, however.

Once we think we've fixed it, I think we should remove this retry mechanism. If it's actually very easy, that will be soon. :)

@keyboardDrummer
Copy link
Member

keyboardDrummer commented Apr 23, 2024

Okay.. well I still think we should revert this. With this PR we are much more at risk of introducing instabilities, which not only impacts development speed but can only be customer affecting bugs.

keyboardDrummer added a commit to keyboardDrummer/dafny that referenced this pull request Apr 25, 2024
keyboardDrummer added a commit that referenced this pull request Apr 30, 2024
This reverts commit 44ca1b2.

### Description
The recently merged PR #5342
argues that we should automatically retry failing IDE tests, because
that's what we manually do anyways. However, we only do that in some
cases. Specifically, when any of us make changes that may create
unstable tests, such as changes in the IDE, then failing IDE tests
should not be retried, manually or automatically. PR5342 makes it so
that such a retry happens automatically, thereby making it much easier
to introduce non-deterministic bugs either in IDE code or tests. That's
why this PR is reverting that one.

IMO there is little difference between a test that fails 100% of the
time and one that fails <100% of the time. Retrying a failing test that
fails <100% of the time is similar to saying "I believe my PR is not at
fault for this test failing, please ignore it". A similar situation
occurs when a PR gets merged that causes nightly to fail. However then
we don't have a way for new PRs to say "please ignore nightly failing",
and we explicitly block all PR until nightly is fixed again. A similar
approach to unstable tests would be to not to retry failing builds until
the instability is resolved, but instead to wait until an instability
fix PR is merged.

### How has this been tested?
It's a revert.

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
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.

None yet

3 participants