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

pip: false positive [DEPRECATION WARNING]: Invoking "pip" only once while using a loop via squash_actions #67190

Closed
ssbarnea opened this issue Feb 7, 2020 · 4 comments
Labels
affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. module This issue/PR relates to a module. packaging Packaging category support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@ssbarnea
Copy link
Member

ssbarnea commented Feb 7, 2020

SUMMARY

[DEPRECATION WARNING]: Invoking "pip" only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying name: "{{ item }}", please use name: ['pip', 'setuptools', 'pbr'] and remove the loop. This feature will be removed in version 2.11.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

pip

ANSIBLE VERSION
2.10.devel
STEPS TO REPRODUCE
    - name: Install python YAML module
      pip:
        name: pyyaml
        extra_args: "{{ item }}"
      with_items:
        - "--user"
        - ""
      ignore_errors: true
EXPECTED RESULTS

No warning should be seen. Warning implementation was incorrect as it assumed that if you loop on pip tasks you loop for packages.

@ansibot
Copy link
Contributor

ansibot commented Feb 7, 2020

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Feb 7, 2020

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. packaging Packaging category support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 7, 2020
@sivel
Copy link
Member

sivel commented Feb 7, 2020

Your task, and the warning do not align. That task isn't the one generating the warning. The one generating the warning is doing a loop over ['pip', 'setuptools', 'pbr'], which your task in steps to produce does not.

I tested the task you list above, and it does not cause this warning.

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Feb 7, 2020
@ssbarnea
Copy link
Member Author

ssbarnea commented Feb 7, 2020

Oops, yeah, is hould have read the msg twice. sorry for the trouble.

@ssbarnea ssbarnea closed this as completed Feb 7, 2020
@ansible ansible locked and limited conversation to collaborators Mar 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. module This issue/PR relates to a module. packaging Packaging category support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

3 participants