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

Ecosystem-wide test suite for solver conformance #13861

Open
2 of 14 tasks
jaimergp opened this issue Apr 25, 2024 · 7 comments
Open
2 of 14 tasks

Ecosystem-wide test suite for solver conformance #13861

jaimergp opened this issue Apr 25, 2024 · 7 comments
Assignees
Labels
epic a highlevel collection of smaller related issues solver::behavior pertains to the solver's behavior solver pertains to the solver type::testing issues about tests or the test infrastructure

Comments

@jaimergp
Copy link
Contributor

Checklist

  • I added a descriptive title
  • I searched open issues and couldn't find a duplicate

What?

We propose creating a backend agnostic collection of test cases so different members of the ecosystem (e.g. conda’s own classic and libmamba solvers, but also external tools like micromamba and pixi) can assess their compliance to the underspecified solver behavior “expected” by the conda community.

Why?

  • The solver tests for conda are spread across different parts of the test suite as unit and integration tests. In many cases, they incur IO overheads that are not necessary and cause a general slowdown of the test suite completion and development feedback loop.
  • The PyPI ecosystem has already set a precedent in this aspect (see https://github.com/zanieb/packse and https://github.com/pradyunsg/pip-resolver-benchmarks), and the conda ecosystem should also step up.

User impact

More consistent behavior across solvers

Goals

  • Set a dedicated repository with solver test cases
  • Integrate it in conda/conda
  • Integrate it in conda/conda-libmamba-solver

Tasks

  • Create repository
  • Design test case schema. Should be declarative and language agnostic (e.g. YAML or JSON)
  • Create / consolidate test data (repodata, channels, etc) so there's no need to access live channels.
  • Audit conda/conda for potential test cases
  • Audit conda/conda-libmamba-solver for potential test cases
  • Audit mamba-org/mamba for potential test cases
  • Audit mamba-org/rattler for potential test cases
  • Consolidate audits and write table of test cases with assumed inputs and expected outcomes
  • Implement test cases

This epic is blocked by:

N/A

This epic blocks:

N/A

@jaimergp jaimergp added solver pertains to the solver epic a highlevel collection of smaller related issues solver::behavior pertains to the solver's behavior type::testing issues about tests or the test infrastructure labels Apr 25, 2024
@jjerphan
Copy link

Thank you for starting the discussions, @jaimergp.

Set a dedicated repository with solver test cases

Which GitHub organization should welcome this repository to you?

@jaimergp
Copy link
Contributor Author

Which GitHub organization should welcome this repository to you?

I was assuming we would start in conda-incubator.

@jjerphan
Copy link

Design test case schema. Should be declarative and language agnostic (e.g. YAML or JSON)

Would conda environment YAML specifications be sufficient?

@jaimergp
Copy link
Contributor Author

jaimergp commented Aug 14, 2024

I'm afraid that's only one possible input. I was picturing a schema where we can express things like:

  • Input packages:
    • List of MatchSpecs
    • Installed packages
    • History
    • Aggressive updates
    • Pins
    • Non-manageable dependencies
  • Action(s) (create/install/update/remove)
  • Solver flags (no-deps, only-deps, update-all, freeze-installed)
  • Channels and priorities
  • Subdirs
  • Expected list of records (fully resolved environment; aka lockfile contents)

A single test case might take more than one action.

@jjerphan
Copy link

Thank you for those pieces of information.

For full disclosure and as discussed with @zklaus, I am interested in this PR being resolved, but I am leaving Klaus resolve it since he is assigned to it.

@jaimergp
Copy link
Contributor Author

@zklaus has started a repo with some prototypes and pytest plugins at https://github.com/zklaus/pytest-conda-solvers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic a highlevel collection of smaller related issues solver::behavior pertains to the solver's behavior solver pertains to the solver type::testing issues about tests or the test infrastructure
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants