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

Fix test_mulled_build.py::test_mulled_build_files_cli with use_mamba=True #19545

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

kysrpex
Copy link
Contributor

@kysrpex kysrpex commented Feb 5, 2025

Just a quick attempt at reducing the amount of failing tests, feel free to step in with a better solution.


Test tests/tool_util/mulled/test_mulled_build.py::test_mulled_build_files_cli[True], where [True] refers to the parameter use_mamba, fails because if conda install --quiet --yes 'mamba=' (the preinstall command) runs before mamba install -p /usr/local, then the latter expects either /usr/local not to exist or to be an existing environment.

To work this around, create an environment in /usr/local/env, but still put it on the expected location /usr/local later.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

…ba=True`

Test `tests/tool_util/mulled/test_mulled_build.py::test_mulled_build_files_cli[True]`, where `[True]` refers to the parameter `use_mamba`, fails because if `conda install --quiet --yes 'mamba='` (the preinstall command) runs before `mamba install -p /usr/local`, then the latter expects either `/usr/local` not to exist or to be an existing environment.

To work this around, create an environment in `/usr/local/env`, but still put it on the expected location `/usr/local` later.
With the aim of easing debugging, write one `run()` statement for the preinstall command, one to create the conda environment, another to install packages to the environment and one for the postinstall command.
This reverts commit bd24d0c.

It makes sense to revert the changes because every `run()` statement runs in its own container, thus it cannot be ruled out that other code is building the preinstall or postinstall commands under the assumption that they will run in the same container (or even in the same container as the conda commands). An example is available on galaxyproject#19545 (comment).
@nsoranzo nsoranzo requested a review from bgruening February 6, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants