Skip to content

Commit 2cb04bd

Browse files
jjfrenchhrodmn
andauthored
chore: dependency upgrades (#68)
## Changes - Upgrades python version to 3.12 - Upgrades eoapi-cdk to ^10.2.4 ## What this fixes - Deployments relying on pyproj 3.7.2 - pgbouncer setup failures --------- Co-authored-by: hrodmn <henry.rodman@gmail.com>
1 parent 333f954 commit 2cb04bd

12 files changed

Lines changed: 157 additions & 183 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Setup Python
3636
uses: actions/setup-python@v3
3737
with:
38-
python-version: '3.11.4'
38+
python-version: '3.12'
3939

4040
- name: Assume Github OIDC role
4141
uses: aws-actions/configure-aws-credentials@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ __pycache__
88
.venv
99
.env
1010
.envrc
11+
.test-env
1112
.DS_Store
1213

1314
# CDK asset staging directory

cdk/PgStacInfra.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class PgStacInfra extends Stack {
125125
const titilerPgstacLambdaOptions: CustomLambdaFunctionProps = {
126126
code: lambda.Code.fromDockerBuild(__dirname, {
127127
file: "dockerfiles/Dockerfile.raster",
128-
buildArgs: { PYTHON_VERSION: "3.11" },
128+
buildArgs: { PYTHON_VERSION: "3.12" },
129129
}),
130130
role: titilerDataAccessRole,
131131
};

cdk/constructs/DpsStacItemGenerator/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface DpsStacItemGeneratorProps {
2727
/**
2828
* The lambda runtime to use for the item generation function.
2929
*
30-
* @default lambda.Runtime.PYTHON_3_11
30+
* @default lambda.Runtime.PYTHON_3_12
3131
*/
3232
readonly lambdaRuntime?: lambda.Runtime;
3333

@@ -142,7 +142,7 @@ export class DpsStacItemGenerator extends Construct {
142142

143143
const timeoutSeconds = props.lambdaTimeoutSeconds ?? 120;
144144
const batchSize = props.batchSize ?? 10;
145-
const lambdaRuntime = props.lambdaRuntime ?? lambda.Runtime.PYTHON_3_11;
145+
const lambdaRuntime = props.lambdaRuntime ?? lambda.Runtime.PYTHON_3_12;
146146

147147
// Create dead letter queue
148148
this.deadLetterQueue = new sqs.Queue(this, "DeadLetterQueue", {

cdk/constructs/DpsStacItemGenerator/runtime/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PYTHON_VERSION=3.11
1+
ARG PYTHON_VERSION=3.12
22
FROM public.ecr.aws/lambda/python:${PYTHON_VERSION}
33
COPY --from=ghcr.io/astral-sh/uv:0.7.8 /uv /uvx /bin/
44

cdk/constructs/DpsStacItemGenerator/runtime/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "An application for generating STAC items from DPS catalog.json ou
55
authors = [
66
{ name = "hrodmn", email = "henry@developmentseed.org" }
77
]
8-
requires-python = ">=3.11"
8+
requires-python = ">=3.12"
99
dependencies = [
1010
"obstore>=0.7.0",
1111
"pydantic>=2.11.0",

cdk/dockerfiles/Dockerfile.raster

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
ARG PYTHON_VERSION=3.11
1+
ARG PYTHON_VERSION=3.12
22

33
FROM --platform=linux/amd64 public.ecr.aws/lambda/python:${PYTHON_VERSION}
44

55
# Install system dependencies to compile (numexpr)
6-
RUN yum install -y gcc-c++
6+
RUN dnf install -y gcc-c++
77

88
WORKDIR /tmp
99
RUN python -m pip install pip -U
@@ -12,8 +12,12 @@ COPY runtimes/eoapi/raster /tmp/raster
1212
RUN python -m pip install "mangum>=0.14,<0.15" /tmp/raster["psycopg-binary"] -t /asset --no-binary pydantic
1313
RUN rm -rf /tmp/raster
1414

15+
# copy libexpat.so.1 into a location included in LD_LIBRARY_PATH in the Lambda runtime environment
16+
# (/usr/lib64 is not available in the Lambda runtime, just the build environment)
17+
RUN cp /usr/lib64/libexpat.so.1 /asset/
18+
1519
# Remove system dependencies
16-
RUN yum remove -y gcc-c++
20+
RUN dnf remove -y gcc-c++
1721

1822
# Reduce package size and remove useless files
1923
RUN cd /asset && find . -type f -name '*.pyc' | while read f; do n=$(echo $f | sed 's/__pycache__\///' | sed 's/.cpython-[0-9]*//'); cp $f $n; done;

cdk/runtimes/eoapi/raster/pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "eoapi.raster"
33
description = "Custom raster tiling service for MAAP"
44
readme = "README.md"
5-
requires-python = ">=3.10"
5+
requires-python = ">=3.12"
66
authors = [
77
{name = "Vincent Sarago", email = "vincent@developmentseed.com"},
88
{name = "Henry Rodman", email = "henry@developmentseed.com"},
@@ -12,8 +12,6 @@ classifiers = [
1212
"Intended Audience :: Information Technology",
1313
"Intended Audience :: Science/Research",
1414
"License :: OSI Approved :: MIT License",
15-
"Programming Language :: Python :: 3.10",
16-
"Programming Language :: Python :: 3.11",
1715
"Programming Language :: Python :: 3.12",
1816
"Topic :: Scientific/Engineering :: GIS",
1917
]

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"dependencies": {
2626
"aws-cdk-lib": "^2.190.0",
2727
"constructs": "^10.3.0",
28-
"eoapi-cdk": "^8.3.3",
28+
"eoapi-cdk": "^10.2.4",
2929
"source-map-support": "^0.5.16"
3030
}
3131
}

0 commit comments

Comments
 (0)