Skip to content

LCORE-3051: In the rag-content images, only install what is needed - #246

Open
syedriko wants to merge 1 commit into
lightspeed-core:mainfrom
syedriko:syedriko-lcore-3051
Open

LCORE-3051: In the rag-content images, only install what is needed#246
syedriko wants to merge 1 commit into
lightspeed-core:mainfrom
syedriko:syedriko-lcore-3051

Conversation

@syedriko

@syedriko syedriko commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Description

  • The rag-content images contain the full copies src, scripts and tests directories that are mostly not needed in the final product.
  • Add an integration test for the AsciiDoc->Markdown converter
  • Update the CPE label for 0.7

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

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

  • New Features
    • Added end-to-end AsciiDoc → Markdown conversion coverage with reference-based output validation and expected content marker checks.
    • Added “Getting Started with Lightspeed” documentation including prerequisites, install command, verification steps, and config.yaml options (proxy_url, timeout).
  • Bug Fixes
    • Improved container images to ship only the required runtime artifacts for documentation conversion and application operation.
    • Enhanced the integration pipeline to validate converted Markdown matches the reference before proceeding.
  • Tests
    • Added an AsciiDoc integration test suite that auto-skips unless conversion tooling is available.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@syedriko, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 385a99e7-be22-4ca1-946a-ebe0593fecfa

📥 Commits

Reviewing files that changed from the base of the PR and between b805058 and bea1e15.

📒 Files selected for processing (7)
  • .tekton/integration-tests/pipeline/rag-content-0-7-integration-test.yaml
  • Containerfile
  • Containerfile-cuda
  • tests/asciidoc/fixture.adoc
  • tests/asciidoc/fixture.md
  • tests/asciidoc/test_integration.py
  • tests/integration-konflux/pipeline-konflux.sh

Walkthrough

Container builds reduce builder inputs and runtime artifacts while installing Ruby dependencies for AsciiDoc processing. New fixtures and integration tests validate conversion, and the Konflux pipeline adds conversion verification as its first of seven phases.

Changes

AsciiDoc support

