Skip to content

Commit

Permalink
[6.0.0] Bump botocore requirements (#1744)
Browse files Browse the repository at this point in the history
[6.0.0] Bump botocore requirements

SUMMARY
In line with our botocore version policy bump the minimum requirements

Starting with the 2.0.0 releases of amazon.aws and community.aws, it is generally the collection's policy to
support the versions of botocore and boto3 that were released 12 months prior to the most recent major
collection release, following semantic versioning (for example, 2.0.0, 3.0.0).

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
requirements.txt
ADDITIONAL INFORMATION

boto3 - 1.22.0 - "Mon Apr 25 18:07:20 2022 +0000"
botocore - 1.25.0 - "Mon Apr 25 18:07:02 2022 +0000"

See also ansible-collections/amazon.aws#1342

Reviewed-by: Alina Buzachis
  • Loading branch information
tremble authored Mar 13, 2023
1 parent 8cb61a9 commit 4baf1cf
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 155 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ this collection requires Python 3.6 or greater.

Amazon have also announced the end of support for
[Python less than 3.7](https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/).
As such support for Python less than 3.7 by this collection has been deprecated and will be removed in a release
after 2023-05-31.
As such support for Python less than 3.7 by this collection has been deprecated and will be removed in release 7.0.0.
Additionally, support for Python less than 3.8 is expected to be removed in a release after 2024-12-01 based on currently
available schedules.

## AWS SDK version compatibility

Starting with the 2.0.0 releases of amazon.aws and community.aws, it is generally the collection's policy to support the versions of `botocore` and `boto3` that were released 12 months prior to the most recent major collection release, following semantic versioning (for example, 2.0.0, 3.0.0).

Version 5.0.0 of this collection supports `boto3 >= 1.18.0` and `botocore >= 1.21.0`
Version 6.0.0 of this collection supports `boto3 >= 1.22.0` and `botocore >= 1.25.0`

All support for the original AWS SDK `boto` was removed in release 4.0.0.

Expand Down
9 changes: 9 additions & 0 deletions changelogs/fragments/python37.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
deprecated_features:
- community.aws collection - due to the AWS SDKs announcing the end of support
for Python less than 3.7 (https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/)
support for Python less than 3.7 by this collection has been deprecated and will be removed in release 7.0.0.
(https://github.com/ansible-collections/community.aws/pull/1743).
- community.aws collection - due to the AWS SDKs Python support policies
(https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/)
support for Python less than 3.8 by this collection is expected to be removed in a release after 2024-12-01
(https://github.com/ansible-collections/community.aws/pull/1743).
6 changes: 6 additions & 0 deletions changelogs/fragments/release-6-botocore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
breaking_changes:
- The community.aws collection has dropped support for ``botocore<1.25.0`` and
``boto3<1.22.0``. Most modules will continue to work with older versions of the AWS SDK, however
compatability with older versions of the SDK is not guaranteed and will not be tested. When using
older versions of the SDK a warning will be emitted by Ansible
(https://github.com/ansible-collections/community.aws/pull/1743).
2 changes: 0 additions & 2 deletions plugins/modules/opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,6 @@
- how long before wait gives up, in seconds.
default: 300
type: int
requirements:
- botocore >= 1.21.38
extends_documentation_fragment:
- amazon.aws.common.modules
- amazon.aws.region.modules
Expand Down
2 changes: 0 additions & 2 deletions plugins/modules/opensearch_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
all tag key, value pairs.
required: false
type: dict
requirements:
- botocore >= 1.21.38
extends_documentation_fragment:
- amazon.aws.common.modules
- amazon.aws.region.modules
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# - tests/unit/constraints.txt
# - tests/integration/constraints.txt
# - tests/integration/targets/setup_botocore_pip
botocore>=1.21.0
boto3>=1.18.0
botocore>=1.25.0
boto3>=1.22.0
6 changes: 3 additions & 3 deletions tests/integration/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Specifically run tests against the oldest versions that we support
boto3==1.18.0
botocore==1.21.0
boto3==1.22.0
botocore==1.25.0

# AWS CLI has `botocore==` dependencies, provide the one that matches botocore
# to avoid needing to download over a years worth of awscli wheels.
awscli==1.20.0
awscli==1.23.0
3 changes: 0 additions & 3 deletions tests/integration/targets/ec2_launch_template/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
dependencies:
- setup_ec2_facts
- role: setup_botocore_pip
vars:
botocore_version: "1.23.30"
Original file line number Diff line number Diff line change
@@ -1,53 +1,5 @@
---
- name: test with older boto3 version that does not support instance_metadata_tags
block:
- name: fail metadata_options
ec2_launch_template:
name: "{{ resource_prefix }}-test-metadata"
metadata_options:
http_put_response_hop_limit: 1
http_tokens: required
http_protocol_ipv6: enabled
instance_metadata_tags: enabled
state: present
register: metadata_options_launch_template
ignore_errors: yes
- name: verify fail with usefull error message
assert:
that:
- metadata_options_launch_template.failed
- metadata_options_launch_template is not changed
- "'This is required to set instance_metadata_tags' in metadata_options_launch_template.msg"

- name: success metadata_options
ec2_launch_template:
name: "{{ resource_prefix }}-test-metadata"
metadata_options:
http_put_response_hop_limit: 1
http_tokens: required
state: present
register: metadata_options_launch_template
- name: instance with metadata_options created with the right options
assert:
that:
- metadata_options_launch_template is changed
- "metadata_options_launch_template.latest_template.launch_template_data.metadata_options.http_put_response_hop_limit == 1"
- "metadata_options_launch_template.latest_template.launch_template_data.metadata_options.http_tokens == 'required'"
- "metadata_options_launch_template.latest_template.launch_template_data.metadata_options.http_protocol_ipv6 is not defined"
- "metadata_options_launch_template.latest_template.launch_template_data.metadata_options.instance_metadata_tags is not defined"
always:
- name: delete the template
ec2_launch_template:
name: "{{ resource_prefix }}-test-metadata"
state: absent
register: del_lt
retries: 10
until: del_lt is not failed
ignore_errors: true

- name: test with boto3 version that supports instance_metadata_tags
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
- name: instance_metadata_tags
block:
- name: metadata_options
ec2_launch_template:
Expand Down
5 changes: 1 addition & 4 deletions tests/integration/targets/ecs_cluster/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
dependencies:
- role: setup_botocore_pip
vars:
botocore_version: "1.24.14"
dependencies: []
32 changes: 0 additions & 32 deletions tests/integration/targets/ecs_cluster/tasks/20_ecs_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@
- not ecs_service_again.changed

- name: create same ECS service definition via force_new_deployment
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
state: present
force_new_deployment: true
Expand All @@ -113,8 +111,6 @@
- ecs_service_again.changed

- name: force_new_deployment should work without providing a task_definition
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
state: present
force_new_deployment: yes
Expand All @@ -139,8 +135,6 @@
- ecs_service_notaskdef.changed

- name: attempt to use ECS network configuration on task definition without awsvpc network_mode (expected to fail)
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
state: present
name: "{{ ecs_service_name }}3"
Expand All @@ -166,8 +160,6 @@
- ecs_service_network_without_awsvpc_task is failed

- name: scale down ECS service
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
state: present
name: "{{ ecs_service_name }}"
Expand All @@ -191,8 +183,6 @@
- ecs_service_scale_down.service.desiredCount == 0

- name: scale down ECS service again
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
state: present
name: "{{ ecs_service_name }}"
Expand Down Expand Up @@ -275,8 +265,6 @@
- "ecs_taskdefinition_info.network_mode == 'awsvpc'"

- name: create ECS service definition with network configuration
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
state: present
name: "{{ ecs_service_name }}2"
Expand Down Expand Up @@ -304,8 +292,6 @@
- "create_ecs_service_with_vpc.service.networkConfiguration.awsvpcConfiguration.securityGroups|length == 1"

- name: create ecs_service using health_check_grace_period_seconds
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-mft"
cluster: "{{ ecs_cluster_name }}"
Expand All @@ -327,8 +313,6 @@
- "{{ecs_service_creation_hcgp.service.healthCheckGracePeriodSeconds}} == 30"

- name: update ecs_service using health_check_grace_period_seconds
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-mft"
cluster: "{{ ecs_cluster_name }}"
Expand All @@ -349,8 +333,6 @@
- "{{ecs_service_creation_hcgp2.service.healthCheckGracePeriodSeconds}} == 10"

- name: update ecs_service using REPLICA scheduling_strategy
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-replica"
cluster: "{{ ecs_cluster_name }}"
Expand Down Expand Up @@ -477,8 +459,6 @@
- "ecs_service_create_no_load_balancer.service.loadBalancers | length == 0"

- name: Update ecs_service load balancer
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-lb"
cluster: "{{ ecs_cluster_name }}"
Expand All @@ -501,8 +481,6 @@
- "ecs_service_update_load_balancer.service.loadBalancers[0].targetGroupArn == elb_target_group_instance.target_group_arn"

- name: Create ecs service with placement constraints
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-constraint"
cluster: "{{ ecs_cluster_name }}"
Expand Down Expand Up @@ -553,8 +531,6 @@
until: "ECS.services[0].deployments[0].rolloutState == 'COMPLETED'"

- name: Update ecs service's placement constraints
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-constraint"
cluster: "{{ ecs_cluster_name }}"
Expand All @@ -581,8 +557,6 @@
- "ecs_service_update_constraints.service.placementConstraints[0].expression == 'attribute:ecs.instance-type == t3.micro'"

- name: Remove ecs service's placement constraints
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-constraint"
cluster: "{{ ecs_cluster_name }}"
Expand All @@ -605,8 +579,6 @@
- "ecs_service_remove_constraints.service.placementConstraints | length == 0"

- name: Create ecs service with placement strategy
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-strategy"
cluster: "{{ ecs_cluster_name }}"
Expand All @@ -632,8 +604,6 @@
- "ecs_service_creation_strategy.service.placementStrategy[0].field == 'MEMORY'"

- name: Update ecs service's placement strategy
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-strategy"
cluster: "{{ ecs_cluster_name }}"
Expand All @@ -660,8 +630,6 @@
- "ecs_service_update_strategy.service.placementStrategy[0].field == 'instanceId'"

- name: Remove ecs service's placement strategy
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-strategy"
cluster: "{{ ecs_cluster_name }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
ignore_errors: true

- name: scale down ECS service
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
state: present
name: "{{ ecs_service_name }}"
Expand All @@ -44,8 +42,6 @@
register: ecs_service_info

- name: scale down second ECS service
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
state: present
name: "{{ ecs_service_name }}2"
Expand All @@ -62,8 +58,6 @@
register: ecs_service_scale_down

- name: scale down multifunction-test service
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-mft"
cluster: "{{ ecs_cluster_name }}"
Expand All @@ -78,8 +72,6 @@
register: ecs_service_scale_down

- name: scale down scheduling_strategy service
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
name: "{{ ecs_service_name }}-replica"
cluster: "{{ ecs_cluster_name }}"
Expand All @@ -94,8 +86,6 @@
register: ecs_service_scale_down

- name: scale down Fargate ECS service
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"
ecs_service:
state: present
name: "{{ ecs_service_name }}4"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
dependencies:
- role: setup_botocore_pip
vars:
botocore_version: "1.23.23"
dependencies: []
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

# List the Managed Rule Groups (there's no access to the rules themselves)
- include_tasks: 'managed.yml'
vars:
ansible_python_interpreter: "{{ botocore_virtualenv_interpreter }}"

# Minimal tests and manipulation of common metadata
- include_tasks: 'minimal.yml'
Expand Down
Loading

0 comments on commit 4baf1cf

Please sign in to comment.