Skip to content

Commit d190ec2

Browse files
jsell-rhclaude
andauthored
chore(deps): update apache/age, spicedb, and ubi9 base images (#304)
* feat(infrastructure): add SQLAlchemy async database foundation with Alembic - Add SQLAlchemy 2.0 with asyncpg for async database operations - Add Alembic for schema migrations - Add python-ulid for ULID support instead of UUID - Create read/write engine separation with connection pooling - Create FastAPI dependency injection for database sessions - Create SQLAlchemy declarative base with timestamp mixin - Initialize Alembic with async migration support - Create initial migration for teams table (ULID primary key) - Add comprehensive unit tests for engines and dependencies - Configure Alembic to use settings module for database URL - Enable ruff post-write hook for migration formatting Refs: AIHCM-121 * feat(shared-kernel): add authorization abstractions and SpiceDB client - Add authzed library for SpiceDB integration - Add python-ulid for ULID support - Create ResourceType, RelationType, Permission enums (using Group not Team) - Create AuthorizationProvider protocol for swappable implementations - Implement SpiceDBClient with async methods for relationships and permissions - Create SpiceDB schema (.zed) with Tenant→Workspace→Group hierarchy - Create AuthorizationProbe for domain-oriented observability - Move ObservationContext to shared_kernel (fix architectural boundary) - Add 35 unit tests for types and probes - All 410 tests passing Refs: AIHCM-122 * ci: automerge mintmaker non-major upgrades if tests pass * fix(deploy): set postgres uid/gid to 001379999 * refactor(api.iam): rename Role to GroupRole * refactor(api.iam): add TenantMember value object * refactor(api.iam): add TenantMemberAdded event and method * refactor(api.iam): add TenantMemberRemoved event and method * feat(iam.presentation): add workspace DTOs and router skeleton Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * feat(iam.presentation): implement POST /workspaces endpoint with TDD Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * feat(iam.presentation): implement GET /workspaces/{id} endpoint and add route documentation Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * feat(iam.presentation): implement GET /workspaces list endpoint with TDD Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * feat(iam.presentation): implement DELETE /workspaces/{id} endpoint with TDD Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * fix(shared_kernel): align SpiceDB schema with translator implementation Fix workspace definition in schema.zed and ConfigMap to match the relationships actually created by the IAM outbox translator. Schema changes (workspace definition): - Add `relation tenant: tenant` for organizational ownership - Change `relation parent: tenant` to `relation parent: workspace` for hierarchy - Rename `owner` to `admin` for consistency with tenant/group definitions - Rename `permission delete` to `permission manage` for consistency - Add Phase 3 comments for member/permission usage ConfigMap changes (full sync with schema.zed): - Apply all workspace definition fixes above - Add missing `relation member: user` to tenant definition - Fix tenant `permission view = admin` to `permission view = admin + member` - Add missing `permission administrate = admin` to tenant definition - Add missing `api_key` definition (was in schema.zed but not ConfigMap) - Add future resource type comments Inconsistencies found and documented: 1. Schema had `relation parent: tenant` but translator writes `workspace#tenant@tenant` (relation name 'tenant') and `workspace#parent@workspace` (parent type 'workspace') 2. ConfigMap was missing tenant `member` relation, `administrate` permission, and entire `api_key` definition 3. RelationType.WORKSPACE enum exists but is unused by any translator 4. Permission.DELETE enum value corresponds to removed `permission delete` in workspace; may need cleanup in Phase 3 5. Schema `owner` relation on workspace renamed to `admin` to align with tenant and group naming conventions All 970 unit tests pass (3 pre-existing SSL failures unrelated). Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * refactor(shared_kernel): remove unused authorization enum values Remove RelationType.WORKSPACE and Permission.DELETE which have no usage in the codebase. Neither value corresponds to any relation or permission in the current SpiceDB schema. They can be re-added when future resource types (knowledge_graph, data_source) are implemented. Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * fix(shared_kernel): update future schema references to use admin relation Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * chore(deps): update apache/age, spicedb, and ubi9 base images - apache/age: release_PG17_1.6.0 → release_PG18_1.7.0 - authzed/spicedb: v1.48.0 → v1.50.0 - ubi9/python-312: pin to digest sha256:d7b4607a... Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(deps): pin spicedb-migrate version and update postgres client to PG18 - Pin spicedb-migrate to v1.50.0 to match spicedb service - Update db-init job and compose postgres client from 17-alpine to 18-alpine Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
1 parent d9cb51f commit d190ec2

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
services:
2020
postgres:
21-
image: apache/age:release_PG17_1.6.0
21+
image: apache/age:release_PG18_1.7.0
2222
env:
2323
POSTGRES_USER: kartograph
2424
POSTGRES_PASSWORD: kartograph_dev_password
@@ -52,7 +52,7 @@ jobs:
5252
-p 50051:50051 \
5353
-p 50052:50052 \
5454
--entrypoint spicedb \
55-
quay.io/authzed/spicedb:v1.48.0 \
55+
quay.io/authzed/spicedb:v1.50.0 \
5656
serve-testing
5757
5858
- name: Set up uv

compose.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ services:
2525
start_period: 30s
2626

2727
spicedb:
28-
image: authzed/spicedb:v1.48.0
28+
image: authzed/spicedb:v1.50.0
2929
command: "serve"
3030
env_file:
3131
- env/spicedb.env
@@ -52,7 +52,7 @@ services:
5252
start_period: 10s
5353

5454
spicedb-migrate:
55-
image: "authzed/spicedb"
55+
image: "authzed/spicedb:v1.50.0"
5656
command: "migrate head"
5757
restart: "on-failure"
5858
networks:
@@ -67,7 +67,7 @@ services:
6767

6868
# Transient service to ensure the 'spicedb' database exists
6969
db-init:
70-
image: postgres:17-alpine
70+
image: postgres:18-alpine
7171
networks:
7272
- kartograph
7373
env_file:
@@ -82,7 +82,7 @@ services:
8282
condition: service_healthy
8383

8484
postgres:
85-
image: apache/age:release_PG17_1.6.0
85+
image: apache/age:release_PG18_1.7.0
8686
env_file:
8787
- env/postgres.env
8888
ports:

deploy/apps/kartograph/base/job-db-init.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
initContainers:
1818
# Wait for Postgres to be ready
1919
- name: wait-for-postgres
20-
image: postgres:17-alpine
20+
image: postgres:18-alpine
2121
imagePullPolicy: IfNotPresent
2222
command:
2323
- sh
@@ -30,7 +30,7 @@ spec:
3030
echo "PostgreSQL is ready!"
3131
containers:
3232
- name: init
33-
image: postgres:17-alpine
33+
image: postgres:18-alpine
3434
imagePullPolicy: IfNotPresent
3535
env:
3636
- name: PGHOST

deploy/apps/kartograph/base/job-spicedb-migrate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
echo "DB init complete!"
4040
containers:
4141
- name: migrate
42-
image: authzed/spicedb:v1.48.0
42+
image: authzed/spicedb:v1.50.0
4343
imagePullPolicy: IfNotPresent
4444
args:
4545
- migrate

deploy/apps/kartograph/base/postgres-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
securityContext: {}
2020
containers:
2121
- name: postgres
22-
image: apache/age:release_PG17_1.6.0
22+
image: apache/age:release_PG18_1.7.0
2323
securityContext:
2424
runAsNonRoot: true
2525
allowPrivilegeEscalation: false

deploy/apps/kartograph/base/spicedb-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
echo "Migration complete!"
4040
containers:
4141
- name: spicedb
42-
image: authzed/spicedb:v1.48.0
42+
image: authzed/spicedb:v1.50.0
4343
imagePullPolicy: IfNotPresent
4444
securityContext:
4545
runAsNonRoot: true

src/api/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage - using Red Hat UBI9 Python image
2-
FROM registry.access.redhat.com/ubi9/python-312:9.7-1765181854 AS builder
2+
FROM registry.access.redhat.com/ubi9/python-312@sha256:d7b4607a07e0e831e7ea9a66d91dc39251ae3ce17bad540f2d19e44407073f9b AS builder
33

44
# Install build dependencies for psycopg2 compilation
55
USER 0
@@ -37,7 +37,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
3737

3838

3939
# Production stage - using Red Hat UBI9 Python image
40-
FROM registry.access.redhat.com/ubi9/python-312:9.7-1765181854
40+
FROM registry.access.redhat.com/ubi9/python-312@sha256:d7b4607a07e0e831e7ea9a66d91dc39251ae3ce17bad540f2d19e44407073f9b
4141
# It is important to use the image that matches the builder, as the path to the
4242
# Python executable must be the same
4343

0 commit comments

Comments
 (0)