Skip to content

update_json for module intermediate comms - #13620

Draft
bcoca wants to merge 2 commits into
ansible:develfrom
bcoca:update_json
Draft

update_json for module intermediate comms#13620
bcoca wants to merge 2 commits into
ansible:develfrom
bcoca:update_json

Conversation

@bcoca

@bcoca bcoca commented Dec 21, 2015

Copy link
Copy Markdown
Member
  • 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

TODO:

  • displays when -vvvvv ... really should be using callback now that sivel added queuing

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 module_util 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. 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 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 removed the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label May 17, 2018
@mattclay

Copy link
Copy Markdown
Member

Changes in this PR appear to be causing integration tests to run significantly longer than usual, with many of them reaching the 1 hour timeout on Shippable or the ~55 minute timeout on AWS.

@ansibot

ansibot commented Aug 3, 2018

Copy link
Copy Markdown
Contributor

@tsipinakis

Copy link
Copy Markdown

I hope I'm not stepping on anyones toes here since this is an active PR but I really want to see this merged so I went ahead and (hopefully) debugged it.

See https://github.com/tsipinakis/ansible/commits/update_json

@bcoca Could you pull my branch into the PR and see if that fixes the CI issues?

I also went ahead and did an initial implementation of live updates on the local connection in the process of debugging.

@bcoca

bcoca commented Sep 10, 2018

Copy link
Copy Markdown
Member Author

@tsipinakis feel free to push to this PR, im currently dealing with other things but I def want to get back to this .. if someone else beats me too it, GREAT!

@tsipinakis

Copy link
Copy Markdown

@bcoca I'm not a part of the org so you'll need to give me access to your fork for me to be able to update the PR. (Just tried and got access denied)

@bcoca

bcoca commented Sep 10, 2018

Copy link
Copy Markdown
Member Author

you dont need to be part of the org, github allows pushing to specific PRs by default .. but this is very old branch and might predate that ...

@tsipinakis

Copy link
Copy Markdown

I think you're referring to the Allow edits from maintainers feature which allows pushes only to those that have write access to the original repo.
It'd probably be a nightmare to allow any user to push to PRs without any access control in place.

@tsipinakis

Copy link
Copy Markdown

Whoops, that's what I get for not testing python3, pushed a fixup.

Perhaps it'd be better for me to open a new PR for this?

@danieljaouen

danieljaouen commented Oct 1, 2018

Copy link
Copy Markdown
Contributor

@tsipinakis What is the status of this pull request? Interested because this will fix #29403.

@tsipinakis

Copy link
Copy Markdown

@danieljaouen Paused until I get some more time to see why the tests are (still) failing. If you want to take it over go right ahead.

@danieljaouen

Copy link
Copy Markdown
Contributor

@tsipinakis Perhaps @bcoca could shed some light on why the tests are failing?

@acozine

acozine commented Nov 16, 2018

Copy link
Copy Markdown
Contributor

@tsipinakis @danieljaouen this PR needs to be rebased - the branch is 987 commits behind the current devel branch (see https://github.com/bcoca/ansible/branches/all?page=2). The PR won't pass Ansible's test suite until the branch has been rebased.

@mattclay

Copy link
Copy Markdown
Member

CI failure in unit tests and integration tests, as well as timeouts on many integration tests.

@gundalow

gundalow commented Dec 6, 2018

Copy link
Copy Markdown
Contributor

!waffling stale_ci

@mattclay

Copy link
Copy Markdown
Member

bcoca added 2 commits October 2, 2025 13:59
  - 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:
  - Ouput layer
  - factor in async
  - only disable buffer if live
  - update stdin/stdout only if needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature This issue/PR relates to a feature request. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. test This PR relates to tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.