-
-
Notifications
You must be signed in to change notification settings - Fork 747
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
RFR: Add --always-copy option to create_virtualenv method for pack virtual… #2372
Merged
lakshmi-kannan
merged 6 commits into
StackStorm:master
from
lakshmi-kannan:virtualenv_fix
Jan 13, 2016
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1ea7c45
Add --always-copy option to create_virtualenv method for pack virtual…
b938ff0
Better error messages for OSError
20fe3cb
Update CHANGELOG
30ccc43
Merge branch 'master' into virtualenv_fix
ae80051
Set virtualenv_opts to --always-copy in st2.conf for new packages
8f421df
Comma separated list is the only one supported for ListOpt in oslo
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we verify how much of a difference in terms of virtualenv disk usage
--always-copy
makes?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also googled around a bit and it looks like
--always-copy
didn't always work correctly in some older versions of virtualenv.Because of that we need to make sure the latest confirmed working version of virtualenv and installed and used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see StackStorm/st2-packages#53 with regards to disk space requirements. I already pasted the disk spaces there.
Yep. I saw the issue and tested with virtualenv 12.1.1 which was five versions earlier and --always-copy seems to work. dh-virtualenv uses latest virtualenv as far as I can tell so this shouldn't be a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding
--system-site-packages
It should copy global packages, but since virtualenv is not really relocatable, that just works in some weird way.
with --system-site-packages
As we can see this is the list just of a few modules which could be relocated, but this is far from being complete, no anything of that what our
/usr/share/python/st2
venv has.without
So what is unique only for origin venv is, and it's not required by github pack!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, as noted on Slack, we added this a while back as a quick workaround to get things working.
I would much prefer to not use this option if possible.
For sensors and actions to work though, they also need access to st2common package and all the inherited st2common dependencies (mongoengine, kombu, etc.).
If we can get it to work without
--system-site-packages
, that would be great. I think it might even be possible now with new packages since st2actions and st2reactor already depend on st2common package.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to explaations of @lakshmi-kannan ,
PYTHONPATH
is injected with an origin virtualenv, that's why--system-site-packages
should be removed!?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify - the best way to test it is to remove this option, create virtualenv and make sure actions and sensors still work.