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

[17.05] Try activating conda environment again if previous activation failed #4035

Merged

Conversation

Projects
None yet
6 participants
@mvdbeek
Copy link
Member

commented May 5, 2017

That should resolve #4031.

@bgruening

This comment has been minimized.

Copy link
Member

commented May 5, 2017

Good idea @mvdbeek! 👍

while [ $COUNT -lt $MAX_TRIES ]; do
. %s '%s' > conda_activate.log 2>&1
if [ $? -eq 0 ];then
break

This comment has been minimized.

Copy link
@nsoranzo

nsoranzo May 5, 2017

Member

Indentation.

sleep 10s
let COUNT=COUNT+1
fi
done """

This comment has been minimized.

Copy link
@nsoranzo

nsoranzo May 5, 2017

Member

I think this may not have exit code 1 if the activation fails all 3 times.

This comment has been minimized.

Copy link
@mvdbeek

mvdbeek May 5, 2017

Author Member

That's right, it will just continue and fail with command not found, which is OK, no ?

@nsoranzo nsoranzo requested a review from natefoo May 5, 2017

@mvdbeek mvdbeek force-pushed the mvdbeek:retry_conda_activation branch from 1bb192b to c38c027 May 7, 2017

@jmchilton

This comment has been minimized.

Copy link
Member

commented May 8, 2017

Thanks @mvdbeek - this seems like a good idea. I have mixed feelings on the explicit exit - it isn't something we have done in the past but it is probably better to be explicit here.

@jmchilton jmchilton merged commit 9e6c152 into galaxyproject:release_17.05 May 8, 2017

5 checks passed

api test Build finished. 275 tests run, 0 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 148 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 34 tests run, 0 skipped, 0 failed.
Details
toolshed test Build finished. 579 tests run, 0 skipped, 0 failed.
Details
@galaxybot

This comment has been minimized.

Copy link

commented May 8, 2017

This PR was merged without a milestone attached.

@natefoo

This comment has been minimized.

Copy link
Member

commented on lib/galaxy/tools/deps/resolvers/conda.py in a0c59d8 Sep 14, 2017

I am not sure if we're trying to preserve POSIX compatibility in these statements but technically the job script's shell is configurable, and dash doesn't support let. COUNT=$(( $COUNT+1 )) would be compliant.

This comment has been minimized.

Copy link
Member

replied Sep 14, 2017

👍

This comment has been minimized.

Copy link
Member

replied Sep 14, 2017

Okay, that said:

dash$ . /home/nate/work/galaxy/database/dependencies/_conda/bin/activate /home/nate/work/galaxy/database/dependencies/_conda/envs/__ucsc_tools@_uv_
dash: 4: /home/nate/work/galaxy/database/dependencies/_conda/bin/activate: [[: not found
dash: 7: /home/nate/work/galaxy/database/dependencies/_conda/bin/activate: [[: not found
Only bash and zsh are supported

This comment has been minimized.

Copy link
Member

replied Sep 14, 2017

Yeah, conda is not well-behaved in this respect, but no reason for doing the same mistake ;)

@mvdbeek mvdbeek deleted the mvdbeek:retry_conda_activation branch Jun 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.