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

added virtualenv_name config #373

Merged
merged 4 commits into from
Jun 2, 2017
Merged

added virtualenv_name config #373

merged 4 commits into from
Jun 2, 2017

Conversation

tanaysoni
Copy link
Contributor

@tanaysoni tanaysoni commented May 31, 2017

Introduced virtualenv_name in the config.json which overrides the default virtualenv(topology name) that streamparse uses when topologies are deployed.

This would take precedence over topology override_name and will only be used when use_virtualenv is True.

Issue 371

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 48.005% when pulling 4b23aec on tanaysoni:virtualenv_name into 4415ef6 on Parsely:master.

Copy link
Member

@dan-blanchard dan-blanchard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This just needs a few minor details and it'll be good to go.

One thing that this could use that isn't present is docs. Please add a little blurb about this setting to our quickstart doc section on customizing virtualenv creation

@@ -106,6 +106,14 @@ def add_override_name(parser):
'duplicate the topology file.')


def add_virtualenv_name(parser):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not appear that you ever actually use this. I also think this probably makes more sense a config.json setting, like you're using it later anyway, since this exists for the use case where you have a single virtualenv you want shared by all topologies.

We might also want a warning for people doing this, since if you're sharing a virtualenv between topologies and you update the virtualenv without stopping all of those topologies, you could end up with weird errors from the code changing right underneath the other topology.

@@ -171,11 +171,12 @@ def submit_topology(name=None, env_name=None, options=None, force=False,

# If using virtualenv, set it up, and make sure paths are correct in specs
if use_venv:
virtualenv_override_name = env_config.get('virtualenv_name', override_name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: I'd rather we just stick with virtualenv_name like the CLI option is called.

@@ -51,24 +51,24 @@ def _create_or_update_virtualenv(virtualenv_root,
run("rm {}".format(temp_req))


def create_or_update_virtualenvs(env_name, topology_name, override_name=None,
def create_or_update_virtualenvs(env_name, topology_name, virtualenv_override_name=None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Same renaming should happen here.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 48.002% when pulling 2b0e6fc on tanaysoni:virtualenv_name into 4415ef6 on Parsely:master.

@tanaysoni
Copy link
Contributor Author

Thank you @dan-blanchard for reviewing.

I've made the changes, please let me know if there's anything that I might have missed.

@dan-blanchard dan-blanchard merged commit 73e5b49 into pystorm:master Jun 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants