Skip to content

Commit 8205e90

Browse files
committed
merge with main
2 parents 1a120b8 + 4961400 commit 8205e90

File tree

66 files changed

+1941
-1782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1941
-1782
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ on:
77
- 'docs'
88

99
env:
10+
<<<<<<< HEAD
1011
BUILDER_VERSION: v0.9.87
12+
=======
13+
BUILDER_VERSION: v0.9.84
14+
>>>>>>> main
1115
BUILDER_SOURCE: releases
1216
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
1317
PACKAGE_NAME: aws-iot-device-sdk-python-v2
@@ -93,7 +97,7 @@ jobs:
9397
chmod a+x builder
9498
./builder build -p ${{ env.PACKAGE_NAME }}
9599
- name: configure AWS credentials (MQTT5)
96-
uses: aws-actions/configure-aws-credentials@v2
100+
uses: aws-actions/configure-aws-credentials@v4
97101
with:
98102
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
99103
aws-region: ${{ env.AWS_DEFAULT_REGION }}
@@ -129,7 +133,7 @@ jobs:
129133
chmod a+x builder
130134
./builder build -p ${{ env.PACKAGE_NAME }}
131135
- name: configure AWS credentials (MQTT5)
132-
uses: aws-actions/configure-aws-credentials@v2
136+
uses: aws-actions/configure-aws-credentials@v4
133137
with:
134138
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
135139
aws-region: ${{ env.AWS_DEFAULT_REGION }}
@@ -145,8 +149,8 @@ jobs:
145149
source utils/test_cleanup.sh
146150
cd ..
147151
148-
# Runs the samples and service tests and ensures that everything is working
149-
linux-smoke-tests:
152+
# Runs the service client tests
153+
linux-service-client-tests:
150154
runs-on: ubuntu-22.04
151155
permissions:
152156
id-token: write # This is required for requesting the JWT
@@ -233,65 +237,6 @@ jobs:
233237
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-python-v2/utils:${{ github.workspace }}/aws-iot-device-sdk-python-v2/samples
234238
python3 ./test_cases/test_jobs_execution.py --config-file test_cases/mqtt5_jobs_cfg.json
235239
236-
linux-greengrass-tests:
237-
runs-on: ubuntu-22.04
238-
permissions:
239-
id-token: write # This is required for requesting the JWT
240-
steps:
241-
- name: Setup environment
242-
run: |
243-
python3 -m pip install boto3
244-
- name: configure AWS credentials (containers)
245-
uses: aws-actions/configure-aws-credentials@v4
246-
with:
247-
role-to-assume: ${{ env.CI_BUILD_AND_TEST_ROLE }}
248-
aws-region: ${{ env.AWS_DEFAULT_REGION }}
249-
- name: Build ${{ env.PACKAGE_NAME }}
250-
run: |
251-
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
252-
chmod a+x builder
253-
./builder build -p ${{ env.PACKAGE_NAME }}
254-
- name: Install Greengrass Development Kit
255-
run: |
256-
python3 -m pip install awsiotsdk
257-
python3 -m pip install -U git+https://github.com/aws-greengrass/[email protected]
258-
- name: Configure AWS credentials (Greengrass)
259-
uses: aws-actions/configure-aws-credentials@v4
260-
with:
261-
role-to-assume: ${{ env.CI_GREENGRASS_INSTALLER_ROLE }}
262-
aws-region: ${{ env.AWS_DEFAULT_REGION }}
263-
- name: Build and run Greengrass basic discovery sample
264-
working-directory: ./aws-iot-device-sdk-python-v2/test/greengrass/basic_discovery
265-
run: |
266-
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-python-v2/samples
267-
gdk component build
268-
gdk test-e2e build
269-
gdk test-e2e run
270-
- name: Show logs
271-
working-directory: ./aws-iot-device-sdk-python-v2/test/greengrass/basic_discovery
272-
# Print logs unconditionally to provide more details on Greengrass run even if the test failed.
273-
if: always()
274-
run: |
275-
echo "=== greengrass.log"
276-
cat testResults/gg*/greengrass.log
277-
echo "=== software.amazon.awssdk.sdk-gg-test-discovery.log"
278-
cat testResults/gg*/software.amazon.awssdk.sdk-gg-test-discovery.log
279-
- name: Build and run Greengrass IPC sample
280-
working-directory: ./aws-iot-device-sdk-python-v2/test/greengrass/ipc
281-
run: |
282-
gdk component build
283-
gdk test-e2e build
284-
gdk test-e2e run
285-
- name: Show logs
286-
working-directory: ./aws-iot-device-sdk-python-v2/test/greengrass/ipc
287-
# Print logs unconditionally to provide more details on Greengrass run even if the test failed.
288-
if: always()
289-
run: |
290-
echo "=== greengrass.log"
291-
cat testResults/gg*/greengrass.log
292-
echo "=== software.amazon.awssdk.sdk-gg-ipc.log"
293-
cat testResults/gg*/software.amazon.awssdk.sdk-gg-ipc.log
294-
295240
# check that docs can still build
296241
check-docs:
297242
runs-on: ubuntu-22.04 # latest

.github/workflows/ci_run_greengrass_discovery_cfg.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/ci_run_greengrass_ipc_cfg.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
force: true
6969

7070
- name: configure AWS credentials (Release)
71-
uses: aws-actions/configure-aws-credentials@v2
71+
uses: aws-actions/configure-aws-credentials@v4
7272
with:
7373
role-to-assume: arn:aws:iam::180635532705:role/CI_V2_RELEASE_S3_ROLE
7474
aws-region: us-east-1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ is provided by code that been generated from a model of the service.
9090

9191
This library is licensed under the [Apache 2.0 License](./documents/LICENSE).
9292

93-
Latest released version: v1.24.0
93+
Latest released version: v1.26.0

awsiot/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from concurrent.futures import Future
2020
from dataclasses import dataclass
2121
import json
22-
from typing import Any, Callable, Dict, Generic, Optional, Tuple, TypeVar
22+
from typing import Any, Callable, Dict, Generic, Optional, Tuple, TypeVar, Union
2323

2424
__version__ = '1.0.0-dev'
2525

@@ -37,7 +37,7 @@ class MqttServiceClient:
3737
mqtt_connection: MQTT connection to use
3838
"""
3939

40-
def __init__(self, mqtt_connection: mqtt.Connection or mqtt5.Client):
40+
def __init__(self, mqtt_connection: Union[mqtt.Connection, mqtt5.Client]):
4141
if isinstance(mqtt_connection, mqtt.Connection):
4242
self._mqtt_connection = mqtt_connection # type: mqtt.Connection
4343
elif isinstance(mqtt_connection, mqtt5.Client):

codebuild/cd/publish-to-prod-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ phases:
1111
- sudo apt-get install python3 python3-pip -y
1212
- export PATH=$PATH:$HOME/.local/bin
1313
- python3 -m pip install --user --upgrade pip
14-
- python3 -m pip install --user --upgrade twine setuptools wheel awscli PyOpenSSL six
14+
- python3 -m pip install --user --upgrade twine awscli build setuptools
1515
- echo "\nBuild version data:"
1616
- echo "\nPython Version:"; python3 --version
1717
pre_build:
@@ -24,7 +24,7 @@ phases:
2424
build:
2525
commands:
2626
- echo Build started on `date`
27-
- python3 setup.py sdist bdist_wheel
27+
- python3 -m build
2828
- python3 -m twine upload -r pypi dist/*
2929
post_build:
3030
commands:

codebuild/cd/publish-to-test-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ phases:
1111
- sudo apt-get install python3 python3-pip -y
1212
- export PATH=$PATH:$HOME/.local/bin
1313
- python3 -m pip install --user --upgrade pip
14-
- python3 -m pip install --user --upgrade twine setuptools wheel awscli PyOpenSSL six
14+
- python3 -m pip install --user --upgrade twine awscli build setuptools
1515
- echo "\nBuild version data:"
1616
- echo "\nPython Version:"; python3 --version
1717
pre_build:
@@ -24,7 +24,7 @@ phases:
2424
build:
2525
commands:
2626
- echo Build started on `date`
27-
- python3 setup.py sdist bdist_wheel
27+
- python3 -m build
2828
- python3 -m twine upload -r testpypi dist/*
2929
post_build:
3030
commands:

codebuild/cd/test-prod-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ phases:
2828
- CURRENT_TAG_VERSION=$(cat $CODEBUILD_SRC_DIR/VERSION)
2929
- python3 codebuild/cd/pip-install-with-retry.py --no-cache-dir --user awsiotsdk==$CURRENT_TAG_VERSION
3030
# Run PubSub sample
31-
- python3 samples/mqtt5_pubsub.py --endpoint ${ENDPOINT} --cert /tmp/certificate.pem --key /tmp/privatekey.pem --ca_file /tmp/AmazonRootCA1.pem --verbosity Trace
31+
- python3 samples/mqtt/mqtt5_x509.py --endpoint ${ENDPOINT} --cert /tmp/certificate.pem --key /tmp/privatekey.pem
3232

3333
post_build:
3434
commands:

codebuild/cd/test-test-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ phases:
2929
- python3 -m pip install typing
3030
- python3 codebuild/cd/pip-install-with-retry.py -i https://testpypi.python.org/simple --user awsiotsdk==$CURRENT_TAG_VERSION
3131
# Run PubSub sample
32-
- python3 samples/mqtt5_pubsub.py --endpoint ${ENDPOINT} --cert /tmp/certificate.pem --key /tmp/privatekey.pem --ca_file /tmp/AmazonRootCA1.pem --verbosity Trace
32+
- python3 samples/mqtt/mqtt5_x509.py --endpoint ${ENDPOINT} --cert /tmp/certificate.pem --key /tmp/privatekey.pem
3333

3434
post_build:
3535
commands:

0 commit comments

Comments
 (0)