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

Documented v2_runner_on_failed method in Callback class #83267

Merged
merged 2 commits into from
May 31, 2024

Conversation

garciart
Copy link
Contributor

SUMMARY

Added type declarations and a docstring to the v2_runner_on_failed method of the Callback class to explain the purpose of the method and the parameters that the method will accept. The docstring also provides additional information for developers who want to use the method in custom callback plugins. This PR incorporates feedback from @bcoca and @webknjaz.

ISSUE TYPE
  • Docs Pull Request
ADDITIONAL INFORMATION

This change does not alter the method's output. A block-rescue play using an ansible.builtin.fail module ran with no issues. All tests in test.units.plugins.callback.test_callback passed

$ python3 -m unittest --verbose --buffer test.units.plugins.callback.test_callback
test_display (test.units.plugins.callback.test_callback.TestCallback) ... ok
test_display_verbose (test.units.plugins.callback.test_callback.TestCallback) ... ok
test_host_label (test.units.plugins.callback.test_callback.TestCallback) ... ok
test_host_label_delegated (test.units.plugins.callback.test_callback.TestCallback) ... ok
test_init (test.units.plugins.callback.test_callback.TestCallback) ... ok
test_clear_file (test.units.plugins.callback.test_callback.TestCallbackDiff) ... ok
test_diff_after_none (test.units.plugins.callback.test_callback.TestCallbackDiff) ... ok
test_diff_before_none (test.units.plugins.callback.test_callback.TestCallbackDiff) ... ok
test_diff_dicts (test.units.plugins.callback.test_callback.TestCallbackDiff) ... ok
test_difflist (test.units.plugins.callback.test_callback.TestCallbackDiff) ... ok
test_new_file (test.units.plugins.callback.test_callback.TestCallbackDiff) ... ok
test_no_trailing_newline_after (test.units.plugins.callback.test_callback.TestCallbackDiff) ... ok
test_no_trailing_newline_before (test.units.plugins.callback.test_callback.TestCallbackDiff) ... ok
test_no_trailing_newline_both (test.units.plugins.callback.test_callback.TestCallbackDiff) ... ok
test_no_trailing_newline_both_with_some_changes (test.units.plugins.callback.test_callback.TestCallbackDiff) ... ok
test_simple_diff (test.units.plugins.callback.test_callback.TestCallbackDiff) ... ok
test_are_methods (test.units.plugins.callback.test_callback.TestCallbackOnMethods) ... ok
test_on_any (test.units.plugins.callback.test_callback.TestCallbackOnMethods) ... ok
test_clean_results (test.units.plugins.callback.test_callback.TestCallbackResults) ... ok
test_clean_results_debug_task (test.units.plugins.callback.test_callback.TestCallbackResults) ... ok
test_clean_results_debug_task_empty_results (test.units.plugins.callback.test_callback.TestCallbackResults) ... ok
test_clean_results_debug_task_no_invocation (test.units.plugins.callback.test_callback.TestCallbackResults) ... ok
test_get_item_label (test.units.plugins.callback.test_callback.TestCallbackResults) ... ok
test_get_item_label_no_log (test.units.plugins.callback.test_callback.TestCallbackResults) ... ok

----------------------------------------------------------------------
Ran 24 tests in 0.003s

OK

@ansibot ansibot added the needs_triage Needs a first human triage before being processed. label May 18, 2024
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label May 21, 2024
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label May 21, 2024
@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 May 28, 2024
@ansibot ansibot added the stale_review Updates were made after the last review and the last review is more than 7 days old. label May 31, 2024
@garciart garciart requested a review from bcoca May 31, 2024 15:00
@ansibot ansibot removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. 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 May 31, 2024
@bcoca bcoca merged commit 347a822 into ansible:devel May 31, 2024
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale_review Updates were made after the last review and the last review is more than 7 days old.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants