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

grafana_plugin: Add check condition when plugin version is 'latest' #53369

Merged
merged 2 commits into from
Apr 10, 2019

Conversation

charlrvd
Copy link
Contributor

@charlrvd charlrvd commented Mar 6, 2019

SUMMARY

grafana_plugin module was updating continuously plugins when the version was set to latest

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

This is a small change for monitoring/grafana module

ADDITIONAL INFORMATION

While using the grafana_plugin module for some testing I noticed that continuous run of playbooks using it were executed on each run.
The status of the tasks would be changed on each run, making it not optimal.

Example of test that was showing the behavior:

- name: Install grafana zabbix plugin
  grafana_plugin:
    name: alexanderzobnin-zabbix-app
    version: latest
    state: present
  notify: restart grafana

Result before:

TASK [grafana : Install grafana zabbix plugin] ***********************************************************************
changed: [XX.YY.ZZ.ABC]

Result after

TASK [grafana : Install grafana zabbix plugin] ***********************************************************************
ok: [XX.YY.ZZ.ABC]

@ansibot
Copy link
Contributor

ansibot commented Mar 6, 2019

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

lib/ansible/modules/monitoring/grafana_plugin.py:138:1: E302 expected 2 blank lines, found 1
lib/ansible/modules/monitoring/grafana_plugin.py:154:1: E302 expected 2 blank lines, found 1

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Mar 6, 2019

cc @tsalle
click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 ci_verified Changes made in this PR are causing tests to fail. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. monitoring Monitoring category needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:community This issue/PR relates to code supported by the Ansible community. labels Mar 6, 2019
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Mar 6, 2019
@Akasurde Akasurde changed the title Add check condition when plugin version is 'latest' grafana_plugin: Add check condition when plugin version is 'latest' Mar 6, 2019
Copy link
Contributor

@resmo resmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Mar 6, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Mar 14, 2019
@resmo
Copy link
Contributor

resmo commented Apr 10, 2019

rebuild_merge

@ansibot ansibot added shipit This PR is ready to be merged by Core automerge This PR was automatically merged by ansibot. and removed community_review In order to be merged, this PR must follow the community review workflow. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Apr 10, 2019
@ansibot ansibot merged commit 24c5a6e into ansible:devel Apr 10, 2019
@ansible ansible locked and limited conversation to collaborators Jul 25, 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 automerge This PR was automatically merged by ansibot. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. monitoring Monitoring category new_contributor This PR is the first contribution by a new community member. shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants