community.aws icon indicating copy to clipboard operation
community.aws copied to clipboard

Minor linting fixups - 2022-08-12

Open tremble opened this issue 1 year ago • 3 comments

SUMMARY

Various linting and unit test fixups

  • unused variables
  • overly broad Exception catching (highlighted some broken tests)
  • removes direct use of unittest in favour of pytest (see also https://github.com/ansible-collections/amazon.aws/pull/961)
  • cleans up skipping of tests when botocore/boto3 aren't installed
  • passes error message from VPNConnectionException into its super to make testing easier, should never be directly exposed to the user

Removes tests for 3 modules which now have integration tests, they're either recording based (fragile)or test things which are separately tested in the integration tests.

  • lambda
  • s3_bucket_notifications
  • route53_zone
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

plugins/modules/ec2_vpc_vpn.py tests/unit

ADDITIONAL INFORMATION

tremble avatar Aug 12 '22 07:08 tremble

cc @jillr @markuman @s-hertel click here for bot help

ansibullbot avatar Aug 12 '22 07:08 ansibullbot

Build succeeded.

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 03s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 49s :x: ansible-test-sanity-docker-devel FAILURE in 10m 58s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 9m 11s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 27s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 56s :heavy_check_mark: ansible-test-units-community-aws-python38 SUCCESS in 6m 55s :heavy_check_mark: ansible-test-units-community-aws-python39 SUCCESS in 5m 39s :heavy_check_mark: ansible-test-splitter SUCCESS in 2m 32s :heavy_check_mark: integration-community.aws-1 SUCCESS in 11m 07s :warning: integration-community.aws-2 SKIPPED :warning: integration-community.aws-3 SKIPPED :warning: integration-community.aws-4 SKIPPED :warning: integration-community.aws-5 SKIPPED :warning: integration-community.aws-6 SKIPPED :warning: integration-community.aws-7 SKIPPED :warning: integration-community.aws-8 SKIPPED :warning: integration-community.aws-9 SKIPPED :warning: integration-community.aws-10 SKIPPED :warning: integration-community.aws-11 SKIPPED :warning: integration-community.aws-12 SKIPPED :warning: integration-community.aws-13 SKIPPED

Build succeeded.

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 11s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 47s :x: ansible-test-sanity-docker-devel FAILURE in 11m 57s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 9m 12s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 15s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 04s :heavy_check_mark: ansible-test-units-community-aws-python38 SUCCESS in 6m 12s :heavy_check_mark: ansible-test-units-community-aws-python39 SUCCESS in 6m 12s :heavy_check_mark: ansible-test-splitter SUCCESS in 2m 30s :heavy_check_mark: integration-community.aws-1 SUCCESS in 10m 08s :warning: integration-community.aws-2 SKIPPED :warning: integration-community.aws-3 SKIPPED :warning: integration-community.aws-4 SKIPPED :warning: integration-community.aws-5 SKIPPED :warning: integration-community.aws-6 SKIPPED :warning: integration-community.aws-7 SKIPPED :warning: integration-community.aws-8 SKIPPED :warning: integration-community.aws-9 SKIPPED :warning: integration-community.aws-10 SKIPPED :warning: integration-community.aws-11 SKIPPED :warning: integration-community.aws-12 SKIPPED :warning: integration-community.aws-13 SKIPPED

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

github-actions[bot] avatar Aug 17 '22 09:08 github-actions[bot]

@tremble I guess the dict error originates from https://github.com/ansible-collections/community.aws/blob/main/plugins/modules/lambda_event.py#L66

alinabuzachis avatar Aug 17 '22 09:08 alinabuzachis

Build succeeded.

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 34s :heavy_check_mark: build-ansible-collection SUCCESS in 5m 22s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 9m 05s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 9m 39s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 57s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 07s :heavy_check_mark: ansible-test-units-community-aws-python38 SUCCESS in 7m 30s :heavy_check_mark: ansible-test-units-community-aws-python39 SUCCESS in 5m 55s :heavy_check_mark: ansible-test-splitter SUCCESS in 2m 32s :heavy_check_mark: integration-community.aws-1 SUCCESS in 10m 13s :warning: integration-community.aws-2 SKIPPED :warning: integration-community.aws-3 SKIPPED :warning: integration-community.aws-4 SKIPPED :warning: integration-community.aws-5 SKIPPED :warning: integration-community.aws-6 SKIPPED :warning: integration-community.aws-7 SKIPPED :warning: integration-community.aws-8 SKIPPED :warning: integration-community.aws-9 SKIPPED :warning: integration-community.aws-10 SKIPPED :warning: integration-community.aws-11 SKIPPED :warning: integration-community.aws-12 SKIPPED :warning: integration-community.aws-13 SKIPPED

cc @pjodouin @ryansb click here for bot help

ansibullbot avatar Aug 17 '22 10:08 ansibullbot

Build succeeded.

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 09s :heavy_check_mark: build-ansible-collection SUCCESS in 5m 13s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 10m 13s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 9m 48s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 41s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 11m 29s :heavy_check_mark: ansible-test-units-community-aws-python38 SUCCESS in 7m 08s :heavy_check_mark: ansible-test-units-community-aws-python39 SUCCESS in 5m 52s :heavy_check_mark: ansible-test-splitter SUCCESS in 2m 29s :heavy_check_mark: integration-community.aws-1 SUCCESS in 9m 42s :warning: integration-community.aws-2 SKIPPED :warning: integration-community.aws-3 SKIPPED :warning: integration-community.aws-4 SKIPPED :warning: integration-community.aws-5 SKIPPED :warning: integration-community.aws-6 SKIPPED :warning: integration-community.aws-7 SKIPPED :warning: integration-community.aws-8 SKIPPED :warning: integration-community.aws-9 SKIPPED :warning: integration-community.aws-10 SKIPPED :warning: integration-community.aws-11 SKIPPED :warning: integration-community.aws-12 SKIPPED :warning: integration-community.aws-13 SKIPPED

@alinabuzachis Fixed that docs error

tremble avatar Aug 17 '22 13:08 tremble

Build succeeded (gate pipeline).

:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 25s :heavy_check_mark: build-ansible-collection SUCCESS in 5m 09s :heavy_check_mark: ansible-test-sanity-docker-devel SUCCESS in 10m 50s (non-voting) :heavy_check_mark: ansible-test-sanity-docker-milestone SUCCESS in 10m 37s :heavy_check_mark: ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 12s :heavy_check_mark: ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 06s :heavy_check_mark: ansible-test-units-community-aws-python38 SUCCESS in 5m 47s :heavy_check_mark: ansible-test-units-community-aws-python39 SUCCESS in 6m 11s :heavy_check_mark: ansible-test-splitter SUCCESS in 2m 25s :heavy_check_mark: integration-community.aws-1 SUCCESS in 10m 20s :warning: integration-community.aws-2 SKIPPED :warning: integration-community.aws-3 SKIPPED :warning: integration-community.aws-4 SKIPPED :warning: integration-community.aws-5 SKIPPED :warning: integration-community.aws-6 SKIPPED :warning: integration-community.aws-7 SKIPPED :warning: integration-community.aws-8 SKIPPED :warning: integration-community.aws-9 SKIPPED :warning: integration-community.aws-10 SKIPPED :warning: integration-community.aws-11 SKIPPED :warning: integration-community.aws-12 SKIPPED :warning: integration-community.aws-13 SKIPPED

Backport to stable-4: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 8b4afa93b78ea293e3c5c68fc43bb0fc301ed183 on top of patchback/backports/stable-4/8b4afa93b78ea293e3c5c68fc43bb0fc301ed183/pr-1408

Backporting merged PR #1408 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these instructions you'll refer to it by the name upstream. If you don't have it, here's how you can add it:
    $ git remote add upstream https://github.com/ansible-collections/community.aws.git
    
  3. Ensure you have the latest copy of upstream and prepare a branch that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/stable-4/8b4afa93b78ea293e3c5c68fc43bb0fc301ed183/pr-1408 upstream/stable-4
    
  4. Now, cherry-pick PR #1408 contents into that branch:
    $ git cherry-pick -x 8b4afa93b78ea293e3c5c68fc43bb0fc301ed183
    
    If it'll yell at you with something like fatal: Commit 8b4afa93b78ea293e3c5c68fc43bb0fc301ed183 is a merge but no -m option was given., add -m 1 as follows intead:
    $ git cherry-pick -m1 -x 8b4afa93b78ea293e3c5c68fc43bb0fc301ed183
    
  5. At this point, you'll probably encounter some merge conflicts. You must resolve them in to preserve the patch from PR #1408 as close to the original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/stable-4/8b4afa93b78ea293e3c5c68fc43bb0fc301ed183/pr-1408
    
  7. Create a PR, ensure that the CI is green. If it's not — update it so that the tests and any other checks pass. This is it! Now relax and wait for the maintainers to process your pull request when they have some cycles to do reviews. Don't worry — they'll tell you if any improvements are necessary when the time comes!

🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.

patchback[bot] avatar Sep 09 '22 09:09 patchback[bot]