Skip to content

LCORE-3584: Do not duplicate error messages in traceback - #3019

Merged
tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-3584-do-not-duplicate-error-messages-in-traceback
Oct 26, 2026
Merged

tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-3584-do-not-duplicate-error-messages-in-traceback

Conversation

@tisnik

@tisnik tisnik commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

LCORE-3584: Do not duplicate error messages in traceback

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library [pyproject.toml + uv.lock]
  • Bump-up dependent library [requirements.*.txt for Konflux]
  • 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

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #LCORE-3584

Summary by CodeRabbit

  • Refactor
    • Internal error handling and formatting were updated. Validation checks, error messages, and behavior remain unchanged.
    • No user-facing functionality changed in this release.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between feda2b0 and b11b617.

Files selected for processing: 2
  • scripts/konflux_resolve.py
  • scripts/vulnerability_report.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details
Context from checks skipped due to timeout: 22
  • GitHub Check: list_outdated_dependencies
  • GitHub Check: Red Hat Konflux / rag-content-0-8-e2e-tests / lightspeed-stack-0-8
  • GitHub Check: Red Hat Konflux / lightspeed-stack-0-8-e2e-tests / lightspeed-stack-0-8
  • GitHub Check: spectral
  • GitHub Check: Pylinter
  • GitHub Check: radon
  • GitHub Check: build-pr
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: shellcheck
  • GitHub Check: ruff
  • GitHub Check: unit_tests (3.14)
  • GitHub Check: integration_tests (3.14)
  • GitHub Check: Pyright
  • GitHub Check: bandit
  • GitHub Check: mypy
  • GitHub Check: black
  • GitHub Check: Red Hat Konflux / lightspeed-core-0-8-enterprise-contract / lightspeed-stack-0-8
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-8-on-pull-request
  • GitHub Check: authorize / Check repository owner or member
Additional comments: 2
scripts/konflux_resolve.py: 1

74-75: LGTM!

Also applies to: 104-105, 194-195, 427-428, 477-479, 622-623, 769-773, 787-791, 902-902, 917-920, 968-972

scripts/vulnerability_report.py: 1

189-190: LGTM!

Also applies to: 193-194, 196-197, 199-201

Walkthrough

The changes assign existing error messages to local msg variables before raising exceptions. The resolver also reformats _match_arch and uses equivalent tuple unpacking in the RHOAI platform-hash loop. Validation conditions, messages, and exception behavior remain unchanged.

Changes

Error-handling cleanup

Layer / File(s) Summary
Message assignment and equivalent edits
scripts/konflux_resolve.py, scripts/vulnerability_report.py
Both scripts assign existing error messages to local variables before raising exceptions. The resolver also reformats _match_arch and uses equivalent tuple unpacking in the RHOAI platform-hash loop.

Priority: Low

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

Change: Refactor

Suggested reviewers: jazzcort

Merge Risk: Minimal · up to b11b6

This cleanup is mergeable with no identified behavior or operational risk.

Pre-merge checks: Passed 7
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: error messages are no longer duplicated in tracebacks. The raw summary says error messages are assigned to local msg variables before raising the same exceptions, which m…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 2 files.
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 PASSED. The pull request only introduces local exception-message assignments, reformats _match_arch, removes redundant tuple parentheses in one existing loop, and preserves validation and resolver l…
Security And Secret Handling Passed PASSED. The pull request changes only exception-message construction and formatting in scripts/konflux_resolve.py and scripts/vulnerability_report.py. It adds no secrets, endpoints, authentication…
Full details: Title check

Explanation

The title names the change: error messages are no longer duplicated in tracebacks. The raw summary says error messages are assigned to local msg variables before raising the same exceptions, which matches the title's subject. The title also carries the issue key LCORE-3584. It is specific and concise. The PR objectives describe it as a refactor tied to LCORE-3584 and give no further detail.

Full details: Performance And Algorithmic Complexity

Explanation

PASSED. The pull request only introduces local exception-message assignments, reformats _match_arch, removes redundant tuple parentheses in one existing loop, and preserves validation and resolver logic. The diff adds no new loops, API or database calls, parsing work, caches, buffers, or list operations that could create a stated performance regression.

Full details: Security And Secret Handling

Explanation

PASSED. The pull request changes only exception-message construction and formatting in scripts/konflux_resolve.py and scripts/vulnerability_report.py. It adds no secrets, endpoints, authentication logic, database or shell input handling, API responses, WebSocket messages, or Kubernetes Secret resources. Existing URL logging and GITHUB_TOKEN environment-variable use are unchanged and are not introduced by this pull request.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
✨ Simplify code
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@tisnik
tisnik merged commit 51b6f91 into lightspeed-core:main Oct 26, 2026
58 of 59 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.

1 participant