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

update_json for module intermediate comms #13620

Draft
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

bcoca
Copy link
Member

@bcoca bcoca commented Dec 21, 2015

  • new 'live' keyword to indicate you want intermediate (live) updates from module execution
  • added 'live' intelligence to 'run_command' for those modules executing commands using it
  • displays when -vvvvv ... really should be using callback, but they need to be extended first
    (sivel already created queue that handles postfork/mainfork communication)

implements ansible/proposals#92

@bcoca bcoca added this to the next milestone Dec 21, 2015
@bcoca bcoca force-pushed the update_json branch 2 times, most recently from 699991d to 1ee4f9e Compare February 15, 2016 17:55
@jimi-c jimi-c modified the milestones: 2.2.0, stable-2.1 Jun 21, 2016
@bcoca bcoca changed the title draft update_json for module intermediate comms [WIP] update_json for module intermediate comms Nov 29, 2016
@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 c:module_utils/ needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Dec 13, 2016
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html module_util and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 2, 2017
@jimi-c jimi-c removed the module_util label Jan 5, 2017
@ansibot ansibot added module_util needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. c:module_utils/basic c:plugins/connection labels Jan 5, 2017
@jctanner jctanner removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 31, 2017
@ansibot ansibot added WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Feb 1, 2017
@bcoca bcoca removed this from the 2.2.0 milestone Mar 15, 2017
@ansibot ansibot added needs_info This issue requires further information. Please answer any outstanding questions. needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly. labels Apr 11, 2017
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Jan 4, 2019
@ansibot ansibot removed the support:community This issue/PR relates to code supported by the Ansible community. label Jan 12, 2019
@ansibot ansibot added the needs_triage Needs a first human triage before being processed. label May 17, 2020
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label May 18, 2020
@ansibot ansibot added pre_azp This PR was last tested before migration to Azure Pipelines. and removed ci_verified Changes made in this PR are causing tests to fail. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Dec 6, 2020
@nitzmahone nitzmahone added affects_2.14 and removed affects_2.3 This issue/PR affects Ansible v2.3 labels May 25, 2022
@bcoca bcoca marked this pull request as draft August 24, 2022 20:16
@ansibot ansibot added the WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. label Aug 24, 2022
@ansibot ansibot removed the has_issue label Jul 12, 2023
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Oct 24, 2023
@ansibot ansibot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html pre_azp This PR was last tested before migration to Azure Pipelines. labels Oct 26, 2023
@ansibot
Copy link
Contributor

ansibot commented Oct 26, 2023

The test ansible-test sanity --test import --python 3.12 [explain] failed with 1 error:

lib/ansible/cli/console.py:386:1: traceback: SyntaxError: invalid syntax (at test/lib/ansible_test/_util/target/sanity/import/importer.py:296:0)

The test ansible-test sanity --test import --python 3.11 [explain] failed with 1 error:

lib/ansible/cli/console.py:386:1: traceback: SyntaxError: invalid syntax (at test/lib/ansible_test/_util/target/sanity/import/importer.py:296:0)

The test ansible-test sanity --test import --python 3.10 [explain] failed with 1 error:

lib/ansible/cli/console.py:386:1: traceback: SyntaxError: invalid syntax (at test/lib/ansible_test/_util/target/sanity/import/importer.py:296:0)

The test ansible-test sanity --test compile --python 3.12 [explain] failed with 1 error:

lib/ansible/cli/console.py:386:1: SyntaxError: <<<<<<< HEAD

The test ansible-test sanity --test compile --python 3.11 [explain] failed with 1 error:

lib/ansible/cli/console.py:386:1: SyntaxError: <<<<<<< HEAD

The test ansible-test sanity --test compile --python 3.10 [explain] failed with 1 error:

lib/ansible/cli/console.py:386:1: SyntaxError: <<<<<<< HEAD

The test ansible-test sanity --test pylint [explain] failed with 3 errors:

lib/ansible/cli/console.py:386:1: syntax-error: Parsing failed: 'invalid syntax (<unknown>, line 386)'
lib/ansible/plugins/connection/__init__.py:258:37: undefined-variable: Undefined variable '_consume_json'
test/units/cli/test_console.py:23:0: syntax-error: Cannot import 'ansible.cli.console' due to 'invalid syntax (<unknown>, line 386)'

The test ansible-test sanity --test pep8 [explain] failed with 12 errors:

lib/ansible/cli/console.py:386:1: E305: expected 2 blank lines after class or function definition, found 1
lib/ansible/cli/console.py:386:3: E227: missing whitespace around bitwise or shift operator
lib/ansible/cli/console.py:386:7: E225: missing whitespace around operator
lib/ansible/cli/console.py:387:5: E113: unexpected indentation
lib/ansible/cli/console.py:389:3: E225: missing whitespace around operator
lib/ansible/cli/console.py:389:5: E225: missing whitespace around operator
lib/ansible/cli/console.py:389:7: E225: missing whitespace around operator
lib/ansible/cli/console.py:390:5: E113: unexpected indentation
lib/ansible/cli/console.py:397:7: E225: missing whitespace around operator
lib/ansible/cli/console.py:397:19: E211: whitespace before '('
lib/ansible/cli/console.py:399:5: E113: unexpected indentation
lib/ansible/plugins/connection/local.py:142:13: E722: do not use bare 'except'

click here for bot help

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 9, 2023
  - new update_json method that sends 'intermediate messages'
  - new internal flag that can enable this facility from controller
  - method to run_command and log, log also requires debug to return data
  - 'live' keyword, enables 'live updates' from modules that support it
  - common method for connections to use fixes to module sending
  - spilt json filtering to return trailing data vs warnings
  - customized display
  - added 'live' toggles for adhoc/console
  - Fix performance degradation when running commands
    When all the file descriptors are empty and closed we still have to
    enter the if block to remove them from rpipes which means we will have
    to call `select()` again on the next iteration and as a result wait for
    the timeout unnecessarily which leads to a 1 second slowdown for each
    command being run.
  - Add live support to local connection

TODO:
  - hook into callbacks instead of vvvvv
  - factor in async
  - only disable buffer if live
  - update stdin/stdout only if needed
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 17, 2023
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.14 c:module_utils/basic c:module_utils/ c:plugins/connection docs This issue/PR relates to or includes documentation. docsite This issue/PR relates to the documentation website. feature This issue/PR relates to a feature request. module_util module_utils/basic needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. plugins/connection stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers.
Projects
No open projects
Ansible 2.8
  
To Do - Backlog only. Anything Can b...
Development

Successfully merging this pull request may close these issues.

None yet