Commit f8066b0
authored
upgrade python to 3.12 (#1850)
## Overview
This commit upgrades the data.all framework from Python 3.9 to Python
3.12, modernizing the runtime environment and improving performance,
security, and compatibility.
## Key Changes
### 🐍 **Python Runtime Upgrade**
- **Core upgrade**: Python 3.9 → Python 3.12 across all environments
- **New runtime configuration**: Added
`deploy/stacks/runtime_options.py` to centrally manage Python version
settings
- **Lambda runtime**: Updated to use Python 3.12 runtime for AWS Lambda
functions
### 📦 **Dependency Updates** (either because they were incompatible with
3.12 or because they raised known vulnerabilities)
- **ariadne**: 0.17.0 → 0.26.2 (GraphQL library upgrade)
- **fastapi**: 0.115.5 → 0.116.1 (minor version bump)
- **PyYAML**: 6.0 → 6.0.2 (patch update)
- **aws-cdk-lib**: 2.177.0 → 2.208.0 (significant CDK upgrade)
### 🐳 **Docker Infrastructure Improvements**
- **Replace dev/Dockerfile**: Refactored prod Dockerfiles and compose to
use those in our local setup which reduces duplication but also the
local environment is close to the prod.
- **Simplified base images**: Removed custom Elasticsearch and
PostgreSQL Dockerfiles, now using official images
- **Health checks**: Added comprehensive health checks for all services
in docker-compose
- **Service dependencies**: Improved service dependency management with
condition-based startup
- **Removed wait-for-it.sh**: Eliminated custom wait script in favor of
Docker health checks
- **Use Configs, Secrets and Watch**: Replace volume mounts with the
more modern Configs (bind configs in containers), Secrets (bind secrets
in containers) and Watch (monitor for changes and sync them in the
container)
### 🏗️ **Container Orchestration Enhancements**
- **PostgreSQL**: Switched to official `postgres:16.4` image (match the
version used in Aurora)
- **Elasticsearch**: Switched to official
`docker.elastic.co/elasticsearch/elasticsearch:7.9.3` image
- **Service isolation**: Better container naming and networking
configuration
- **Startup reliability**: Enhanced service startup sequence with proper
health monitoring
### 🧹 **Code Cleanup**
- **Removed files**:
- `backend/docker/dev/wait-for-it.sh` (replaced by health checks)
- `compose/elasticsearch/Dockerfile` and config (using official image)
- `compose/postgres/Dockerfile` (using official image)
Resolve #18421 parent c191684 commit f8066b0
35 files changed
Lines changed: 273 additions & 418 deletions
File tree
- .github/workflows
- backend
- dataall
- base/cdkproxy
- modules
- datapipelines/cdk/blueprints/data_pipeline_blueprint
- s3_datasets/cdk
- docker
- dev
- prod
- ecs
- lambda
- compose
- elasticsearch
- config
- postgres
- deploy
- custom_resources
- stacks
- frontend/docker
- dev
- prod
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments