Skip to content

demo(authbridge): fail fast in echo demo preflight when python-keycloak is missing#468

Closed
huang195 wants to merge 1 commit into
rossoctl:mainfrom
huang195:fix/echo-demo-preflight-keycloak
Closed

demo(authbridge): fail fast in echo demo preflight when python-keycloak is missing#468
huang195 wants to merge 1 commit into
rossoctl:mainfrom
huang195:fix/echo-demo-preflight-keycloak

Conversation

@huang195

@huang195 huang195 commented Jun 3, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #464 (credential placeholder-swap). Small UX fix to the echo demo's make demo-echo.

make demo-echo checks python-keycloak only inside the late setup-keycloak target. When the package is missing, the demo fails after building the sidecar + demo images, overriding the operator's platform config, and deploying the agent/upstream — wasting all of that work before erroring on a missing pip package.

This moves the python-keycloak check into preflight (the first step of demo-echo), so it fails fast with a clear install hint before any build/deploy/cluster mutation. preflight already checks PyYAML the same way.

Change

@python3 -c 'import keycloak' 2>/dev/null || { \
  echo "ERROR: python-keycloak is required (used later by setup-keycloak)."; \
  echo "       Install: pip install python-keycloak"; \
  ...
  exit 1; \
}

Demo-only; no production code touched.

Attribution

Assisted-By: Claude Code

Summary by CodeRabbit

  • Chores
    • Enhanced demo setup validation to detect missing Python dependencies upfront with explicit error messages and installation instructions, enabling faster failure detection during the initial setup phase.

make demo-echo previously failed at the late setup-keycloak step (after building images, overriding the operator, and deploying) when python-keycloak was missing. Move the check into preflight so it fails before any of that.

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Hai Huang <huang195@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 97fb1feb-9f59-47a2-85c5-71c0907560d9

📥 Commits

Reviewing files that changed from the base of the PR and between 191b2cb and 577344c.

📒 Files selected for processing (1)
  • authbridge/demos/echo/Makefile

📝 Walkthrough

Walkthrough

This PR adds a preflight dependency check to the echo demo Makefile. The preflight target now validates that the python-keycloak module is installed, failing with a clear error message and installation instructions if the module cannot be imported.

Changes

Preflight Dependency Check

Layer / File(s) Summary
Python-keycloak availability check
authbridge/demos/echo/Makefile
The preflight target gains a validation check that imports the keycloak module and exits with a user-friendly error message containing the install command if the dependency is missing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A Makefile hops into view,
Checking keycloak, shiny and new,
If dependencies lack, we'll say so clear—
"pip install" will fix it, never fear! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding a preflight check that fails fast when python-keycloak is missing in the echo demo.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@huang195

huang195 commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

Superseded by #470 (combined with the abctl pipeline-panic fix).

@huang195 huang195 closed this Jun 3, 2026
@github-project-automation github-project-automation Bot moved this from New /:ToDo to Done in Rossoctl Issue Prioritization Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants