Skip to content

LCORE-1439: print all commands during Konflux requirements generation#1299

Merged
tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-1438-print-all-commands-during-konflux-requirements-generation
Mar 10, 2026
Merged

LCORE-1439: print all commands during Konflux requirements generation#1299
tisnik merged 1 commit into
lightspeed-core:mainfrom
tisnik:lcore-1438-print-all-commands-during-konflux-requirements-generation

Conversation

@tisnik

@tisnik tisnik commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Description

LCORE-1439: print all commands during Konflux requirements generation

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
  • nit

Tools used to create PR

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

Related Tickets & Documents

  • Related Issue #LCORE-1439

Summary by CodeRabbit

  • Chores
    • Enhanced script debugging capabilities for development.
    • Fixed file formatting to ensure proper end-of-file conventions.

@coderabbitai

coderabbitai Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Modified a bash script to enable debug mode by adding set -x and fixed the trailing newline at the end of the file to ensure proper EOF formatting.

Changes

Cohort / File(s) Summary
Script Debugging and Formatting
scripts/konflux_requirements.sh
Added bash debugging via set -x near the top; fixed missing trailing newline at end of file.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly matches the PR's main objective of enabling bash debugging (via 'set -x') to print all commands during Konflux requirements generation in the script.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@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 the current code and only fix it if needed.

Inline comments:
In `@scripts/konflux_requirements.sh`:
- Line 7: The script currently enables tracing with the existing set -x but
doesn't stop on failures; add error-halting by enabling set -e alongside set -x
(e.g., change/replace the existing set -x line to set -e -x or use set -euxo
pipefail) so that any failing command (uv pip compile, sed, uv run pybuild-deps,
etc.) aborts the script instead of continuing to "Done!" and producing
partial/corrupt outputs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8f628dcd-fb13-4418-8b0f-204ef083ed3f

📥 Commits

Reviewing files that changed from the base of the PR and between b9e971b and 4876372.

📒 Files selected for processing (1)
  • scripts/konflux_requirements.sh

# Packages from pypi.org go to requirements.source.txt
# Packages from console.redhat.com go to requirements.wheel.txt

set -x

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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

head -20 scripts/konflux_requirements.sh && echo "---" && sed -n '85,100p' scripts/konflux_requirements.sh

Repository: lightspeed-core/lightspeed-stack

Length of output: 1312


🏁 Script executed:

wc -l scripts/konflux_requirements.sh && cat -n scripts/konflux_requirements.sh

Repository: lightspeed-core/lightspeed-stack

Length of output: 4965


Add set -e to halt on command failures.

Line 7 enables set -x for tracing but the script lacks set -e. If any of the uv pip compile, sed, or uv run pybuild-deps commands fail, the script continues and prints Done! while leaving incomplete hash files or corrupted Tekton YAML files.

Suggested change
-set -x
+set -e
+set -x
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
set -x
set -e
set -x
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/konflux_requirements.sh` at line 7, The script currently enables
tracing with the existing set -x but doesn't stop on failures; add error-halting
by enabling set -e alongside set -x (e.g., change/replace the existing set -x
line to set -e -x or use set -euxo pipefail) so that any failing command (uv pip
compile, sed, uv run pybuild-deps, etc.) aborts the script instead of continuing
to "Done!" and producing partial/corrupt outputs.

@tisnik tisnik merged commit 36c2ae2 into lightspeed-core:main Mar 10, 2026
22 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