Repository: fabric/fabric

Issue #32: Occasional dropped lines of output
Created: 2011-08-19T01:57:24Z
Description
One or two users (at least) are experiencing dropped lines of output (usually the last line in an expected return value from a run() or sudo()) after the patch to fix output-dropping issues from about a month ago.
A good example of this is Xinan Wu with a series of emails to the list, most recently on July 13th, with a suggested fix. Also, the "Beta 1" thread has mails from Niklas Lindstrom who has the verifiable "works prior to recent fix, doesn't work after" issue.
Take a look at that email, find the others if possible, and see what's up. Would be nice to have this fixed before 0.9 final, so marking it as such, but if it's an edge case and isn't affecting the majority of users, might be able to wait for an 0.9.x release.

Originally submitted by Jeff Forcier (bitprophet) on 2009-07-24 at 09:48pm EDT
Attachments

fabfile.py


Closed as Done on 2009-11-08 at 12:04pm EST

Duplicate issue #70: some lines of the output  are missing
Created: 2011-08-19T01:57:46Z
Description
I found out that in some situation fabric do not report some lines of the output when using :

pint local(...)

Here it is an example in my application :

http://bitbucket.org/yml/fabric_factory/src/tip/fabfile.py#cl-40

I get this output :
------8<--------------
$ fab run_test_suite
[localhost] run: fabric_factory_sandbox/ve/bin/python fabric_factory_sandbox/fabric_factory/src/project/manage.py test --settings=project.settings
Creating test database...
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table factory_fabfilerecipe
Creating table factory_build
Installing index for auth.Permission model
Installing index for auth.Message model
Installing index for admin.LogEntry model
Installing index for factory.FabfileRecipe model
Installing index for factory.Build model
Destroying test database...
Done.

Instead of this :
------8<-------------
$ fabric_factory_sandbox/ve/bin/python fabric_factory_sandbox/fabric_factory/src/project/manage.py test --settings=project.settings
Creating test database...
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table factory_fabfilerecipe
Creating table factory_build
Installing index for auth.Permission model
Installing index for auth.Message model
Installing index for admin.LogEntry model
Installing index for factory.FabfileRecipe model
Installing index for factory.Build model
...................................................
Ran 51 tests in 4.085s
OK
Destroying test database...
Do you have any idea on how to fix this ?
Regards,
Yann

Originally submitted by **** (yml) on 2009-10-23 at 04:24pm EDT
Relations

Related to #88: Switch default behavior of local() to not capture


Closed as Done on 2009-11-08 at 04:59pm EST

Closing comment (2011-08-19T02:02:14Z): **** (yml) posted:

I am coming back to original ticket I have opened before you told me that it was a duplicate of #32. I am attaching an updated version of my simple test. In this latest version the fabfile contains 2 tasks:
fab -l
Available commands:
task_local
task_subprocess

"task_local" use the fabric local api and "task_subprocess" uses subprocess.call. I do not understand why the 2 output are different.
It is interesting to note that if the argument capture=False is passed to local the output is the same than subrocess.call.
This is complaint with this line in the doc :

If you need full interactivity with the command being run (and are willing to accept the loss of captured stdout) you may specify capture=False so that the subprocess’ stdout and stderr pipes are connected to your terminal instead of captured by Fabric.

However I still do not understand what you mean by and are willing to accept the loss of captured stdout. Could you please use the example to explain what is exactly captured or lost ?
Thank you for you help.
Regards,
--yml

on 2009-11-08 at 03:11pm EST