VSChina / vscode-ansible

VSCode extension for ansible
Other
77 stars 48 forks source link

Extension is attempting to restart docker for every playbook run #49

Open zikalino opened 6 years ago

zikalino commented 6 years ago

In addition second execution fails, because extension tries to run "docker run" within running docker terminal. I think running docker again should be avoided, as user may be using terminal to install something, for example ansible role, and that will be gone if docker is restarted. So we should only restart docker when really necessary. Also, i think there should be some option to commit any new changes user made in docker image? or that should be left to the user to do manually?

yaweiw commented 6 years ago

think the latest behavior is F1 run in terminal will launch a new terminal where original one stays intact. Max limit of active terminals is 20 if memory serves.

zikalino commented 6 years ago

i think we should have more thorough discussion on this, as i mentioned, in most cases user will want to reuse the same terminal as long as possible.

yungez commented 6 years ago

user would change credential file, playbook file path etc. comparing to guess what user would like do, it's more clean to create a new terminal , while we could see if it's possible to reuse container instance if new terminal. terminal new each time, but contains keep using same.

zikalino commented 6 years ago

we should consider following screnario:

i think the simplest solution would be just restarting the terminal when user closes old terminal. so if something changes we could advise user just to close the terminal.

i like some cotinuity when using terminal, for example remembering my past commands, etc.

zikalino commented 6 years ago

wrt playbook file path:

i would still insist that the terminal should be restarted only if we detect it's necessary, or when closed manually by user.