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

Tests on opam versions =< 2.3 are failing with solver timeouts #354

Open
shonfeder opened this issue Sep 5, 2024 · 2 comments · Fixed by #357
Open

Tests on opam versions =< 2.3 are failing with solver timeouts #354

shonfeder opened this issue Sep 5, 2024 · 2 comments · Fixed by #357
Assignees

Comments

@shonfeder
Copy link
Contributor

A handful of tests fail with solver timeouts on many package PRs. See, e.g., ocaml/opam-repository#26473 (comment)

Using opam 2.3 along with configuring opam to use the 0install solver (e.g., in #343) has been a big a help in reducing solver timeouts, but the problem still persists, and it creates false positives in the repo CI and slows down package publication. It could also mask genuine test failures.

We still run tests on opam 2.0, 2.1, and 2.2, since those are available on some distros, so we cannot simply switch all tests over to using this approach (see #352). An alternative approach proposed by @mtelvers in #342 is to increase the timeout.

@shonfeder shonfeder changed the title Tests are failing with solver timeouts Tests failing with solver timeouts Sep 5, 2024
shonfeder added a commit to shonfeder/opam-repo-ci that referenced this issue Sep 17, 2024
Trying to fix ocurrent#354.
Recreates ocurrent#342 (for which the branch has been deleted).

If this timeout is long enough, it will address the timeouts on opam
2.0, 2.1, and 2.2, since this env var has been supported at least since 2.0:
https://github.com/ocaml/opam/blob/7d4a0f2e0fefe748efbd7358775b1a0bd8267544/src/solver/opamSolverConfig.ml#L131-L132

This can increase the build time of some tests, but I think it should be
worth it if it can give proper results:

- Only few builds (~3) per PR run on these older opam versions.
- We are wasting a lot of cumulative preson time having to check the CI
- results for PR that should be green if the CI wasn't giving these
  (arguably) false negatives.
@shonfeder shonfeder self-assigned this Sep 17, 2024
@shonfeder shonfeder changed the title Tests failing with solver timeouts Tests on opam versions =< 2.3 are failing with solver timeouts Sep 17, 2024
punchagan pushed a commit to shonfeder/opam-repo-ci that referenced this issue Sep 19, 2024
Trying to fix ocurrent#354.
Recreates ocurrent#342 (for which the branch has been deleted).

If this timeout is long enough, it will address the timeouts on opam
2.0, 2.1, and 2.2, since this env var has been supported at least since 2.0:
https://github.com/ocaml/opam/blob/7d4a0f2e0fefe748efbd7358775b1a0bd8267544/src/solver/opamSolverConfig.ml#L131-L132

This can increase the build time of some tests, but I think it should be
worth it if it can give proper results:

- Only few builds (~3) per PR run on these older opam versions.
- We are wasting a lot of cumulative preson time having to check the CI
- results for PR that should be green if the CI wasn't giving these
  (arguably) false negatives.
@shonfeder shonfeder reopened this Oct 27, 2024
@shonfeder
Copy link
Contributor Author

An easy, and I think reasonable, way to reduce the negative impact from this is just to not report solver failures as test failures. I think this is the right approach since, solver failures (especially on the old opam versions) hare not due to any defect or problem in the packages.

@SGrondin
Copy link

A few years ago I had decent results by using aspcud as an external solver for OPAM whenever it would start taking too long to find a solution. Maybe that could be useful here?

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 a pull request may close this issue.

2 participants