-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Skip self._parent on dynamic, defer grandparent for attr lookup #38827
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bcoca
approved these changes
Apr 16, 2018
sivel
changed the title
[WIP] Skip self._parent on dynamic, defer grandparent for attr lookup
Skip self._parent on dynamic, defer grandparent for attr lookup
Apr 16, 2018
I ran the new tests against devel, and received:
|
From the reproducer in #36194 I get expected results with this change:
|
ansibot
added
bug
This issue/PR relates to a bug.
needs_triage
Needs a first human triage before being processed.
support:community
This issue/PR relates to code supported by the Ansible community.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
test
This PR relates to tests.
labels
Apr 16, 2018
sivel
added a commit
to sivel/ansible
that referenced
this pull request
Apr 16, 2018
…nsible#38827) * Skip self._parent on dynamic, defer to grandparent for attr lookup * Revert _inheritable * Add tests for include inheritance from static blocks Fixes ansible#38037 ansible#36194 (cherry picked from commit 354aa8d)
sivel
added a commit
to sivel/ansible
that referenced
this pull request
Apr 16, 2018
This was referenced Apr 16, 2018
bcoca
removed
the
needs_triage
Needs a first human triage before being processed.
label
Apr 16, 2018
sivel
added a commit
that referenced
this pull request
Apr 20, 2018
…38847) * Skip self._parent on dynamic, defer to grandparent for attr lookup (#38827) * Skip self._parent on dynamic, defer to grandparent for attr lookup * Revert _inheritable * Add tests for include inheritance from static blocks Fixes #38037 #36194 (cherry picked from commit 354aa8d) * Add changelog for #38827
ilicmilan
pushed a commit
to ilicmilan/ansible
that referenced
this pull request
Nov 7, 2018
…nsible#38827) * Skip self._parent on dynamic, defer to grandparent for attr lookup * Revert _inheritable * Add tests for include inheritance from static blocks Fixes ansible#38037 ansible#36194
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bug
This issue/PR relates to a bug.
support:community
This issue/PR relates to code supported by the Ansible community.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
test
This PR relates to tests.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Skip self._parent on dynamic, defer grandparent for attr lookup.
This solves the problem where we should look up the tree for attrs on static objects, when constructing attrs for tasks within dynamic.
Examples:
Block:
import->include:
This PR also backs out the
_inheritable
changes from 8e6ebae8bdaISSUE TYPE
COMPONENT NAME
lib/ansible/playbook/block.py
lib/ansible/playbook/task.py
ANSIBLE VERSION
ADDITIONAL INFORMATION