Repository navigation
fix: add mlflow client to Keycloak realm import, enable MLflow/Phoenix for Kind - #1243
Conversation
|
/run-e2e |
New Commits DetectedThe New HEAD: For maintainers: Please review the new changes and comment Security checklistBefore running E2E tests, verify the PR does NOT contain:
This is an automated security measure to prevent TOCTOU attacks |
E2E HyperShift Tests FailedCommit: To re-run tests after fixing issues, comment |
|
/run-e2e |
E2E HyperShift Tests FailedCommit: To re-run tests after fixing issues, comment |
New Commits DetectedThe New HEAD: For maintainers: Please review the new changes and comment Security checklistBefore running E2E tests, verify the PR does NOT contain:
This is an automated security measure to prevent TOCTOU attacks |
|
/run-e2e |
E2E HyperShift Tests FailedCommit: To re-run tests after fixing issues, comment |
New Commits DetectedThe New HEAD: For maintainers: Please review the new changes and comment Security checklistBefore running E2E tests, verify the PR does NOT contain:
This is an automated security measure to prevent TOCTOU attacks |
|
/run-e2e |
E2E HyperShift Tests FailedCommit: To re-run tests after fixing issues, comment |
New Commits DetectedThe New HEAD: For maintainers: Please review the new changes and comment Security checklistBefore running E2E tests, verify the PR does NOT contain:
This is an automated security measure to prevent TOCTOU attacks |
|
/run-e2e |
E2E HyperShift Tests FailedCommit: To re-run tests after fixing issues, comment |
New Commits DetectedThe New HEAD: For maintainers: Please review the new changes and comment Security checklistBefore running E2E tests, verify the PR does NOT contain:
This is an automated security measure to prevent TOCTOU attacks |
|
/run-e2e |
E2E HyperShift Tests PassedCommit: The If you push new commits, the label will be removed and you'll need to comment |
…enix for Kind The OTel→MLflow trace pipeline fails with HTTP 401 because the mlflow OAuth2 client is created dynamically by a Helm hook job that breaks when Keycloak admin credentials are stale. Fix by declaring the mlflow confidential client in the Keycloak realm import JSON so it exists from initial deployment. - Add mlflow client to realm import (both OpenShift CR and K8s ConfigMap) - Strip mlflow-oauth-secret-job to read-only (no client creation logic) - Enable MLflow and Phoenix components for Kind CI - Remove xfail/openshift_only markers from 9 MLflow trace tests Design: docs/plans/2026-04-14-mlflow-otel-fix-design.md Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
MLflow v3.9.0 defaults max_results to 0 which is invalid (must be a positive integer). The two connectivity tests that call this endpoint without params now get HTTP 400 on Kind where auth is disabled. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
The mlflow_configured fixture called pytest.fail() when no OAuth token was available. On Kind, mlflow.auth.enabled=false so no mlflow-oauth-secret exists and no token is needed. Allow the fixture to proceed without a token for the non-auth path. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
get_mlflow_client() raised ValueError when no token was set, which broke all 28 MLflow trace tests on Kind where auth is disabled. The token check is unnecessary — when auth is off, MLflow accepts unauthenticated requests. Token refresh still works when credentials are available (OpenShift path). Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
On OpenShift, the KeycloakRealmImport CR (hook weight 2) is processed asynchronously by the RHBK operator. The mlflow-oauth-secret-job (hook weight 10) may start before the realm import finishes creating the mlflow client. Add polling with 120s timeout to wait for the client to appear. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
The mlflow-oauth-secret-job uses a pre-built container image that doesn't include PR code changes. Add a CI build step (matching the existing ui-oauth-secret pattern) to all 4 E2E workflows. The script skips when mlflow.auth.enabled=false (Kind without auth). Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
The e2e-hypershift-pr workflow uses issue_comment trigger which reads the workflow YAML from main, not the PR branch. The new workflow step won't run until merged. Work around by calling the mlflow script from the existing 25-build-oauth-secret-image.sh which IS checked out from the PR branch. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
The mlflow-oauth-secret-job is a Helm hook (post-install,post-upgrade), so `helm upgrade --no-hooks` skips creating it entirely. Fix by rendering the job template with `helm template --show-only` and applying it directly with `kubectl apply`. This correctly handles the Helm hook lifecycle while using the freshly-built PR image. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
The job name in the Helm template is 'mlflow-oauth-secret-job' (hardcoded, no release name prefix), but the CI script waited for 'kagenti-mlflow-oauth-secret-job'. Fix to match the actual template name. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
mlflow-oidc-auth v7+ adds a FastAPI permission middleware that checks experiment UPDATE permission for the OTel trace endpoint. The existing patch only bypassed the OIDC auth middleware (_is_unprotected_route) but the permission middleware still rejected requests because no username was set. Add a second patch to skip _find_fastapi_validator for /v1/traces paths. Also remove the otel_router get_all_routers() patch since v7+ includes the OTel router natively. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
The experiment INSERT and users INSERT were in the same transaction. The users table is created by mlflow-oidc-auth alembic migrations which run slower than MLflow core migrations. When users table doesn't exist yet, the whole transaction rolls back — including the experiment INSERT. Split into two independent phases so the experiment is committed before attempting users. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
test_traces_filter_by_session_id tried to match a UUID generated in Phase 1 (agent tests) with Phase 2 (observability tests), but these are separate pytest invocations with independent session IDs. The test always skipped. Session correlation is already covered by test_traces_have_genai_conversation_id which asserts the attribute exists without requiring cross-phase UUID sharing. Also removes the unused get_traces_by_session_id helper. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
- Tighten redirectUris from ["*"] to ["*/callback"] in realm import - Add startup assertions for monkey-patched mlflow-oidc-auth APIs (fail fast on upgrades that change internal method names) - Fix stale comment in dev_values.yaml - Document generate_client_secrets write in read-only job Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Adding MLflow + Phoenix + Kuadrant (upstream rossoctl#1262) exceeds the Kind CI runner's CPU capacity. Keep MLflow (the focus of this PR) and disable Phoenix to stay within resource limits. Phoenix can be re-enabled when CI runner resources are increased. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Kuadrant operator + Authorino (merged upstream rossoctl#1262) consumes too much CPU on Kind CI runners. Disable for Kind — Kuadrant AuthPolicy is OpenShift-specific and not needed for local development/testing. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Kuadrant operator defaults consume 860m CPU across 5 deployments, which exceeds the 4-vCPU Kind CI runner when combined with MLflow. Patch Kuadrant deployments after installation to reduce CPU requests from 860m to 150m, leaving room for agent pods. Only applies on Kind (non-OpenShift) where kuadrant-system namespace exists. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
11c0e31 to
6c0a8a1
Compare
New Commits DetectedThe New HEAD: For maintainers: Please review the new changes and comment Security checklistBefore running E2E tests, verify the PR does NOT contain:
This is an automated security measure to prevent TOCTOU attacks |
Summary
mlflowconfidential client to Keycloak realm import JSON (both OpenShift CR and K8s ConfigMap paths) so the client exists from initial deploymentmlflow-oauth-secret-jobto read-only — reads existing client secret from Keycloak, no longer creates the client or manages groups/mappersdev_values.yaml)xfailandopenshift_onlymarkers from 9 MLflow trace testsProblem
OTel collector → MLflow OTLP export fails with HTTP 401 because the
mlflowOAuth2 client is created dynamically by a Helm hook job that fails when Keycloak admin credentials are stale (common on reinstall). On Kind, MLflow was disabled entirely.Design
See
docs/plans/2026-04-14-mlflow-otel-fix-design.mdTest plan
🤖 Generated with Claude Code