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

Tag support to redshift.py module #56981

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@rafaeldriutti
Copy link
Contributor

commented May 26, 2019

SUMMARY

Support adding/removing tags for the redshift module.
Adresses #51122

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

redshift

@ansibot

This comment has been minimized.

Copy link
Contributor

commented May 26, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented May 26, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:248:19: ansible-format-automatic-specification Format string contains automatic field numbering specification

The test ansible-test sanity --test ansible-doc --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or buffer

The test ansible-test sanity --test ansible-doc --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or buffer

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or bytes-like object

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or bytes-like object

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or bytes-like object

The test ansible-test sanity --test ansible-doc --python 3.8 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or bytes-like object

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

lib/ansible/modules/cloud/amazon/redshift.py:243:1: E302 expected 2 blank lines, found 1
lib/ansible/modules/cloud/amazon/redshift.py:487:33: E124 closing bracket does not match visual indentation

The test ansible-test sanity --test validate-modules [explain] failed with 3 errors:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: E305 DOCUMENTATION.options.tags.description.0: expected str @ data['options']['tags']['description'][0]. Got {'A dictionary of resource tags of the form': {'tag1': 'value1', 'tag2': 'value2'}}
lib/ansible/modules/cloud/amazon/redshift.py:0:0: E309 version_added for new option (purge_tags) should be '2.9'. Currently StrictVersion ('0.0')
lib/ansible/modules/cloud/amazon/redshift.py:0:0: E309 version_added for new option (tags) should be '2.9'. Currently StrictVersion ('0.0')

click here for bot help

@ansibot ansibot added needs_revision and removed core_review labels May 26, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented May 26, 2019

The test ansible-test sanity --test ansible-doc --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or buffer

The test ansible-test sanity --test ansible-doc --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or buffer

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or bytes-like object

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or bytes-like object

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or bytes-like object

The test ansible-test sanity --test ansible-doc --python 3.8 [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: missing documentation (or could not parse documentation): expected string or bytes-like object

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

lib/ansible/modules/cloud/amazon/redshift.py:487:17: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/amazon/redshift.py:491:33: E124 closing bracket does not match visual indentation

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/redshift.py:0:0: E305 DOCUMENTATION.options.tags.description.0: expected str @ data['options']['tags']['description'][0]. Got {'A dictionary of resource tags of the form': {'tag1': 'value1', 'tag2': 'value2'}}

click here for bot help

@rafaeldriutti rafaeldriutti force-pushed the rafaeldriutti:devel branch from b5f0a52 to 8df4233 May 28, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented May 28, 2019

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

lib/ansible/modules/cloud/amazon/redshift.py:487:17: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/amazon/redshift.py:491:33: E124 closing bracket does not match visual indentation

click here for bot help

@bcoca bcoca removed the needs_triage label May 28, 2019

@bcoca bcoca requested a review from mattclay May 28, 2019

account_id = get_aws_account_id(module)
region = module.params.get('region')
resource_arn = "arn:aws:redshift:{0}:{1}:cluster:{2}" .format(region, account_id, identifier)
tags = module.params.get('tags')

This comment has been minimized.

Copy link
@s-hertel

s-hertel May 28, 2019

Contributor

Does this try to update tags if they are None (the default)? Tags should only be updated if a dictionary is provided.

Besides that, this looks good. You could open a PR against https://github.com/mattclay/aws-terminator/blob/master/aws/policy/big-data.yaml to add the permissions so this can pass in CI.

This comment has been minimized.

Copy link
@rafaeldriutti

rafaeldriutti May 29, 2019

Author Contributor

ok added a check for that.

@mattclay

This comment has been minimized.

Copy link
Member

commented May 29, 2019

@rafaeldriutti I've restarted the tests now that the CI test policy has been updated.

@ansibot

This comment has been minimized.

Copy link
Contributor

commented May 29, 2019

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

lib/ansible/modules/cloud/amazon/redshift.py:487:17: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/amazon/redshift.py:491:33: E124 closing bracket does not match visual indentation

click here for bot help

@ansibot ansibot added the ci_verified label May 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.