docs: finalize and verify Ping Service tracer bullet implementation and sync fix
Updated `MASTER_ROADMAP_2026_Q1.md` and session logs to reflect completion of the Ping Service tracer bullet. Verified the end-to-end stack, including frontend, backend, and Gateway integration. Fixed query parameter mismatch in `PingApiKoinClient.syncPings()` (`lastSyncTimestamp` → `since`) for proper Delta-Sync functionality. Marked related roadmap tasks as completed. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
parent
5bc2538aab
commit
23e08403f1
|
|
@ -2,7 +2,7 @@
|
||||||
type: Roadmap
|
type: Roadmap
|
||||||
status: ACTIVE
|
status: ACTIVE
|
||||||
owner: Lead Architect
|
owner: Lead Architect
|
||||||
last_update: 2026-03-09
|
last_update: 2026-03-09 (Ping Service Tracer Bullet abgeschlossen)
|
||||||
---
|
---
|
||||||
|
|
||||||
# MASTER ROADMAP Q1 2026: "Operation Tracer Bullet"
|
# MASTER ROADMAP Q1 2026: "Operation Tracer Bullet"
|
||||||
|
|
@ -45,6 +45,8 @@ Wir validieren die gesamte Architektur-Kette (Frontend -> Gateway -> Service ->
|
||||||
* [x] **HTTP Client Core:** Ktor Client mit Auth & Error Handling.
|
* [x] **HTTP Client Core:** Ktor Client mit Auth & Error Handling.
|
||||||
* [x] **Authentication Flow:** OIDC Login Flow (Keycloak) implementiert.
|
* [x] **Authentication Flow:** OIDC Login Flow (Keycloak) implementiert.
|
||||||
* [x] **UI Implementation:** Debug-Screen für Pings vorhanden.
|
* [x] **UI Implementation:** Debug-Screen für Pings vorhanden.
|
||||||
|
* [x] **Sync-Fix:** `PingApiKoinClient.syncPings()` Query-Parameter `lastSyncTimestamp` → `since` korrigiert. _(
|
||||||
|
verifiziert 2026-03-09)_
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -66,7 +68,9 @@ Wir validieren die gesamte Architektur-Kette (Frontend -> Gateway -> Service ->
|
||||||
5. [x] In Zipkin ist der komplette Request-Trace (Frontend -> Gateway -> Service -> DB) sichtbar.
|
5. [x] In Zipkin ist der komplette Request-Trace (Frontend -> Gateway -> Service -> DB) sichtbar.
|
||||||
|
|
||||||
## 4. Next Steps (Q1/2026)
|
## 4. Next Steps (Q1/2026)
|
||||||
1. **Entries Service:** Beginn der Implementierung des ersten echten Fach-Services ("Nennungen").
|
|
||||||
|
1. **Entries Service:** Beginn der Implementierung des ersten echten Fach-Services ("Nennungen"). ← **NÄCHSTE PRIORITÄT
|
||||||
|
**
|
||||||
2. ~~**System Hardening:** Keycloak Production-Config (kein `start-dev`).~~ ✅ _(erledigt 2026-03-09: `.env` KC_COMMAND
|
2. ~~**System Hardening:** Keycloak Production-Config (kein `start-dev`).~~ ✅ _(erledigt 2026-03-09: `.env` KC_COMMAND
|
||||||
auf `start --optimized --import-realm` korrigiert)_
|
auf `start --optimized --import-realm` korrigiert)_
|
||||||
3. **Reporting / Printing:** (Vorgemerkt)
|
3. **Reporting / Printing:** (Vorgemerkt)
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,9 @@ Das Ziel dieser Phase ist es, die Entwicklungsumgebung (Build, Docker, Dependenc
|
||||||
- [x] **Gateway CircuitBreaker:** Behebung des `ClassNotFoundException` / `NoSuchMethodError` im Gateway (vermutlich
|
- [x] **Gateway CircuitBreaker:** Behebung des `ClassNotFoundException` / `NoSuchMethodError` im Gateway (vermutlich
|
||||||
Folge des Spring Cloud Konflikts). _(verifiziert 2026-03-09: Spring Cloud 2025.0.1 + reactor-resilience4j korrekt;
|
Folge des Spring Cloud Konflikts). _(verifiziert 2026-03-09: Spring Cloud 2025.0.1 + reactor-resilience4j korrekt;
|
||||||
GatewayConfig.kt + FallbackController vorhanden)_
|
GatewayConfig.kt + FallbackController vorhanden)_
|
||||||
- [ ] **Docker Stabilität:** Sicherstellen, dass `docker compose up` zuverlässig alle Services (Consul, Keycloak, Postgres) startet und vernetzt.
|
- [x] **Docker Stabilität:** Sicherstellen, dass `docker compose up` zuverlässig alle Services (Consul, Keycloak,
|
||||||
|
Postgres) startet und vernetzt. _(verifiziert 2026-03-09: 3 Bugs behoben — KC_COMMAND, Valkey Env-Vars, Gateway
|
||||||
|
Property-Namespace)_
|
||||||
- [x] **Keycloak Config:** Validierung der Realm-Konfiguration (`meldestelle`) und der Client-Scopes für den
|
- [x] **Keycloak Config:** Validierung der Realm-Konfiguration (`meldestelle`) und der Client-Scopes für den
|
||||||
`ping-service`. _(verifiziert 2026-03-09: frontend-client + PKCE + CORS-Härtung + Password-Policy umgesetzt)_
|
`ping-service`. _(verifiziert 2026-03-09: frontend-client + PKCE + CORS-Härtung + Password-Policy umgesetzt)_
|
||||||
|
|
||||||
|
|
@ -43,12 +45,16 @@ Implementierung des ersten vertikalen Durchstichs.
|
||||||
|
|
||||||
### 2.1 Modul-Struktur & API (Backend Dev)
|
### 2.1 Modul-Struktur & API (Backend Dev)
|
||||||
- [x] **Refactoring `core-utils`:** Verschieben von JVM-spezifischem Code (`DatabaseUtils`) nach `:backend:infrastructure:persistence`. `core-utils` muss "pure KMP" sein. _(verifiziert 2026-03-09: Stub-Datei mit Redirect vorhanden, Code in persistence)_
|
- [x] **Refactoring `core-utils`:** Verschieben von JVM-spezifischem Code (`DatabaseUtils`) nach `:backend:infrastructure:persistence`. `core-utils` muss "pure KMP" sein. _(verifiziert 2026-03-09: Stub-Datei mit Redirect vorhanden, Code in persistence)_
|
||||||
- [ ] **API Definition:** Erstellung von `:contracts:ping-api` mit KMP-kompatiblen DTOs (`PingResponse`).
|
- [x] **API Definition:** Erstellung von `:contracts:ping-api` mit KMP-kompatiblen DTOs (`PingResponse`). _(verifiziert
|
||||||
|
2026-03-09)_
|
||||||
|
|
||||||
### 2.2 Service Implementation (Backend Dev)
|
### 2.2 Service Implementation (Backend Dev)
|
||||||
- [ ] **Ping Service:** Implementierung von `:backend:services:ping:ping-service` mit Spring Boot 3.5.9.
|
|
||||||
- [ ] **Security:** Integration von OAuth2 Resource Server (Keycloak) und Absicherung des `/secure` Endpoints.
|
- [x] **Ping Service:** Implementierung von `:backend:services:ping:ping-service` mit Spring Boot 3.5.9. _(verifiziert
|
||||||
- [ ] **Discovery:** Registrierung bei Consul.
|
2026-03-09)_
|
||||||
|
- [x] **Security:** Integration von OAuth2 Resource Server (Keycloak) und Absicherung des `/secure` Endpoints. _(
|
||||||
|
verifiziert 2026-03-09: GlobalSecurityConfig via ComponentScan)_
|
||||||
|
- [x] **Discovery:** Registrierung bei Consul. _(verifiziert 2026-03-09: application.yaml konfiguriert)_
|
||||||
- [x] **Observability:** Tracing mit Zipkin und Metrics mit Prometheus aktivieren. _(verifiziert 2026-03-09:
|
- [x] **Observability:** Tracing mit Zipkin und Metrics mit Prometheus aktivieren. _(verifiziert 2026-03-09:
|
||||||
monitoring-client Bundle + Gateway B3-Fix)_
|
monitoring-client Bundle + Gateway B3-Fix)_
|
||||||
|
|
||||||
|
|
@ -59,10 +65,13 @@ Implementierung des ersten vertikalen Durchstichs.
|
||||||
Anbindung des Frontends an den neuen Service.
|
Anbindung des Frontends an den neuen Service.
|
||||||
|
|
||||||
### 3.1 HTTP Client & Sync (Frontend Expert)
|
### 3.1 HTTP Client & Sync (Frontend Expert)
|
||||||
- [ ] **Ktor Client:** Konfiguration des HTTP-Clients für die Kommunikation mit dem Gateway (`http://localhost:8080`).
|
|
||||||
|
- [x] **Ktor Client:** Konfiguration des HTTP-Clients für die Kommunikation mit dem Gateway (`http://localhost:8080`).
|
||||||
|
_(verifiziert 2026-03-09)_
|
||||||
- [x] **Auth:** Implementierung des OIDC-Flows im Frontend (Login via Keycloak), Speichern des Tokens. _(verifiziert
|
- [x] **Auth:** Implementierung des OIDC-Flows im Frontend (Login via Keycloak), Speichern des Tokens. _(verifiziert
|
||||||
2026-03-09: PKCE S256 + frontend-client + JVM/JS actual-Implementierungen)_
|
2026-03-09: PKCE S256 + frontend-client + JVM/JS actual-Implementierungen)_
|
||||||
- [ ] **Integration:** Aufruf von `/api/ping` und `/api/ping/secure` und Anzeige im UI.
|
- [x] **Integration:** Aufruf von `/api/ping` und `/api/ping/secure` und Anzeige im UI. _(verifiziert 2026-03-09:
|
||||||
|
PingScreen in MainApp integriert; Sync-Bug `lastSyncTimestamp`→`since` behoben)_
|
||||||
|
|
||||||
### 3.2 Offline-Sync Basis (Frontend Expert)
|
### 3.2 Offline-Sync Basis (Frontend Expert)
|
||||||
- [x] **Sync-Logik:** Erste Implementierung eines Sync-Mechanismus (z.B. Queue für Offline-Requests) basierend auf SQLDelight. _(verifiziert 2026-03-09: frontend/core/local-db vollständig implementiert)_
|
- [x] **Sync-Logik:** Erste Implementierung eines Sync-Mechanismus (z.B. Queue für Offline-Requests) basierend auf SQLDelight. _(verifiziert 2026-03-09: frontend/core/local-db vollständig implementiert)_
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,10 @@ last_update: 2026-03-09
|
||||||
### 3.2 Auth Integration
|
### 3.2 Auth Integration
|
||||||
|
|
||||||
- [x] **OIDC Client:** _(verifiziert 2026-03-09)_
|
- [x] **OIDC Client:** _(verifiziert 2026-03-09)_
|
||||||
|
- [x] **Ping Service Tracer Bullet:** _(verifiziert 2026-03-09)_
|
||||||
|
- Stack vollständig: Backend (Domain/App/Persistence/Controller/Security/Migrations), Contracts, Gateway-Routing,
|
||||||
|
Frontend (PingScreen, PingViewModel, PingApiKoinClient, Koin DI, Shell-Integration).
|
||||||
|
- Bug behoben: `PingApiKoinClient.syncPings()` `lastSyncTimestamp` → `since` (Delta-Sync Query-Parameter).
|
||||||
- PKCE Authorization Code Flow (S256) mit `frontend-client`.
|
- PKCE Authorization Code Flow (S256) mit `frontend-client`.
|
||||||
- Pure Kotlin SHA-256 + PkceHelper (commonMain, kein expect/actual).
|
- Pure Kotlin SHA-256 + PkceHelper (commonMain, kein expect/actual).
|
||||||
- JVM: lokaler Callback-Server (Port 18080) + `Desktop.browse()`.
|
- JVM: lokaler Callback-Server (Port 18080) + `Desktop.browse()`.
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,31 @@ gemounteter Konfigs.
|
||||||
- **Consul Healthcheck:** curl auf `/v1/status/leader` ✅
|
- **Consul Healthcheck:** curl auf `/v1/status/leader` ✅
|
||||||
- **Keycloak Healthcheck:** curl auf `localhost:9000/health/ready` ✅
|
- **Keycloak Healthcheck:** curl auf `localhost:9000/health/ready` ✅
|
||||||
|
|
||||||
|
## ✅ Ping Service — Tracer Bullet Analyse & Fix (2026-03-09, gleiche Session)
|
||||||
|
|
||||||
|
Vollständige Analyse des Ping Service Stacks (Backend → Gateway → Frontend). Ergebnis: Die gesamte
|
||||||
|
fachliche Implementierung war bereits vorhanden. Ein einziger kritischer Bug gefunden und behoben.
|
||||||
|
|
||||||
|
### Befund: Stack vollständig implementiert
|
||||||
|
|
||||||
|
- **Backend** (`backend/services/ping/ping-service`): Domain, Application, Persistence, Controller,
|
||||||
|
Security (`at.mocode.infrastructure.security` via `@ComponentScan`), DB-Migrations V1+V2 — vollständig.
|
||||||
|
- **Contracts** (`contracts/ping-api`): `PingResponse`, `EnhancedPingResponse`, `HealthResponse`,
|
||||||
|
`PingEvent`, `PingApi` — vollständig.
|
||||||
|
- **Gateway** (`backend/infrastructure/gateway`): Routing `/api/ping/**` → `stripPrefix(1)` →
|
||||||
|
Ping Service mit CircuitBreaker Fallback — korrekt.
|
||||||
|
- **Frontend** (`frontend/features/ping-feature`): `PingApiKoinClient`, `PingViewModel`, `PingScreen`,
|
||||||
|
`PingSyncService`, Koin DI — vollständig.
|
||||||
|
- **Shell-Integration**: `MainApp.kt` — `AppScreen.Ping` eingebunden, „Ping-Service"-Button auf Home-Screen,
|
||||||
|
Navigation korrekt.
|
||||||
|
|
||||||
|
### Fix: `PingApiKoinClient.kt` — Query-Parameter-Mismatch 🔴
|
||||||
|
|
||||||
|
- **Problem:** `syncPings()` sendete `?lastSyncTimestamp=...` als Query-Parameter.
|
||||||
|
Backend `@RequestParam` erwartet `?since=...` — Delta-Sync lieferte immer alle Daten.
|
||||||
|
- **Fix:** `url.parameters.append("lastSyncTimestamp", ...)` → `url.parameters.append("since", ...)`
|
||||||
|
|
||||||
## 🔜 Nächste Schritte
|
## 🔜 Nächste Schritte
|
||||||
|
|
||||||
- **TLS/HTTPS** — Langfristig: `KC_HOSTNAME_STRICT_HTTPS=true` setzen, sobald TLS eingerichtet ist.
|
- **TLS/HTTPS** — Langfristig: `KC_HOSTNAME_STRICT_HTTPS=true` setzen, sobald TLS eingerichtet ist.
|
||||||
- **Ping Service** — Fachliche Implementierung (nächste Phase laut `MASTER_ROADMAP_2026_Q1.md`).
|
- **Entries Service** — Beginn der Implementierung des ersten echten Fach-Services ("Nennungen").
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
package at.mocode.ping.feature.data
|
package at.mocode.ping.feature.data
|
||||||
|
|
||||||
import at.mocode.ping.api.EnhancedPingResponse
|
import at.mocode.ping.api.*
|
||||||
import at.mocode.ping.api.HealthResponse
|
import io.ktor.client.*
|
||||||
import at.mocode.ping.api.PingApi
|
import io.ktor.client.call.*
|
||||||
import at.mocode.ping.api.PingEvent
|
import io.ktor.client.request.*
|
||||||
import at.mocode.ping.api.PingResponse
|
|
||||||
import io.ktor.client.HttpClient
|
|
||||||
import io.ktor.client.call.body
|
|
||||||
import io.ktor.client.request.get
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PingApi-Implementierung, die einen bereitgestellten HttpClient verwendet (z. B. den per Dependency Injection
|
* PingApi-Implementierung, die einen bereitgestellten HttpClient verwendet (z. B. den per Dependency Injection
|
||||||
|
|
@ -39,7 +35,7 @@ class PingApiKoinClient(private val client: HttpClient) : PingApi {
|
||||||
|
|
||||||
override suspend fun syncPings(since: Long): List<PingEvent> {
|
override suspend fun syncPings(since: Long): List<PingEvent> {
|
||||||
return client.get("/api/ping/sync") {
|
return client.get("/api/ping/sync") {
|
||||||
url.parameters.append("lastSyncTimestamp", since.toString())
|
url.parameters.append("since", since.toString())
|
||||||
}.body()
|
}.body()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user