Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

Add '--setup=<task>' option to run, concurrent, envs. #54

Closed
wants to merge 1 commit into from

Conversation

ryan-roemer
Copy link
Member

Fixes #51

Example case for this flag -- starting up a persistent task for running concurrently with other things that share state like:

  • A single dev web server
  • Sauce connect / tunnels
$ builder envs --setup=start-sauce-tunnels run-sauce-tests \
 '[ { "ROWDY_SETTINGS":"sauceLabs.IE_8_Windows_2008_Desktop" },
    { "ROWDY_SETTINGS":"sauceLabs.IE_9_Windows_2008_Desktop" },
    { "ROWDY_SETTINGS":"sauceLabs.IE_10_Windows_2012_Desktop" },
    { "ROWDY_SETTINGS":"sauceLabs.safari_7_OS_X_10_9_Desktop" },
    { "ROWDY_SETTINGS":"sauceLabs.safari_8_OS_X_10_10_Desktop" },
    { "ROWDY_SETTINGS":"sauceLabs.chrome_43_OS_X_10_10_Desktop" },
    { "ROWDY_SETTINGS":"sauceLabs.chrome_43_Windows_2012_R2_Desktop" },
    { "ROWDY_SETTINGS":"sauceLabs.firefox_9_Windows_2012_R2_Desktop" },
    { "ROWDY_SETTINGS":"local.firefox" } ]'

/cc @chaseadamsio @exogen @boygirl @coopy

@exogen
Copy link
Contributor

exogen commented Dec 14, 2015

Looks good, the one thing I can't determine is: where in the implementation does Builder kill the setup task for you? If I understand correctly, the setup task is supposed to persist only during the tasks that will run for each env in the given builder envs command, right? Or is it supposed to persist even after they're all done (if so, how do you kill it yourself later)? I assume it's the former, I just can't find where that process termination happens.

@exogen
Copy link
Contributor

exogen commented Dec 14, 2015

Ah, I saw the tracker.kill but thought that was only happening on error. My only remaining comments are about what happens when the setup task dies, but I see you've got a new branch working on that. 👍

While on the topic of tracker.kill: the child_process docs for kill make it sound scary to use so broadly over an array of child processes (potential to kill an unrelated process, if the child has already exited and the PID has been reassigned – how likely even is that?). I wonder if we should try to track whether each child has ended so we don't attempt to kill it...or maybe you're already doing that in the new branch...

@ryan-roemer
Copy link
Member Author

Deprecated in favor of #55

@ryan-roemer ryan-roemer deleted the feature-setup branch December 14, 2015 13:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants