Skip to content

Staging - #1606

Open
BrdH7940 wants to merge 183 commits into
nashtech-garage:mainfrom
23122004:staging
Open

Staging#1606
BrdH7940 wants to merge 183 commits into
nashtech-garage:mainfrom
23122004:staging

Conversation

@BrdH7940

Copy link
Copy Markdown

No description provided.

github-actions Bot and others added 29 commits July 7, 2026 12:26
Fix: write permissions missing
chore(gitops): separate dev and staging targetRevisions and workflows
…8m to prevent node OOM eviction

- Increase memory requests from 128Mi to 256Mi for all backend services in dev and staging
- Reduce JVM -Xmx from 160m to 128m to lower actual memory footprint
- This helps scheduler distribute pods more evenly across nodes
- Node 37c7zk was at 99% memory causing pod evictions
The per-service ServiceMonitors scraped /actuator/prometheus:8090, an endpoint
the Spring Boot apps do not expose (micrometer-prometheus not on classpath).
Every scrape returned HTTP 500, which the Istio sidecars recorded as errors,
turning all backend nodes red in Kiali (dev + staging). JVM metrics already
flow via the OTel agent -> Collector -> Prometheus (job yas-msa/<svc>), so
these ServiceMonitors produced zero data and only added error noise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bitdive-review

Copy link
Copy Markdown

BitDive Runtime Review - PR #1606

PR: #1606
Branch: staging -> main
Method: BitDive runtime trace comparison + direct HTTP verification + targeted code inspection
Verdict: APPROVE WITH NOTES
Confidence: High — two independent iterations converge; the only production Java change is a compiler annotation

Summary

This 264-file PR is overwhelmingly CI/CD pipeline infrastructure, K8s Helm charts, test additions, and frontend TypeScript. The only production Java source change is a @SuppressWarnings("unchecked") annotation on SecurityConfig.userAuthoritiesMapperForKeycloak() in backoffice-bff — a compiler directive with zero runtime impact. Root pom.xml downgrades the JDK target from 25 to 21 and adds JaCoCo coverage.

Three before/after trace pairs on deployed services (product, location, inventory) show zero contract divergence with clean baselines — identical SQL, REST, writes, data payloads, and execution trees. All four deployed services compile on JDK 21 and serve HTTP 200. Two consecutive review iterations converge on the same verdict with no new findings.

Runtime Verification Matrix

Area Result Behavior Δ Meaning Evidence
Product listing Stable HTTP 200→200 · SQL 3→3 · REST 1→1 · writes 0→0 · zero contract drift No behavioral change; product catalog serves identically before / after
Location countries Stable HTTP 200→200 · SQL 1→1 · REST 0→0 · writes 0→0 · 249→249 nodes No behavioral change; full country list (249 entries) identical before / after
Inventory warehouses Stable HTTP 200→200 · SQL 1→1 · REST 0→0 · writes 0→0 · 3→3 nodes No behavioral change; warehouse list (3 entries) identical before / after
Media API docs Stable HTTP 200→200 (framework endpoint) Springdoc v3/api-docs serves; no JVM tree expected HTTP-only
Maven JDK 21 build Stable 4 services compiled · Docker images built · containers started JDK 21 downgrade compiles all deployed services Code-only
CI/CD & K8s charts Stable YAML valid · images parameterized · JDK inconsistency noted Workflows and Helm charts structurally sound Code-only
How to read BitDive evidence

Open an Evidence share link. The Behavior Δ / diff blocks summarize the contract change; the share link is the full proof (call tree · SQL · writes · downstream · first divergence). GitHub strips target="_blank" — links open in the same tab.

  • Trace pair — full call trees compared before/after
  • HTTP only — status/body verified; no JVM tree
  • Code only — static inspection, no runtime trace
Review scope and validation coverage
Deployed services (JDK 21, Docker-compose local)
  -> product   -> ProductController.getProductsByMultiQuery()   [trace pair ✓]
  -> location  -> CountryController.getAllCountries()           [trace pair ✓]
  -> inventory -> WarehouseController.getWarehouses()           [trace pair ✓]
  -> media     -> Springdoc v3/api-docs                         [HTTP only]

Code-only verification
  -> backoffice-bff -> SecurityConfig @SuppressWarnings          [compiler annotation, zero runtime impact]
  -> CI/CD          -> 29+ workflow files, JDK 21 vs 25 audit    [static analysis]
  -> K8s charts     -> deployment strategy, probes, resources    [static analysis]
  -> Frontend       -> backoffice/storefront TypeScript          [out of scope: not JVM-traceable]
Behavior Scenario Evidence Status
Product catalog query GET product list (storefront) Trace pair Stable
Country list GET countries (storefront) Trace pair Stable
Warehouse list GET warehouses (backoffice, auth) Trace pair Stable
Media API docs GET v3/api-docs HTTP only Stable
JDK 21 compilation Maven build → Docker → serve Code Stable
CI/CD & K8s Workflow + chart review Code Stable

Out of scope: Frontend TypeScript/React changes (60+ files), test file additions, delivery/search/sampledata (not deployed in this environment). CI/CD pipeline YAML is the primary PR intent — human review recommended.

Change #1 — stable deploy canaries (no collateral regression)

Three before/after trace pairs independently verified. All show clean baselines, zero contract divergence, zero write delta, zero downstream delta. The only production Java change in this PR is a @SuppressWarnings("unchecked") compiler annotation — it cannot produce runtime behavioral differences.

Behavior contract

# Deploy canary scenarios — runtime contract (3 services paired)
- HTTP 200 OK (product 1195ms, location 437ms, inventory 305ms)
+ HTTP 200 OK (product 30ms, location 131ms, inventory 7ms)
- SQL: product 3 reads, location 1 read, inventory 1 read
+ SQL: product 3 reads, location 1 read, inventory 1 read  (identical)
- REST: product 1 (MediaService.getMedia), location 0, inventory 0
+ REST: product 1 (MediaService.getMedia), location 0, inventory 0  (identical)
- writes: 0 across all three services
+ writes: 0 across all three services  (identical)
- data: iPhone 15 ($799), 249 countries, 3 warehouses (WH With Stock, BRR Base, BRR Head)
+ data: iPhone 15 ($799), 249 countries, 3 warehouses  (identical)
# first divergence: MediaService.getMedia() response date header (timestamp only — no contract impact)

Scenario matrix

Scenario Endpoint Before PR After PR Result
Product catalog GET /product/storefront/products 200, 1195ms, 4 nodes 200, 30ms, 4 nodes Zero drift
Country list GET /location/storefront/countries 200, 437ms, 249 nodes 200, 131ms, 249 nodes Zero drift
Warehouse list GET /inventory/backoffice/warehouses 200, 305ms, 3 nodes 200, 7ms, 3 nodes Zero drift

Trace evidence

Trace Scenario HTTP SQL / REST Result
before Product 200 3 SQL, 1 REST Clean
after Product 200 3 SQL, 1 REST Clean
before Location 200 1 SQL Clean
after Location 200 1 SQL Clean
before Inventory 200 1 SQL Clean
after Inventory 200 1 SQL Clean

Contract delta

Layer Before PR After PR Result
HTTP 200 all 3 services 200 all 3 services No drift
Persistence / SQL product 3, location 1, inventory 1 identical No drift
Downstream / REST product 1 (MediaService), others 0 identical No drift
Data / args iPhone 15, 249 countries, 3 warehouses identical No drift
Steps / time 4 / 249 / 3 nodes (slower — cold JVM) 4 / 249 / 3 nodes (faster — warm JVM) No drift

Key trace delta

First meaningful divergence: MediaService.getMedia() — HTTP date response header timestamp only. No SQL, write, data, or structural divergence.

Branch Trace shape
Before PR product 4 nodes (1195ms), location 249 nodes (437ms), inventory 3 nodes (305ms) — cooler JVM state
After PR product 4 nodes (30ms), location 249 nodes (131ms), inventory 3 nodes (7ms) — warm JVM state

Timing difference is attributed to JVM warmup state on the baseline. Contract comparison confirms zero divergence despite timing variance.

Advisory findings (non-blocking)
Finding Impact Blocking
JDK version inconsistency: action.yaml uses JDK 21 (aligned with pom.xml) but new ci.yml / deploy-dev.yml / deploy-staging.yml use JDK 25 CI may compile with JDK 25 targeting 21 — works but should be aligned No
GHCR registry namespace changed from nashtech-garage to 23122004 in new CI/CD workflows Old per-service CI files still reference old namespace; K8s charts are parameterized so not runtime-breaking No
MediaService.getMedia() returns REST status -1 on product traces Pre-existing degraded media integration; same on both sides, handled gracefully by product service No

Follow-Ups

Type Item Blocking
Advisory Align JDK version: action.yaml = 21 but new CI workflows = 25 — pick one consistently No
Advisory Verify GHCR namespace 23122004 is intentional across all new CI workflows No
Non-blocking Human review of CI/CD pipeline YAML and K8s chart changes (primary PR intent) No
Informational Pre-existing MediaService.getMedia() REST -1 status present on both sides No

Recommendation

Approve with notes. This is a CI/CD and infrastructure PR (264 files) with zero production runtime behavioral changes. The only production Java change is a @SuppressWarnings compiler annotation. Three before/after trace pairs independently verified show zero contract divergence with clean baselines. JDK 21 compilation succeeded for all four deployed services. Two consecutive review iterations converge on the same verdict. Advisory notes on JDK version alignment and GHCR namespace are recommended follow-ups for the PR author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants