Skip to content

Commit 2420477

Browse files
author
Rico Huijbers
committed
chore: fix rest of the Python build
1 parent 2f8d707 commit 2420477

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ $ cdk destroy
8383
| [fargate-load-balanced-service](https://github.com/aws-samples/aws-cdk-examples/tree/master/python/ecs/fargate-load-balanced-service/) | Starting a container fronted by a load balancer on Fargate |
8484
| [fargate-service-with-auto-scaling](https://github.com/aws-samples/aws-cdk-examples/tree/master/python/ecs/fargate-service-with-auto-scaling/) | Starting an ECS service of FARGATE launch type that auto scales based on average CPU Utilization |
8585
| [lambda-cron](https://github.com/aws-samples/aws-cdk-examples/tree/master/python/lambda-cron/) | Running a Lambda on a schedule |
86-
| [stepfunctions-job-poller](https://github.com/aws-samples/aws-cdk-examples/tree/master/python/stepfunctions-job-poller/) | A simple StepFunctions workflow |
86+
| [stepfunctions](https://github.com/aws-samples/aws-cdk-examples/tree/master/python/stepfunctions/) | A simple StepFunctions workflow |
8787

8888
## JavaScript examples
8989

python/custom-resource/my_custom_resource.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ def __init__(self, scope: cdk.Construct, id: str, **kwargs) -> None:
1010
code_body = fp.read()
1111

1212
resource = cfn.CustomResource(
13-
self, "Resource", lambda_provider=lambda_.SingletonFunction(
13+
self, "Resource",
14+
provider=cfn.CustomResourceProvider.lambda_(lambda_.SingletonFunction(
1415
self,
1516
"Singleton",
1617
uuid="f7d4f730-4ee1-11e8-9c2d-fa7ae01bbebc",
1718
code=lambda_.InlineCode(code_body),
1819
handler="index.main",
1920
timeout=300,
2021
runtime=lambda_.Runtime.PYTHON27,
21-
),
22+
)),
2223
properties=kwargs,
2324
)
2425

python/stepfunctions/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, app: cdk.App, id: str, **kwargs) -> None:
2323
)
2424
wait_x = sfn.Wait(
2525
self, "Wait X Seconds",
26-
seconds_path="$.wait_time",
26+
duration=sfn.WaitDuration.seconds_path('$.wait_time'),
2727
)
2828
get_status = sfn.Task(
2929
self, "Get Job Status",

scripts/build-python.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ python3 -m venv /tmp/.venv
88
for requirements in $(find python -name requirements.txt); do
99
(
1010
cd $(dirname $requirements)
11-
[[ ! -f DO_NOT_AUTOTEST ]] || exit
11+
[[ ! -f DO_NOT_AUTOTEST ]] || exit 0
1212

1313
source /tmp/.venv/bin/activate
1414
pip install -r requirements.txt
1515

1616
cp $scriptdir/fake.context.json cdk.context.json
1717
npx cdk synth
18-
rm cdk.context.json
18+
rm -f cdk.context.json
1919
)
2020
done

0 commit comments

Comments
 (0)