Skip to content

LCORE-2882: make e2e fail on error or test failure in konflux#2190

Open
radofuchs wants to merge 6 commits into
lightspeed-core:mainfrom
radofuchs:LCORE_2882_e2e_fail_onError
Open

LCORE-2882: make e2e fail on error or test failure in konflux#2190
radofuchs wants to merge 6 commits into
lightspeed-core:mainfrom
radofuchs:LCORE_2882_e2e_fail_onError

Conversation

@radofuchs

@radofuchs radofuchs commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description

Make integration test fail on konflux if error or test failure happen

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

  • Related Issue #
  • Closes #

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

  • Bug Fixes
    • End-to-end integration test failures are no longer ignored, so pipeline results now reflect non-zero test exits.
  • Tests
    • Updated the e2e feature test list to retain features/skills.feature as the final entry.
    • Improved validation error details for list item mismatches to include the expected schema entry and the actual value.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The integration test pipeline now propagates run-e2e-tests failures. The E2E test list includes features/skills.feature, and partial JSON validation errors now include the unmatched schema item and actual value.

Changes

Integration test execution

Layer / File(s) Summary
Propagate integration test failures
.tekton/integration-tests/pipeline/lightspeed-stack-integration-test.yaml
Removes onError: continue from run-e2e-tests and documents the failure-handling requirement.
Update E2E validation coverage and diagnostics
tests/e2e/test_list.txt, tests/e2e/utils/utils.py
Includes features/skills.feature and expands unmatched list-item assertion details with the failing schema item and actual value.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: tisnik


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Security And Secret Handling ❌ Error tests/e2e/utils/utils.py:266-268 now logs the full actual list in assertion failures, which can leak sensitive response data into CI logs. Replace the full actual dump with a bounded/sanitized summary or the failing item/index only.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: Konflux e2e tests now fail on errors or test failures.
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.
Performance And Algorithmic Complexity ✅ Passed PASS: utils.py change is message-only in validate_json_partially (lines 256-265); YAML/test-list edits add no loops, API calls, pagination, or unbounded state.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/e2e/utils/utils.py`:
- Line 268: Update the assertion message in the schema-item matching logic to
avoid interpolating the full HTTP response value from actual. Use a bounded,
sanitized summary or report only the failing index/item, while retaining enough
context to identify the mismatch without exposing sensitive data or producing
oversized CI logs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a3bb65f5-c4e9-4df3-a0a1-c350e863c000

📥 Commits

Reviewing files that changed from the base of the PR and between e1362de and ac5c9e6.

📒 Files selected for processing (1)
  • tests/e2e/utils/utils.py
📜 Review details
⏰ Context from checks skipped due to timeout. (17)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: mypy
  • GitHub Check: Pylinter
  • GitHub Check: Pyright
  • GitHub Check: radon
  • GitHub Check: build-pr
  • GitHub Check: spectral
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-7-on-pull-request
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
🧰 Additional context used
📓 Path-based instructions (3)
**/*

📄 CodeRabbit inference engine (Custom checks)

**/*: Flag meaningful O(n^2)+ algorithms on non-trivial inputs, including handlers and Kubernetes list operations.
Flag N+1 patterns that list items and then query once per item, including Kubernetes API and database access.
Flag expensive work inside loops, including API calls, JSON parsing, and regex compilation.
Flag unbounded growth in caches, watchers, or buffers when eviction or limits are missing.
Flag missing pagination or limits on list operations and API endpoints.
Flag secrets or tokens logged in plaintext or hardcoded in source.
Flag API endpoints missing authentication or authorization.
Flag injection vulnerabilities, including SQL injection, command injection, and path traversal.
Flag sensitive data leaked in API responses, WebSocket messages, or logs.
Flag Kubernetes Secrets and Red Hat secrets missing OwnerReferences.

Never commit secrets or keys; use environment variables for sensitive data.

Files:

  • tests/e2e/utils/utils.py
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Use absolute imports for internal Python modules.
All modules must begin with descriptive docstrings; package __init__.py files must contain brief package descriptions.
Use logger = get_logger(__name__) from log.py for module logging.
Use Final[type] type hints for constants and keep shared constants in the central constants.py module with descriptive comments.
Functions must have complete parameter and return type annotations, descriptive snake_case action-oriented names, and docstrings.
Use modern union syntax such as str | int, Optional[Type] for optional values, and typing_extensions.Self for model validators.
Avoid modifying input parameters in place; return a new data structure instead.
Use async def for I/O operations and external API calls.
Handle APIConnectionError from Llama Stack integrations.
All classes must have descriptive docstrings, PascalCase descriptive names, complete attribute annotations, and specific types instead of Any.
Use ConfigurationBase for configuration Pydantic models and BaseModel for other data models.
Use ABC interfaces with @abstractmethod decorators for abstract classes.
Use @model_validator and @field_validator for custom Pydantic model validation.
Follow Google Python docstring conventions, including Parameters, Returns, Raises, and Attributes sections when applicable.
Use uv run for project commands, including formatting, verification, and tests.

Files:

  • tests/e2e/utils/utils.py
tests/e2e/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Use behave with BDD step definitions for end-to-end tests.

Files:

  • tests/e2e/utils/utils.py
🧠 Learnings (1)
📚 Learning: 2026-06-24T13:45:37.249Z
Learnt from: Jdubrick
Repo: lightspeed-core/lightspeed-stack PR: 1971
File: src/utils/markdown_repair.py:31-36
Timestamp: 2026-06-24T13:45:37.249Z
Learning: In the lightspeed-stack repository, docstrings must use the section header name "Parameters:" (not "Args:") for function arguments, even if the project references Google Python docstring conventions. Ensure docstrings follow the project’s established "Parameters:" header format for any documented function parameters.

Applied to files:

  • tests/e2e/utils/utils.py

Comment thread tests/e2e/utils/utils.py
assert (
matched
), f"No matching element found in list for schema item {schema_item}"
), f"No matching element found in list for schema item {schema_item}, got {actual}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Avoid logging the full response value in assertion failures.

actual comes from HTTP response data, so embedding the entire list in the error message can leak PII, tokens, or other sensitive fields into CI logs and produce excessively large failure output. Include a bounded, sanitized representation or only the failing index/item instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/e2e/utils/utils.py` at line 268, Update the assertion message in the
schema-item matching logic to avoid interpolating the full HTTP response value
from actual. Use a bounded, sanitized summary or report only the failing
index/item, while retaining enough context to identify the mismatch without
exposing sensitive data or producing oversized CI logs.

Source: Coding guidelines

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.

1 participant