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

Make wait_for return matched groups defined in search_regex. Closes #… #47690

Merged
merged 3 commits into from Nov 20, 2018
Merged

Make wait_for return matched groups defined in search_regex. Closes #… #47690

merged 3 commits into from Nov 20, 2018

Conversation

bjorndown
Copy link
Contributor

…25020.

SUMMARY

Fixes #25020

Add module return values match_groups and match_groupdict that contain any matched groups defined in search_regex.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

wait_for

ANSIBLE VERSION
ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Oct 26, 2018

Hi @bjorm, thank you for submitting this pull-request!

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Oct 26, 2018

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 26, 2018
@ansibot

This comment has been minimized.

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. core_review In order to be merged, this PR must follow the core review workflow. and removed core_review In order to be merged, this PR must follow the core review workflow. ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 26, 2018
@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label Nov 1, 2018
@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, 2018
@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 16, 2018
test/integration/targets/wait_for/tasks/main.yml Outdated Show resolved Hide resolved
test/integration/targets/wait_for/tasks/main.yml Outdated Show resolved Hide resolved
test/integration/targets/wait_for/tasks/main.yml Outdated Show resolved Hide resolved
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Nov 17, 2018
Björn Mosler added 3 commits November 17, 2018 12:45
- Use output_dir instead of hardcoded /tmp for temp files
- Sleep for only 3s instead of 10s
- Revert indent change
@bjorndown
Copy link
Contributor Author

bjorndown commented Nov 18, 2018

@mattclay Sorry, I mistakenly resolved one of your changes instead of commenting. I unresolved it

Copy link
Contributor

@dagwieers dagwieers left a comment

Choose a reason for hiding this comment

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

The only thing I noticed from the tests was that in most cases it was written as {{ output_dir }} but in some cases {{ output_dir}} or {{output_dir}}. However since it's in the integration tests, I don't think it's a real problem.

@bcoca bcoca merged commit 9c71f17 into ansible:devel Nov 20, 2018
@@ -98,7 +121,7 @@
- "waitfor.msg == 'fail with custom message'"

- name: setup start SimpleHTTPServer
shell: sleep 10 && cd {{ files_dir }} && {{ ansible_python.executable }} {{ output_dir}}/testserver.py {{ http_port }}
shell: sleep 3 && cd {{ files_dir }} && {{ ansible_python.executable }} {{ output_dir}}/testserver.py {{ http_port }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change sleep here? It seems like that might have been tuned for timing in CI or similar. If it's just to take less time maybe we should change it in a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

And the same comment for all the other timing changes.

@abadger
Copy link
Contributor

abadger commented Nov 20, 2018

A change like this should get a changelog fragment. You can look at files in https://github.com/ansible/ansible/tree/devel/changelogs/fragments for what it should look like. This should be listed as a minor_changes as it adds a minor feature to a module.

mjmayer pushed a commit to mjmayer/ansible that referenced this pull request Nov 30, 2018
ansible#47690)

* Make wait_for return matched groups defined in search_regex. Closes ansible#25020.

* Fix formatting issues.

* Fix issues raised in review.

- Use output_dir instead of hardcoded /tmp for temp files
- Sleep for only 3s instead of 10s
- Revert indent change
Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
ansible#47690)

* Make wait_for return matched groups defined in search_regex. Closes ansible#25020.

* Fix formatting issues.

* Fix issues raised in review.

- Use output_dir instead of hardcoded /tmp for temp files
- Sleep for only 3s instead of 10s
- Revert indent change
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wait_for should return matches to groups in its search_regex
7 participants