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

Non-determenistics build order results in failed builds #3608

Closed
m-novikov opened this issue Jul 17, 2019 · 1 comment
Closed

Non-determenistics build order results in failed builds #3608

m-novikov opened this issue Jul 17, 2019 · 1 comment
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity

Comments

@m-novikov
Copy link

Actual Behavior

conda build spontaneously fails when building two packages from one recipe

Expected Behavior

conda build should succeed

Steps to Reproduce

The recipe run enough times.
This build recipe includes two packages: testpkg and testpkg-client.

Problem:

The build order of these packages is non-determenistic as function render_recipe may return results in arbitrary order.

Build order: testpkg-client, testpkg

When conda build decides that it wants to build testpkg-client as a first package and recipe has GIT_* variables in it it will trigger execution this line which tries to move work dir to another location.
But as the work directory already exists it results in nested path work/work which makes directory not installable or prevents population of environment variables.

When I tried to fix it replacing offending move line with following code:

if old_dir:
    dst = self.work_dir   # Calls _ensure_dir and creates directory
    shutil.rmtree(dst)     # Remove directory to allow proper move
    shutil.move(old_dir, dst)

It builds the package, but fails on test stage, where test enviroment still installs testpkg instead of testpkg-client.
Removing GIT_* from recipe variables also results in this error.

Build order: testpkg, testpkg-client

Everything built and tested as expected without any problems.

Output of conda info
     active environment : base
    active env location : /home/novikov/tools/miniconda3
            shell level : 1
       user config file : /home/novikov/.condarc
 populated config files : /home/novikov/.condarc
          conda version : 4.7.5
    conda-build version : 3.18.7
         python version : 3.7.3.final.0
       virtual packages : __cuda=10.2
       base environment : /home/novikov/tools/miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/novikov/tools/miniconda3/pkgs
                          /home/novikov/.conda/pkgs
       envs directories : /home/novikov/tools/miniconda3/envs
                          /home/novikov/.conda/envs
               platform : linux-64
             user-agent : conda/4.7.5 requests/2.22.0 CPython/3.7.3 Linux/5.2.0-arch2-1-ARCH arch/ glibc/2.29
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Feb 10, 2023
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Mar 13, 2023
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Mar 12, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity
Projects
Archived in project
Development

No branches or pull requests

1 participant