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

Printing and prompting in a parallelize block results in output being printed in prompt area #2543

Closed
lucywyman opened this issue Jan 14, 2021 · 0 comments
Labels
Bug Bug reports and fixes.

Comments

@lucywyman
Copy link
Contributor

lucywyman commented Jan 14, 2021

Describe the Bug

When printing and prompting for input in a parallelize block, the output from out::message will sometimes print in the area where users are expected to enter text. This doesn't affect the input the user types in, but is visually confusing and annoying.

Expected Behavior

A clear and concise description of what you expected to happen.

Steps to Reproduce

Steps to reproduce the behavior:
Run the following plan on at least 3 targets:

plan bolt (
  TargetSpec $targets
){
  $_targets = get_targets($targets)

  $results = parallelize($_targets) |$target| {
    out::message('hello')
    $prompt = prompt('prompt')
  }

  return $results
}

This results in the following output, if foo is input for each prompt:

lucy ~/githubs/bolt (main) $ bolt plan run bolt -t docker
Starting: plan bolt
hello
prompt: foo
hello
prompt: foo
prompt: hello
foo
Finished: plan bolt in 2.96 sec
[
  "foo",
  "foo",
  "foo"
]
@lucywyman lucywyman added the Bug Bug reports and fixes. label Jan 14, 2021
lucywyman added a commit to lucywyman/bolt that referenced this issue Jan 14, 2021
This will block the executor from continuing to publish events until the
user has entered input for a prompt. This prevents prompts inside of
parallelize blocks from being interleaved with output from the block
continuing to execute.

This also adds a known issue that output from `resolve_reference` that
uses `prompt` inside a parallel block may not be a good user experience.

Closes puppetlabs#2543

!bug

* **Don't continue executing parallel block when prompting** ([puppetlabs#2543](puppetlabs#2543))
  Bolt will now pause printing messages from parallel blocks when
  prompting the user for input, to avoid confusing printing to the screen.
lucywyman added a commit to lucywyman/bolt that referenced this issue Jan 14, 2021
This will block the executor from continuing to publish events until the
user has entered input for a prompt. This prevents prompts inside of
parallelize blocks from being interleaved with output from the block
continuing to execute.

This also adds a known issue that output from `resolve_reference` that
uses `prompt` inside a parallel block may not be a good user experience.

Closes puppetlabs#2543

!bug

* **Don't continue executing parallel block when prompting** ([puppetlabs#2543](puppetlabs#2543))
  Bolt will now pause printing messages from parallel blocks when
  prompting the user for input, to avoid confusing printing to the screen.
lucywyman added a commit to lucywyman/bolt that referenced this issue Jan 15, 2021
This will block the executor from continuing to publish events until the
user has entered input for a prompt. This prevents prompts inside of
parallelize blocks from being interleaved with output from the block
continuing to execute.

This also adds a known issue that output from `resolve_reference` that
uses `prompt` inside a parallel block may not be a good user experience.

Closes puppetlabs#2543

!bug

* **Don't continue executing parallel block when prompting** ([puppetlabs#2543](puppetlabs#2543))
  Bolt will now pause printing messages from parallel blocks when
  prompting the user for input, to avoid confusing printing to the screen.
lucywyman added a commit to lucywyman/bolt that referenced this issue Jan 20, 2021
This will block the executor from continuing to publish events until the
user has entered input for a prompt. This prevents prompts inside of
parallelize blocks from being interleaved with output from the block
continuing to execute.

This also adds a known issue that output from `resolve_reference` that
uses `prompt` inside a parallel block may not be a good user experience.

Lastly, this adjusts the spinner while running in parallel to
pessimistically spin - that is, only spin if it's started by a
long-running process and not stopped. This includes sending the `spin:
stop` message to the spinner at any point that a
non-long-running-process (like prompt) might begin.

Closes puppetlabs#2543

!bug

* **Don't continue executing parallel block when prompting** ([puppetlabs#2543](puppetlabs#2543))
  Bolt will now pause printing messages from parallel blocks when
  prompting the user for input, to avoid confusing printing to the screen.
lucywyman added a commit to lucywyman/bolt that referenced this issue Jan 20, 2021
This will block the executor from continuing to publish events until the
user has entered input for a prompt. This prevents prompts inside of
parallelize blocks from being interleaved with output from the block
continuing to execute.

This also adds a known issue that output from `resolve_reference` that
uses `prompt` inside a parallel block may not be a good user experience.

Lastly, this adjusts the spinner while running in parallel to
pessimistically spin - that is, only spin if it's started by a
long-running process and not stopped. This includes sending the `spin:
stop` message to the spinner at any point that a
non-long-running-process (like prompt) might begin.

Closes puppetlabs#2543

