Skip to content

Commit 6108b38

Browse files
committed
downgrade fsspec and s3fs
1 parent 9944c7c commit 6108b38

File tree

4 files changed

+37
-9
lines changed

4 files changed

+37
-9
lines changed

infrastructure/aws/lambda/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
55

66
WORKDIR /tmp
77

8+
RUN dnf install -y gcc-c++
9+
810
COPY uv.lock .python-version pyproject.toml LICENSE README.md ./
911
COPY titiler/ ./titiler/
1012

11-
RUN dnf install -y gcc-c++
1213
RUN uv export --locked --no-editable --no-dev --extra lambda --extra telemetry --format requirements.txt -o requirements.txt && \
1314
uv pip install --compile-bytecode --no-binary pydantic --target /asset -r requirements.txt
1415

infrastructure/aws/lambda/handler.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
import earthaccess
88
from mangum import Mangum
9+
from opentelemetry import trace
10+
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
11+
from opentelemetry.instrumentation.logging import LoggingInstrumentor
12+
from opentelemetry.sdk.resources import SERVICE_NAME, SERVICE_VERSION, Resource
13+
from opentelemetry.sdk.trace import TracerProvider
914

1015
from titiler.cmr.main import app
1116
from titiler.cmr.settings import AuthSettings
@@ -16,6 +21,25 @@
1621
logging.getLogger("mangum.http").setLevel(logging.ERROR)
1722

1823

24+
LoggingInstrumentor().instrument(set_logging_format=True)
25+
FastAPIInstrumentor.instrument_app(app)
26+
27+
resource = Resource.create(
28+
{
29+
SERVICE_NAME: "titiler-cmr",
30+
SERVICE_VERSION: "0.1.0",
31+
}
32+
)
33+
34+
provider = TracerProvider(resource=resource)
35+
36+
# uses the OTEL_EXPORTER_OTLP_ENDPOINT env var
37+
# processor = BatchSpanProcessor(OTLPSpanExporter())
38+
# provider.add_span_processor(processor)
39+
40+
trace.set_tracer_provider(provider)
41+
42+
1943
@app.on_event("startup")
2044
async def startup_event() -> None:
2145
"""startup."""

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies = [
2828
"boto3>=1.34.145",
2929
"cftime~=1.6.4",
3030
"earthaccess~=0.11.0",
31+
"fsspec==2024.9.0",
3132
"geojson-pydantic>=2.0.0,<3.0",
3233
"h5netcdf~=1.1.0",
3334
"httpx>=0.27.2",
@@ -40,7 +41,7 @@ dependencies = [
4041
"python-dateutil>=2.9.0.post0",
4142
"rio_tiler[s3]>=7.2.0,<8.0",
4243
"rioxarray~=0.13.4",
43-
"s3fs~=2025.9.0",
44+
"s3fs~=2024.9.0",
4445
"xarray~=2024.9.0",
4546
]
4647
dynamic = ["version"]

uv.lock

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

0 commit comments

Comments
 (0)