Skip to content

Implement org app deployment layer#161

Merged
aidankhogg merged 1 commit into
dev/alphafrom
codex/implement-app-deployment-layer-in-app_handler.py
Jun 29, 2026
Merged

Implement org app deployment layer#161
aidankhogg merged 1 commit into
dev/alphafrom
codex/implement-app-deployment-layer-in-app_handler.py

Conversation

@aidankhogg

Copy link
Copy Markdown
Contributor

Motivation

  • Replace the previous hardcoded app image map with a real app catalog and implement a deterministic, auditable org-app deployment flow.
  • Use runtime/spec identity outputs for OIDC wiring instead of baked-in Keycloak values and make certificate injection and lifecycle operations deterministic and testable.

Description

  • Add a structured catalog abstraction (AppCatalog, AppCatalogEntry, AppOIDCSettings, AppDNSSettings) to represent image, ports, env, volumes, healthcheck path, OIDC and DNS behavior and load spec-provided entries.
  • Rework AppHandler.deploy_app to derive deployment behavior from the catalog, persist status transitions (deploying, deployed, failed) and failure details via _persist_deployment, and record issued certificate metadata via _record_certificate.
  • Make certificate injection deterministic by creating a host cert directory and passing a read-only bind mount into start_container (via _prepare_cert_mount) before starting the container instead of copying into a running container.
  • Add lifecycle helpers on AppHandler: update_app, restart_app, teardown_app, and healthcheck_app, and an improved _start_app_container that composes volumes/env/ports/healthcheck.
  • Replace hardcoded Keycloak values in OrgAppsPhaseHandler.execute() by deriving keycloak_url, admin_username, and admin_password from context.runtime_state and spec.identity_inworld, and wire the AppCatalog into the handler.
  • Add unit tests in tests/test_app_handler.py covering catalog usage, deterministic cert mounting, DNS and OIDC failure handling, idempotent redeploy, phase identity wiring, and lifecycle helpers.

Testing

  • Linting: ran ruff check netengine/handlers/app_handler.py tests/test_app_handler.py and it passed.
  • Unit tests: ran pytest -q tests/test_app_handler.py tests/test_m1_handlers.py and all tests passed (new tests in tests/test_app_handler.py plus existing tests/test_m1_handlers.py ran successfully).

Codex Task

@aidankhogg aidankhogg self-assigned this Jun 29, 2026
@aidankhogg aidankhogg added the enhancement New feature or request label Jun 29, 2026
@aidankhogg aidankhogg merged commit ae38a79 into dev/alpha Jun 29, 2026
@aidankhogg aidankhogg deleted the codex/implement-app-deployment-layer-in-app_handler.py branch June 29, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant