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

Source common_startup script vs running it so the activated venv appl… #1899

Conversation

afgane
Copy link
Contributor

@afgane afgane commented Mar 9, 2016

…ies to the parent script's shell. Fixes #1847.

My testing resulted in the venv getting and staying activated when starting reports app.

@dannon
Copy link
Member

dannon commented Mar 9, 2016

This is an alternate fix to #1890.

I don't know the background of why the common startup scripts were executed and not sourced, maybe someone who has tinkered with this can chime in?

(on the face of it, this seems to be a better approach to me)

@nsoranzo
Copy link
Member

nsoranzo commented Mar 9, 2016

Ping @natefoo, he expressed some reservations on IRC when we spoke about this option.

@davebx
Copy link
Contributor

davebx commented Mar 10, 2016

@galaxybot test this

@jmchilton
Copy link
Member

👍 - we really need to merge one of these fixes - I don't care which.

@natefoo
Copy link
Member

natefoo commented Mar 15, 2016

We just need to take care that nothing in common_startup.sh would affect anything in the calling environment. Previously this level of care was not necessary. Things like $CREATE_VENV and $RMFILES will now override anything already set in the environment (but I don't know of anything that this would affect). However, $GALAXY_CONFIG_FILE will always be set now. This probably won't break anything, but it does change the way Galaxy starts. Note that run.sh also attempts to set $GALAXY_CONFIG_FILE in a slightly different way, and none of that code will be entered anymore. And actually - common_startup.sh does not export it but run.sh does if it was not already set, meaning it will not be set for Galaxy's child processes.

Ideally, the venv creation code should probably be placed in a function and the variables it uses should be set local. Any variable that can be made function-local probably should be.

It should also remain possible to call common_startup.sh on its own without sourcing.

@jmchilton
Copy link
Member

Ping @afgane - can you close this or adapt it based on @natefoo's comments?

@martenson martenson modified the milestones: 16.10, 16.07 Jul 27, 2016
@afgane
Copy link
Contributor Author

afgane commented Jul 27, 2016

Closing this as I'm not really in tune with @natefoo's comments - it seems to me those changes would complicate this significantly yet the solution from #1890 has been working fine for months now so I don't see a reason to intertwine the startup procedure even more.

@afgane afgane closed this Jul 27, 2016
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.

8 participants