Skip to content

ci(docs): add llama-stack version to distro docs#53

Merged
mergify[bot] merged 1 commit intoopendatahub-io:mainfrom
nathan-weinberg:enhance-docs
Sep 30, 2025
Merged

ci(docs): add llama-stack version to distro docs#53
mergify[bot] merged 1 commit intoopendatahub-io:mainfrom
nathan-weinberg:enhance-docs

Conversation

@nathan-weinberg
Copy link
Copy Markdown
Collaborator

@nathan-weinberg nathan-weinberg commented Sep 29, 2025

What does this PR do?

Adds the current Llama Stack version being used in the container to the docs

Test Plan

Take a look!

Summary by CodeRabbit

  • Documentation
    • Updated distribution README to announce upstream Llama Stack v0.2.22 with a link.
    • Generated distribution docs now automatically display the detected Llama Stack version for clarity and traceability.
  • Chores
    • Improved doc-generation to auto-inject detected version and to present clearer, user-facing error messages when version information is missing.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 29, 2025

Walkthrough

Adds a documentation line about upstream Llama Stack v0.2.22 and updates scripts/gen_distro_docs.py to extract the Llama Stack version from distribution/Containerfile via a new helper, injecting it into the generated header and exiting with explicit errors on missing file/version or read failures.

Changes

Cohort / File(s) Summary
Docs update
distribution/README.md
Added a line announcing upstream Llama Stack version 0.2.22 with a link.
Distro docs generation logic
scripts/gen_distro_docs.py
Added extract_llama_stack_version() that reads distribution/Containerfile, imports re, finds llama-stack==X.Y.Z via regex, returns the version or exits with explicit errors on missing file/read failure/no match; header generation now references the extracted version.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Script as gen_distro_docs.py
    participant Helper as extract_llama_stack_version()
    participant File as distribution/Containerfile
    participant Out as Generated Docs

    Dev->>Script: Run script
    Script->>Helper: Request Llama Stack version
    Helper->>File: Read content
    alt Version found
        File-->>Helper: Content with llama-stack==X.Y.Z
        Helper-->>Script: Return version X.Y.Z
        Script->>Out: Generate header with versioned link
        Note right of Out: Header includes extracted version
    else Missing file / read error / no match
        File-->>Helper: Error / No match
        Helper-->>Script: Exit / raise error with message
        Script-->>Dev: Terminate with explicit error message
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibbled docs with whiskered cheer,
A version hopped into view this year.
Regex nose found X.Y.Z so bright,
Containerfile gleamed in moonlit night.
I stamped the header—thump, delight! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title clearly and concisely identifies the main change—adding the llama-stack version to the distribution documentation—using a conventional commit style prefix and focusing on the docs CI scope, enabling teammates to understand the change at a glance.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ee0af3 and 1498da9.

