-
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
Change the return key of k8s_facts #44446
Merged
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
ansibot
added
affects_2.7
This issue/PR affects Ansible v2.7
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
module
This issue/PR relates to a module.
needs_triage
Needs a first human triage before being processed.
small_patch
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.
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
Aug 21, 2018
jborean93
removed
the
needs_triage
Needs a first human triage before being processed.
label
Aug 23, 2018
@willthames LGTM. Seems like a no brainer. |
`items` is a *terrible* return key for ansible as Jinja will often think it refers to the `items()` function. Even though you can typically work around this with `results['items']`, sometimes even that doesn't work: ``` - name: Resources should exist assert: that: item.status.phase == 'Active' loop: "{{ k8s_namespaces['items'] }}" ``` ``` fatal: [testhost]: FAILED! => {"msg": "Invalid data passed to 'loop', it requires a list, got this instead: <built-in method items of dict object at 0x109dc9c58>. Hint: If you passed a list/dict of just one element, try adding wantlist=True to your lookup invocation or use q/query instead of lookup."} ``` Change it now while we still can.
willthames
force-pushed
the
k8s_facts_return
branch
from
August 28, 2018 00:07
c2c23b5
to
2935c4a
Compare
ansibot
added
core_review
In order to be merged, this PR must follow the core review workflow.
and removed
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
labels
Aug 28, 2018
gundalow
reviewed
Aug 29, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore previous comment, this is a new module
Im0
approved these changes
Aug 29, 2018
gundalow
approved these changes
Aug 29, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.7
This issue/PR affects Ansible v2.7
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
k8s
module
This issue/PR relates to a module.
small_patch
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.
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
items
is a terrible return key for ansible as Jinjawill often think it refers to the
items()
function.Even though you can typically work around this with
results['items']
, sometimes even that doesn't work:Change it now while we still can.
ISSUE TYPE
COMPONENT NAME
k8s_facts
ANSIBLE VERSION
ADDITIONAL INFORMATION
This will conflict with my other k8s_facts PR #44429 but I will resolve the conflicts after whichever gets merged first