!bug

* **Don't continue executing parallel block when prompting** ([puppetlabs#2543](puppetlabs#2543))
  Bolt will now pause printing messages from parallel blocks when
  prompting the user for input, to avoid confusing printing to the screen.
lucywyman added a commit to lucywyman/bolt that referenced this issue Jan 20, 2021
This will block the executor from continuing to publish events until the
user has entered input for a prompt. This prevents prompts inside of
parallelize blocks from being interleaved with output from the block
continuing to execute.

This also adds a known issue that output from `resolve_reference` that
uses `prompt` inside a parallel block may not be a good user experience.

Lastly, this adjusts the spinner while running in parallel to
pessimistically spin - that is, only spin if it's started by a
long-running process and not stopped. This includes sending the `spin:
stop` message to the spinner at any point that a
non-long-running-process (like prompt) might begin.

Closes puppetlabs#2543

!bug

* **Don't continue executing parallel block when prompting** ([puppetlabs#2543](puppetlabs#2543))
  Bolt will now pause printing messages from parallel blocks when
  prompting the user for input, to avoid confusing printing to the screen.
lucywyman added a commit to lucywyman/bolt that referenced this issue Jan 20, 2021
This will block the executor from continuing to publish events until the
user has entered input for a prompt. This prevents prompts inside of
parallelize blocks from being interleaved with output from the block
continuing to execute.

This also adds a known issue that output from `resolve_reference` that
uses `prompt` inside a parallel block may not be a good user experience.

Lastly, this adjusts the spinner while running in parallel to
pessimistically spin - that is, only spin if it's started by a
long-running process and not stopped. This includes sending the `spin:
stop` message to the spinner at any point that a
non-long-running-process (like prompt) might begin.

Closes puppetlabs#2543

!bug

* **Don't continue executing parallel block when prompting** ([puppetlabs#2543](puppetlabs#2543))
  Bolt will now pause printing messages from parallel blocks when
  prompting the user for input, to avoid confusing printing to the screen.
beechtom pushed a commit to beechtom/bolt that referenced this issue Jan 21, 2021
This will block the executor from continuing to publish events until the
user has entered input for a prompt. This prevents prompts inside of
parallelize blocks from being interleaved with output from the block
continuing to execute.

This also adds a known issue that output from `resolve_reference` that
uses `prompt` inside a parallel block may not be a good user experience.

Lastly, this adjusts the spinner while running in parallel to
pessimistically spin - that is, only spin if it's started by a
long-running process and not stopped. This includes sending the `spin:
stop` message to the spinner at any point that a
non-long-running-process (like prompt) might begin.

Closes puppetlabs#2543

!bug

* **Don't continue executing parallel block when prompting** ([puppetlabs#2543](puppetlabs#2543))
  Bolt will now pause printing messages from parallel blocks when
  prompting the user for input, to avoid confusing printing to the screen.
beechtom pushed a commit to beechtom/bolt that referenced this issue Jan 21, 2021
This will block the executor from continuing to publish events until the
user has entered input for a prompt. This prevents prompts inside of
parallelize blocks from being interleaved with output from the block
continuing to execute.

This also adds a known issue that output from `resolve_reference` that
uses `prompt` inside a parallel block may not be a good user experience.

Lastly, this adjusts the spinner while running in parallel to
pessimistically spin - that is, only spin if it's started by a
long-running process and not stopped. This includes sending the `spin:
stop` message to the spinner at any point that a
non-long-running-process (like prompt) might begin.

Closes puppetlabs#2543

!bug

* **Don't continue executing parallel block when prompting** ([puppetlabs#2543](puppetlabs#2543))
  Bolt will now pause printing messages from parallel blocks when
  prompting the user for input, to avoid confusing printing to the screen.
lucywyman added a commit to lucywyman/bolt that referenced this issue Feb 1, 2021
This will block the executor from continuing to publish events until the
user has entered input for a prompt. This prevents prompts inside of
parallelize blocks from being interleaved with output from the block
continuing to execute.

This also adds a known issue that output from `resolve_reference` that
uses `prompt` inside a parallel block may not be a good user experience.

Lastly, this adjusts the spinner while running in parallel to
pessimistically spin - that is, only spin if it's started by a
long-running process and not stopped. This includes sending the `spin:
stop` message to the spinner at any point that a
non-long-running-process (like prompt) might begin.

Closes puppetlabs#2543

!bug

* **Don't continue executing parallel block when prompting** ([puppetlabs#2543](puppetlabs#2543))
  Bolt will now pause printing messages from parallel blocks when
  prompting the user for input, to avoid confusing printing to the screen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug reports and fixes.
Projects
None yet
Development

No branches or pull requests

1 participant