📒 Files selected for processing (2)
  • distribution/README.md (1 hunks)
  • scripts/gen_distro_docs.py (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: nathan-weinberg
PR: opendatahub-io/llama-stack-distribution#33
File: distribution/Containerfile:17-21
Timestamp: 2025-09-15T14:25:54.837Z
Learning: In the opendatahub-io/llama-stack-distribution repository, the distribution/Containerfile is auto-generated by distribution/build.py based on configuration in build.yaml. When providers are added to build.yaml, the build script automatically regenerates the Containerfile with the required dependencies. Changes to the Containerfile should not be flagged as manual edits if they correspond to legitimate changes in the build configuration.
📚 Learning: 2025-09-15T14:25:54.837Z
Learnt from: nathan-weinberg
PR: opendatahub-io/llama-stack-distribution#33
File: distribution/Containerfile:17-21
Timestamp: 2025-09-15T14:25:54.837Z
Learning: In the opendatahub-io/llama-stack-distribution repository, the distribution/Containerfile is auto-generated by distribution/build.py based on configuration in build.yaml. When providers are added to build.yaml, the build script automatically regenerates the Containerfile with the required dependencies. Changes to the Containerfile should not be flagged as manual edits if they correspond to legitimate changes in the build configuration.

Applied to files:

  • scripts/gen_distro_docs.py
  • distribution/README.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-test-push (linux/amd64)
  • GitHub Check: Summary
🔇 Additional comments (5)
distribution/README.md (1)

7-8: LGTM! Version documentation added successfully.

The version information is clear and includes a helpful link to the upstream release. This addresses the PR objective of documenting the current Llama Stack version in use.

scripts/gen_distro_docs.py (4)

4-4: LGTM!

The re import is needed for the version extraction regex pattern matching.


74-75: LGTM! Proper integration of version extraction.

The version is extracted before header generation, ensuring it's available for the documentation. The early-exit behavior from extract_llama_stack_version() prevents generating docs with missing version information.


78-88: LGTM! Version correctly interpolated into header.

The header format string properly includes the version in both the Markdown link text and URL. The generated output matches the expected format in distribution/README.md.


11-37: Approve extract_llama_stack_version regex
Verified that the Containerfile and its history use only X.Y.Z versions with no pre-release suffixes, so the existing regex is sufficient.


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
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
scripts/gen_distro_docs.py (1)

25-32: Broaden the version matcher.

Line 25 limits matches to strictly numeric X.Y.Z. If the Containerfile ever pins a pre-release (0.3.0rc1), post-release (0.3.0.post1), or local build tag, the generator exits even though the pin is valid. Please widen the pattern to accept the wider PEP 440 surface (e.g., allow alphanumerics, hyphen, plus) so doc generation keeps working after routine version bumps.

Apply something like:

-        pattern = r"llama-stack==([0-9]+\.[0-9]+\.[0-9]+)"
+        pattern = r"llama-stack==([0-9A-Za-z\.\-+]+)"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b2d68f and b7b1469.

📒 Files selected for processing (2)
  • distribution/README.md (1 hunks)
  • scripts/gen_distro_docs.py (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: nathan-weinberg
PR: opendatahub-io/llama-stack-distribution#33
File: distribution/Containerfile:17-21
Timestamp: 2025-09-15T14:25:54.837Z
Learning: In the opendatahub-io/llama-stack-distribution repository, the distribution/Containerfile is auto-generated by distribution/build.py based on configuration in build.yaml. When providers are added to build.yaml, the build script automatically regenerates the Containerfile with the required dependencies. Changes to the Containerfile should not be flagged as manual edits if they correspond to legitimate changes in the build configuration.
📚 Learning: 2025-09-15T14:25:54.837Z
Learnt from: nathan-weinberg
PR: opendatahub-io/llama-stack-distribution#33
File: distribution/Containerfile:17-21
Timestamp: 2025-09-15T14:25:54.837Z
Learning: In the opendatahub-io/llama-stack-distribution repository, the distribution/Containerfile is auto-generated by distribution/build.py based on configuration in build.yaml. When providers are added to build.yaml, the build script automatically regenerates the Containerfile with the required dependencies. Changes to the Containerfile should not be flagged as manual edits if they correspond to legitimate changes in the build configuration.

Applied to files:

  • distribution/README.md
  • scripts/gen_distro_docs.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-test-push (linux/amd64)
  • GitHub Check: Summary
🔇 Additional comments (1)
distribution/README.md (1)

7-8: Version callout aligns with generated docs.

Line 7 cleanly surfaces the current upstream release and keeps the generated README in sync with the script output. Looks good to me.

@skamenan7
Copy link
Copy Markdown
Collaborator

LGTM, Nathan. Thanks.

@mergify mergify bot merged commit dc76c34 into opendatahub-io:main Sep 30, 2025
6 checks passed
@nathan-weinberg nathan-weinberg deleted the enhance-docs branch October 16, 2025 19:43
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.

4 participants