Layer / File(s) Summary
Container build and runtime updates
Containerfile, Containerfile-cuda
Builder and runtime packages and copied artifacts are narrowed, Ruby dependencies are installed at runtime, and CPE labels change from 0.6 to 0.7.
AsciiDoc conversion fixtures and tests
tests/asciidoc/*
AsciiDoc and Markdown fixtures are added, with integration tests comparing converted output and checking required content markers.
Konflux conversion verification
tests/integration-konflux/pipeline-konflux.sh, .tekton/integration-tests/pipeline/rag-content-0-7-integration-test.yaml
The pipeline adds AsciiDoc-to-Markdown validation, temporary output cleanup, renumbers the remaining phases from six to seven, and installs diffutils for the generated test script.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant KonfluxPipeline
  participant RagContentContainer
  participant AsciidoctorConverter
  participant ReferenceFixture
  KonfluxPipeline->>RagContentContainer: run AsciiDoc conversion
  RagContentContainer->>AsciidoctorConverter: convert fixture.adoc
  AsciidoctorConverter->>KonfluxPipeline: produce converted.md
  KonfluxPipeline->>ReferenceFixture: compare converted.md with fixture.md
  KonfluxPipeline->>KonfluxPipeline: continue remaining integration phases
Loading

Possibly related PRs

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.
Title check ✅ Passed The title clearly matches the main change: narrowing rag-content images to install only needed dependencies and artifacts.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@syedriko
syedriko force-pushed the syedriko-lcore-3051 branch 2 times, most recently from 39009df to 26930b1 Compare July 13, 2026 19:23

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
tests/asciidoc/test_integration.py (1)

34-37: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Update the skip reason message.

The skip reason says run 'bundle install' first, but the container now installs asciidoctor via gem install asciidoctor instead of Bundler. Update the message to reflect the current installation method.

📝 Proposed fix
 requires_asciidoctor = pytest.mark.skipif(
     not shutil.which("ruby") or not shutil.which("asciidoctor"),
-    reason="ruby and/or asciidoctor not installed (run 'bundle install' first)",
+    reason="ruby and/or asciidoctor not installed (run 'gem install asciidoctor')",
 )
🤖 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/asciidoc/test_integration.py` around lines 34 - 37, Update the reason
string on the requires_asciidoctor pytest skip marker to instruct users to run
“gem install asciidoctor” instead of “bundle install”, while preserving the
existing dependency-missing conditions.
🤖 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.

Nitpick comments:
In `@tests/asciidoc/test_integration.py`:
- Around line 34-37: Update the reason string on the requires_asciidoctor pytest
skip marker to instruct users to run “gem install asciidoctor” instead of
“bundle install”, while preserving the existing dependency-missing conditions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 61387e11-8e85-4ba9-881d-b228bf7a4af1

📥 Commits

Reviewing files that changed from the base of the PR and between 032763f and 26930b1.

📒 Files selected for processing (6)
  • Containerfile
  • Containerfile-cuda
  • tests/asciidoc/fixture.adoc
  • tests/asciidoc/fixture.md
  • tests/asciidoc/test_integration.py
  • tests/integration-konflux/pipeline-konflux.sh

@syedriko
syedriko force-pushed the syedriko-lcore-3051 branch 2 times, most recently from 1d37621 to 05be5a2 Compare July 13, 2026 23:54

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@Containerfile-cuda`:
- Around line 80-82: Update the Bundler setup around the Gemfile copy and bundle
install so it uses the prefetched Cachi2 dependency source or an approved
internal mirror instead of accessing rubygems.org. Configure the required
offline/hermetic Bundler source before invoking bundle install, while preserving
the existing dependency installation flow.

In `@tests/integration-konflux/pipeline-konflux.sh`:
- Around line 59-68: Replace the world-writable permissions around the Asciidoc
conversion with a private temporary output directory and configure the podman
invocation to write as the host user, using :U, --userns keep-id, or an
equivalent mechanism. Remove both chmod operations while preserving the /output
mount and converted.md generation; apply the same ownership pattern to the other
temporary-directory setup blocks below.
🪄 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: CHILL

Plan: Pro

Run ID: ed13fa59-dd34-48b3-8cd1-38be418e7517

📥 Commits

Reviewing files that changed from the base of the PR and between 26930b1 and 05be5a2.

📒 Files selected for processing (6)
  • Containerfile
  • Containerfile-cuda
  • tests/asciidoc/fixture.adoc
  • tests/asciidoc/fixture.md
  • tests/asciidoc/test_integration.py
  • tests/integration-konflux/pipeline-konflux.sh
🚧 Files skipped from review as they are similar to previous changes (3)
  • tests/asciidoc/fixture.adoc
  • tests/asciidoc/test_integration.py
  • Containerfile

Comment thread Containerfile-cuda Outdated
Comment thread tests/integration-konflux/pipeline-konflux.sh Outdated
@syedriko
syedriko force-pushed the syedriko-lcore-3051 branch 2 times, most recently from e8c0939 to b805058 Compare July 14, 2026 01:48

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 @.tekton/integration-tests/pipeline/rag-content-0-7-integration-test.yaml:
- Line 295: Update the GPU test path’s package installation command near the
equivalent TEST_CMD invocation to include diffutils, matching the CPU path’s
dependencies. Preserve the existing installation packages and command execution.

In `@tests/asciidoc/fixture.md`:
- Around line 28-31: Update the AsciiDoc-to-Markdown conversion logic for
admonition blocks such as [NOTE] ... ---- so they render as blockquotes with an
emphasized label instead of raw delimiter lines that Markdown parses as setext
headings. Then revise the tests/asciidoc/fixture.md fixture’s expected output to
match the corrected admonition format.
🪄 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: CHILL

Plan: Pro

Run ID: 0029b24f-0ec8-4672-bfeb-826c6cc73fc9

📥 Commits

Reviewing files that changed from the base of the PR and between 05be5a2 and b805058.

📒 Files selected for processing (7)
  • .tekton/integration-tests/pipeline/rag-content-0-7-integration-test.yaml
  • Containerfile
  • Containerfile-cuda
  • tests/asciidoc/fixture.adoc
  • tests/asciidoc/fixture.md
  • tests/asciidoc/test_integration.py
  • tests/integration-konflux/pipeline-konflux.sh
🚧 Files skipped from review as they are similar to previous changes (4)
  • tests/asciidoc/fixture.adoc
  • tests/asciidoc/test_integration.py
  • Containerfile-cuda
  • Containerfile

Comment thread tests/asciidoc/fixture.md
@syedriko
syedriko force-pushed the syedriko-lcore-3051 branch from b805058 to bea1e15 Compare July 14, 2026 01:53
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