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

Make squash deprecation messages less misleading #49551

Merged
merged 1 commit into from
Dec 6, 2018

Conversation

sivel
Copy link
Member

@sivel sivel commented Dec 5, 2018

SUMMARY

This PR aims to make the package module squashing deprecation message less misleading when using lookups other than items or list.

As of now, you would get a message like the following, using with_lines:

[DEPRECATION WARNING]: Invoking "apt" 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: u'cat squash.txt'` and remove
the loop. This feature will be removed in version 2.11. Deprecation warnings can
be disabled by setting deprecation_warnings=False in ansible.cfg.

With this PR:

[DEPRECATION WARNING]: Invoking "apt" 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: "{{ query('lines', 'cat
squash.txt') }}"` and remove the loop. This feature will be removed in version
2.11. Deprecation warnings can be disabled by setting deprecation_warnings=False
in ansible.cfg

There are likely edge cases where this wont work, but this gets us closer.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/executor/task_executor.py

ADDITIONAL INFORMATION

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. 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. labels Dec 5, 2018
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Dec 5, 2018
@sivel sivel requested a review from bcoca December 5, 2018 16:01
@ansibot ansibot added 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 Dec 5, 2018
@sivel
Copy link
Member Author

sivel commented Dec 6, 2018

bot_status

@ansibot
Copy link
Contributor

ansibot commented Dec 6, 2018

Components

changelogs/fragments/squash-deprecation-message.yml
support: community
maintainers:

lib/ansible/executor/task_executor.py
support: core
maintainers:

Metadata

waiting_on: ansible
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
too many files or commits: False
mergeable_state: clean
shippable_status: success
maintainer_shipits (module maintainers): 0
community_shipits (namespace maintainers): 0
ansible_shipits (core team members): 1
shipit_actors (maintainers or core team members): sivel
shipit_actors_other: []
automerge: automerge shipit test failed

click here for bot help

@ansibot 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 Dec 6, 2018
@bcoca bcoca merged commit 69d230f into ansible:devel Dec 6, 2018
sivel added a commit to sivel/ansible that referenced this pull request Dec 6, 2018
…e#49551)

(cherry picked from commit 69d230f)

Co-authored-by: Matt Martz <matt@sivel.net>
abadger pushed a commit that referenced this pull request Dec 6, 2018
(cherry picked from commit 69d230f)

Co-authored-by: Matt Martz <matt@sivel.net>
kbreit pushed a commit to kbreit/ansible that referenced this pull request Jan 11, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants