From 612bb81976ba5d590656e534d270d65c697129c2 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Wed, 19 Aug 2020 11:02:28 -0400 Subject: [PATCH] add a deprecation warning for mercurial project syncs see: https://github.com/ansible/awx/issues/7932 --- CHANGELOG.md | 1 + awx/playbooks/action_plugins/hg_deprecation.py | 15 +++++++++++++++ awx/playbooks/project_update_hg_tasks.yml | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 awx/playbooks/action_plugins/hg_deprecation.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 54573a057f..15723a0106 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ This is a list of high-level changes for each release of AWX. A full list of commits can be found at `https://github.com/ansible/awx/releases/tag/`. ## 14.1.0 (TBD) +- Deprecated official support for Mercurial-based project updates - https://github.com/ansible/awx/issues/7932 - Added the ability to import YAML-based resources (instead of just JSON) when using the AWX CLI - https://github.com/ansible/awx/pull/7808 - Updated the AWX CLI to export labels associated with Workflow Job Templates - https://github.com/ansible/awx/pull/7847 - Updated to the latest python-ldap to address a bug - https://github.com/ansible/awx/issues/7868 diff --git a/awx/playbooks/action_plugins/hg_deprecation.py b/awx/playbooks/action_plugins/hg_deprecation.py new file mode 100644 index 0000000000..d4593b2360 --- /dev/null +++ b/awx/playbooks/action_plugins/hg_deprecation.py @@ -0,0 +1,15 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible.plugins.action import ActionBase + + +class ActionModule(ActionBase): + + def run(self, tmp=None, task_vars=None): + self._supports_check_mode = False + result = super(ActionModule, self).run(tmp, task_vars) + result['changed'] = result['failed'] = False + result['msg'] = '' + self._display.deprecated("Mercurial support is deprecated") + return result diff --git a/awx/playbooks/project_update_hg_tasks.yml b/awx/playbooks/project_update_hg_tasks.yml index 251013698f..3553d60984 100644 --- a/awx/playbooks/project_update_hg_tasks.yml +++ b/awx/playbooks/project_update_hg_tasks.yml @@ -1,4 +1,7 @@ --- +- name: Mercurial support is deprecated. + hg_deprecation: + - name: update project using hg hg: dest: "{{project_path|quote}}"