Skip to content

LCORE-2035 Add the logic for updating proper run.yaml file in konflux#1741

Merged
tisnik merged 2 commits into
lightspeed-core:mainfrom
radofuchs:LCORE_2035_konflux_fix
May 14, 2026
Merged

LCORE-2035 Add the logic for updating proper run.yaml file in konflux#1741
tisnik merged 2 commits into
lightspeed-core:mainfrom
radofuchs:LCORE_2035_konflux_fix

Conversation

@radofuchs
Copy link
Copy Markdown
Contributor

@radofuchs radofuchs commented May 14, 2026

Description

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: (e.g., Claude, CodeRabbit, Ollama, etc., N/A if not used)
  • Generated by: (e.g., tool name and version; N/A if not used)

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

  • Tests

    • Enhanced E2E testing with improved default model and provider configurations for consistent test execution.
    • Refined service connectivity verification to better handle provider readiness states.
    • Increased timeout for model discovery operations to improve reliability.
    • Added flexible HTTP status code validation for proxy testing scenarios.
  • Chores

    • Centralized test configuration utilities for improved maintainability and consistency across test suites.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Walkthrough

This PR refactors E2E test infrastructure to centralize configuration management across Prow and local test environments. It introduces shared utilities for Llama Stack config backup/restore/reload, updates connectivity verification to handle multiple API endpoints and response codes, generalizes ConfigMap operations to support multiple keys, and migrates step definitions to consume the new shared infrastructure.

Changes

E2E Test Infrastructure Centralization

Layer / File(s) Summary
Connectivity Verification and Infrastructure Defaults
tests/e2e-prow/rhoai/.e2e_exit_code, tests/e2e-prow/rhoai/pipeline-konflux.sh, tests/e2e-prow/rhoai/scripts/e2e-ops.sh, tests/e2e/features/environment.py
E2E exit code is set to 2; pipeline adds E2E_DEFAULT_PROVIDER_OVERRIDE (default openai) and E2E_DEFAULT_MODEL_OVERRIDE environment variables for test consistency. verify_connectivity refactored to accept 503 only on final readiness attempt, check /v1/models endpoint with multiple acceptable codes, and distinguish connection failures; ConfigMap helpers generalized with optional configmap_key parameter. Model-fetch timeout increased from 5 to 15 seconds.
Feature Test Adjustments and New Assertion Step
tests/e2e/features/proxy.feature, tests/e2e/features/steps/common_http.py
Proxy feature tests now skip in Prow via @skip-in-prow tags and accept either HTTP 404 or 500 for unreachable proxy scenarios. New Behave step check_status_code_one_of allows assertion of multiple acceptable HTTP response codes with detailed error reporting.
Shared Config and Prow Utilities
tests/e2e/utils/llama_config_utils.py, tests/e2e/utils/llama_prow_utils.py, tests/e2e/utils/prow_utils.py
New llama_config_utils.py provides centralized backup/load/write/restore functions for Llama Stack run.yaml with environment-aware behavior (Prow in-memory backups vs. local file backups). New llama_prow_utils.py wraps ConfigMap operations for the run.yaml key. Extended prow_utils.py adds get_configmap_content() and updates backup_configmap_to_memory() and update_config_configmap() to accept configmap name and key parameters; restart_pod timeout increased to 320 seconds.
Step Definition Migration to Shared Config Utilities
tests/e2e/features/steps/proxy.py, tests/e2e/features/steps/tls.py
Proxy and TLS step definitions refactored to use shared backup_llama_config(), load_llama_config(), write_llama_config(), and restore_llama_config_if_modified() from centralized utilities. Local YAML helper functions removed; all config backup/restore workflows now use unified APIs across provider proxy, interception proxy, TLS, and cipher suite configuration steps.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

Review effort 3/5

Suggested reviewers

  • tisnik
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 88.89% which is sufficient. The required threshold is 80.00%.
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.
Title check ✅ Passed The title directly addresses the main change: adding logic to update run.yaml in Konflux, which is reflected throughout the changeset (new utilities, environment variables, and e2e operations).

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

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@radofuchs radofuchs changed the title Lcore 2035 Add the logic for updating proper run.yaml file in konflux LCORE-2035 Add the logic for updating proper run.yaml file in konflux May 14, 2026
Copy link
Copy Markdown
Contributor

@tisnik tisnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tisnik tisnik merged commit b9ce55f into lightspeed-core:main May 14, 2026
30 of 32 checks passed
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.

2 participants