这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@gabrielcnr
Copy link
Contributor

This enables the command conda run to display the live output from the subprocess's stdout and stderr, in real time.

The current behaviour-- which prints the stdout and stderr only after the process has finished --remains unchanged.

The conda run command now can take a flag --live-stream which would flip the behaviour to provide the real time output.

I believe this is related to: #9412

FIX: inline p.poll() check

Added unit tests for subprocess_call() with live stream

Removed comment + minor changes
@gabrielcnr gabrielcnr requested a review from a team as a code owner October 8, 2020 16:52
@anaconda-issue-bot anaconda-issue-bot added the cla-signed [bot] added once the contributor has signed the CLA label Oct 8, 2020
@marcelotrevisani
Copy link
Member

Hi @chenghlee, could you please take a look on this PR?

@chenghlee chenghlee added this to the 4.9.0 milestone Oct 9, 2020
Copy link
Contributor

@mingwandroid mingwandroid left a comment

Choose a reason for hiding this comment

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

LGTM. I'd probably say it should be the default to be honest with you. Also, can you handle stdin here? Seems like it should be possible.

@gabrielcnr
Copy link
Contributor Author

I think this should be the default too. I didn't make it, because I wasn't sure if would be desirable to break the current behaviour, so I opted for keeping it backwards compatible. But I guess the impact of the change is not big.
As for the stdin, I think we can address that in a separate PR in the future. What do you think @mingwandroid, @marcelotrevisani ?

@marcelotrevisani
Copy link
Member

I think this should be the default too. I didn't make it, because I wasn't sure if would be desirable to break the current behaviour, so I opted for keeping it backwards compatible. But I guess the impact of the change is not big.
As for the stdin, I think we can address that in a separate PR in the future. What do you think @mingwandroid, @marcelotrevisani ?

I agree that @mingwandroid suggestion can be addressed after as the modification to also support the stdin will be a bit more complicated to implement. And I also agree with @mingwandroid that it should be the default behaviour.

@gabrielcnr
Copy link
Contributor Author

Thanks for the feedback @marcelotrevisani and @mingwandroid. As part of this PR, can you please confirm if I should:

  1. make True the default option for the --live-stream flag
    or
  2. remove the --live-stream flag entirely, but keep the live stream behaviour as the new default behaviour
    or
  3. nothing

Please let me know and I will happily make the changes. Thank you.

@marcelotrevisani
Copy link
Member

Thanks for the feedback @marcelotrevisani and @mingwandroid. As part of this PR, can you please confirm if I should:

  1. make True the default option for the --live-stream flag
    or
  2. remove the --live-stream flag entirely, but keep the live stream behaviour as the new default behaviour
    or
  3. nothing

Please let me know and I will happily make the changes. Thank you.

I believe that is a question for @chenghlee or @mingwandroid
But anyways we could try to merge it as it is and next release we can let it as a default, but I believe @chenghlee is leading the conda releases so he should know what is the best decision for conda in this case

@marcelotrevisani
Copy link
Member

just one thing, could you please resolve the conflicts with your PR?

@chenghlee
Copy link
Contributor

Thanks for the feedback @marcelotrevisani and @mingwandroid. As part of this PR, can you please confirm if I should:

  1. make True the default option for the --live-stream flag
    or
  2. remove the --live-stream flag entirely, but keep the live stream behaviour as the new default behaviour
    or
  3. nothing

Please let me know and I will happily make the changes. Thank you.

I believe that is a question for @chenghlee or @mingwandroid
But anyways we could try to merge it as it is and next release we can let it as a default, but I believe @chenghlee is leading the conda releases so he should know what is the best decision for conda in this case

For now (i.e., the 4.9.0 release), let's just leave it as is (i.e., option 3 -- do nothing), since this is a new behavior and I want to avoid any surprises for current users.

I agree that that --live-stream should be the default, but we should roll that change into the 5.0.0 release, where we're planning on making a bunch of other default behavior changes. 5.0.0 is currently scheduled for late 2020-Q4/early 2020-Q1, and that should give us enough time for users to test out this feature and for us to announce upcoming major changes.

@chenghlee
Copy link
Contributor

Once I'll unbreak the CI system, I'll review and merge this PR. Expect that to happen sometime later today.

@chenghlee chenghlee merged commit 8cc6f58 into conda:master Oct 12, 2020
@gabrielcnr gabrielcnr deleted the feature/conda-run-live-stream branch October 12, 2020 21:31
@jonashaag
Copy link
Contributor

Pardon the naive question but what is the point of --live-stream when we have --no-capture-output?

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Sep 21, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants