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

Remove "legacy" code from PlayIterator #53754

Merged
merged 1 commit into from Mar 25, 2019

Conversation

Projects
None yet
4 participants
@mkrizek
Copy link
Contributor

mkrizek commented Mar 13, 2019

SUMMARY

While debugging something I came across:

  1. state.child_state does not exist.
  2. state.tasks_child_state is not None conditional in a code branch where state.tasks_child_state is None (same for rescue and always).
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

PlayIterator

state.child_state = None
state.tasks_child_state = None
state.rescue_child_state = None
state.always_child_state = None

This comment has been minimized.

@mkrizek

mkrizek Mar 13, 2019

Author Contributor

Unsure if setting these to None is even needed here?

@Andersson007
Copy link
Contributor

Andersson007 left a comment

308     state.child_state = None

Yes, it used only here in the source tree

                        state.tasks_child_state = None
                        state.rescue_child_state = None
                        state.always_child_state = None

Unsure if setting these to None is even needed here?

I looked at the code - there are many conditions after that where state...._child_state is checked. Difficult to sort out.
However, it worked before without these lines. Probably would better not to add them.

About changes in lines 345, 378, 419 - I agree, the conditions from lines 318, 359, 389 exclude None for these variables.

@bcoca bcoca requested a review from jimi-c Mar 14, 2019

@ansibot ansibot added the stale_ci label Mar 22, 2019

@jimi-c

jimi-c approved these changes Mar 25, 2019

@mkrizek mkrizek merged commit 5ff1ce2 into ansible:devel Mar 25, 2019

1 check passed

Shippable Run 113673 status is SUCCESS.
Details

@mkrizek mkrizek deleted the mkrizek:iterator-remove-legacy-code branch Mar 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.