Skip to content

Conversation

quinntaylormitchell
Copy link

@quinntaylormitchell quinntaylormitchell commented Aug 4, 2025

Description

PR #1155 in y-scope/clp changes user-guide to user-docs. This PR modifies the single instance of user-guide in this repo to user-docs to comply.

Do not merge this PR until PR #1155 is merged.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

N/A

Summary by CodeRabbit

  • Documentation

    • Release bumped to clp-0.5.1; user docs and cross-references refreshed. Setup and CLI guidance simplified, output-directory invocation clarified, target size and caching guidance standardized, and an internal link replaced with a generic docs reference.
  • Chores

    • Build configuration updated to use explicit, named upstream image stages and immutable upstream references for clearer multi-stage builds; build tooling packages expanded to support richer build-time utilities.

Copy link

coderabbitai bot commented Aug 4, 2025

Walkthrough

Updated documentation in assets/clp/methodology.md (version bumped to clp-0.5.1; CLI formatting, simplified setup/caching text, link updates). Revised assets/clp/Dockerfile to use digest-tagged FROM entries and add named multi-stage aliases (AS clp-core, AS clp-deps-core), switch COPY to --from=clp-core, and expand the build-stage package list.

Changes

Cohort / File(s) Change Summary
Documentation & content edits
assets/clp/methodology.md
Bumped version to clp-0.5.1; removed a config-file hyperlink in favour of a plain label; simplified setup wording and Docker image reference; formatted CLI usages with inline code; clarified output-directory handling and cache-flushing guidance; updated cross-links to versioned user docs.
Dockerfile build-stage refactor
assets/clp/Dockerfile
Replaced prior base references with digest-tagged FROM entries and added named build-stage aliases (AS clp-core, AS clp-deps-core); updated subsequent stage copy to --from=clp-core; expanded apt-get install list (htop, jq, python3-venv, rsync, sqlite3, tmux, vim); added TODO placeholder for upstream image reference.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks and finishing touches

✅ 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 clearly indicates that the pull request rewrites the CLP methodology documentation for improved clarity and updates the asset version to 0.5.1, accurately reflecting the primary changes in the methodology file without being overly verbose. It is concise, specific, and uses a conventional prefix to signal that it pertains to documentation. Although it does not enumerate every ancillary change, it remains focused on the most significant user‐facing updates.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a42d244 and 78e0f66.

📒 Files selected for processing (2)
  • assets/clp/Dockerfile (2 hunks)
  • assets/clp/methodology.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-24T18:22:45.461Z
Learnt from: Bill-hbrhbr
PR: y-scope/log-archival-bench#10
File: assets/clp/methodology.md:27-27
Timestamp: 2025-09-24T18:22:45.461Z
Learning: In CLP documentation, `dev-guide` URLs remain valid and unchanged, while only `user-guide` paths were renamed to `user-docs`. The dev-guide and user-guide/user-docs are separate documentation sections.

Applied to files:

  • assets/clp/methodology.md
🪛 Checkov (3.2.334)
assets/clp/Dockerfile

[low] 1-18: Ensure that HEALTHCHECK instructions have been added to container images

(CKV_DOCKER_2)


[low] 1-18: Ensure that a user for the container has been created

(CKV_DOCKER_3)


[low] 1-18: Ensure that HEALTHCHECK instructions have been added to container images

(CKV_DOCKER_2)


[low] 1-18: Ensure that a user for the container has been created

(CKV_DOCKER_3)

🔇 Additional comments (2)
assets/clp/Dockerfile (1)

8-16: Clean up apt package lists after install

Leaving /var/lib/apt/lists in the layer needlessly inflates the image. Please clear the apt cache at the end of the install step.

[建议-推荐性重构 / suggest_recommended_refactor]

 RUN apt-get update \
     && DEBIAN_FRONTEND=noninteractive apt-get install -y \
         htop \
         jq \
         python3-venv \
         rsync \
         sqlite3 \
         tmux \
-        vim
+        vim \
+    && rm -rf /var/lib/apt/lists/*
assets/clp/methodology.md (1)

24-24: Fix the broken Config File link

Using the leading slash sends readers to https://github.com/assets/clp/config.yaml, which 404s. Switch back to the repo-relative path so the link resolves when viewed on GitHub.

-[Config File]: /assets/clp/config.yaml
+[Config File]: assets/clp/config.yaml

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.

@quinntaylormitchell quinntaylormitchell requested a review from a team as a code owner August 4, 2025 18:02
Copy link

@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: 5

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ffeb34 and 1320eb7.

📒 Files selected for processing (1)
  • assets/clp/methodology.md (1 hunks)

Copy link

@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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
assets/clp/Dockerfile (3)

6-14: Slim the image and harden apt usage.

Use --no-install-recommends and clean apt lists to reduce size.

 RUN apt-get update \
-    && DEBIAN_FRONTEND=noninteractive apt-get install -y \
+    && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
     htop \
     jq \
     python3-venv \
     rsync \
     sqlite3 \
     tmux \
-    vim
+    vim \
+ && rm -rf /var/lib/apt/lists/*

16-16: Use the named stage and place the binary on PATH.

Copying by numeric index is brittle; install to a standard bin dir.

-COPY --from=0 /clp/clp-s /clp/clp-s
+COPY --from=core /clp/clp-s /usr/local/bin/clp-s

Please verify the path /clp/clp-s in the core image is stable on :main; otherwise this may break unexpectedly.


1-16: Run as non‑root and add a basic healthcheck.

Security posture: containers should avoid running as root; also add a simple healthcheck (can be adjusted if this isn’t a long‑running container).

Suggested additions (append near the end of the Dockerfile):

# Create non-root user
RUN useradd -m -u 10001 app && chown app:app /usr/local/bin/clp-s
USER 10001

# Optional: basic healthcheck
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD ["clp-s", "--version"]
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1320eb7 and 7b7e646.

📒 Files selected for processing (1)
  • assets/clp/Dockerfile (1 hunks)
🧰 Additional context used
🪛 Checkov (3.2.334)
assets/clp/Dockerfile

[low] 1-16: Ensure that HEALTHCHECK instructions have been added to container images

(CKV_DOCKER_2)


[low] 1-16: Ensure that a user for the container has been created

(CKV_DOCKER_3)

🔇 Additional comments (1)
assets/clp/Dockerfile (1)

1-2: Confirm scope: Dockerfile change in a docs‑rename PR.

This alters base image pinning (now floating :main). Confirm this change is intentional for this PR; otherwise, consider a separate PR to avoid coupling doc renames with runtime base image changes.

Copy link

@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: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b7e646 and f328b0e.

📒 Files selected for processing (1)
  • assets/clp/methodology.md (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: Bill-hbrhbr
PR: y-scope/log-archival-bench#10
File: assets/clp/methodology.md:27-27
Timestamp: 2025-09-24T18:22:45.449Z
Learning: In CLP documentation, `dev-guide` URLs remain valid and unchanged, while only `user-guide` paths were renamed to `user-docs`. The dev-guide and user-guide/user-docs are separate documentation sections.
📚 Learning: 2025-09-24T18:22:45.449Z
Learnt from: Bill-hbrhbr
PR: y-scope/log-archival-bench#10
File: assets/clp/methodology.md:27-27
Timestamp: 2025-09-24T18:22:45.449Z
Learning: In CLP documentation, `dev-guide` URLs remain valid and unchanged, while only `user-guide` paths were renamed to `user-docs`. The dev-guide and user-guide/user-docs are separate documentation sections.

Applied to files:

  • assets/clp/methodology.md
🔇 Additional comments (4)
assets/clp/methodology.md (4)

14-15: Resolved: Anchor text now matches “user docs”.

Good catch aligning visible text with the updated path.


16-17: Nice clarity fix.

The rewritten sentence is clear and grammatically sound.


22-25: Link hygiene fixes look good.

HTTPS for GHCR and repo‑relative Config File path are correct. User‑docs link targets v0.5.1 as intended.


25-25: Verify upstream docs rename Upstream PR #1155 must be merged before this change; no remaining user-guide references detected.

@Bill-hbrhbr Bill-hbrhbr changed the title chore(clp): Rename user-guide to user-docs and dev-guide to dev-docs, as per CLP docs PR docs(clp): Rewrite clp methodology docs for better clarity; Bump clp version to 0.5.1. Sep 24, 2025
Copy link

@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: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f328b0e and cbd2d16.

📒 Files selected for processing (1)
  • assets/clp/Dockerfile (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: Bill-hbrhbr
PR: y-scope/log-archival-bench#10
File: assets/clp/methodology.md:27-27
Timestamp: 2025-09-24T18:22:45.449Z
Learning: In CLP documentation, `dev-guide` URLs remain valid and unchanged, while only `user-guide` paths were renamed to `user-docs`. The dev-guide and user-guide/user-docs are separate documentation sections.
🪛 Checkov (3.2.334)
assets/clp/Dockerfile

[low] 1-16: Ensure that HEALTHCHECK instructions have been added to container images

(CKV_DOCKER_2)


[low] 1-16: Ensure that a user for the container has been created

(CKV_DOCKER_3)


[low] 1-16: Ensure that HEALTHCHECK instructions have been added to container images

(CKV_DOCKER_2)


[low] 1-16: Ensure that a user for the container has been created

(CKV_DOCKER_3)

🔇 Additional comments (2)
assets/clp/Dockerfile (2)

1-2: Pin the base image digest; avoid floating :main.

Good call naming the stage. Please replace :main with an immutable digest for reproducibility and supply‑chain hygiene.

-# TODO: use the latest version until the clp core/deps images are properly tagged with versions.
-FROM ghcr.io/y-scope/clp/clp-core-x86-ubuntu-jammy:main AS clp-core
+# TODO(quinntaylormitchell): Replace with pinned digest as soon as upstream publishes tags.
+FROM ghcr.io/y-scope/clp/clp-core-x86-ubuntu-jammy@sha256:<digest> AS clp-core

Please confirm the planned date (or upstream release) when you’ll switch from :main to a pinned digest/tag so we can track it. If you want, I can open a follow‑up issue.


4-4: Also pin the dependencies image; avoid :main.

Stage name is fine; same reproducibility concern applies here.

-FROM ghcr.io/y-scope/clp/clp-core-dependencies-x86-ubuntu-jammy:main AS clp-deps-core
+FROM ghcr.io/y-scope/clp/clp-core-dependencies-x86-ubuntu-jammy@sha256:<digest> AS clp-deps-core

Confirm when this will be updated to a static digest (or versioned tag).

@Bill-hbrhbr Bill-hbrhbr changed the title docs(clp): Rewrite clp methodology docs for better clarity; Bump clp version to 0.5.1. docs(clp): Rewrite clp methodology docs for better clarity; Bump clp asset version to 0.5.1. Sep 24, 2025
@Bill-hbrhbr Bill-hbrhbr self-requested a review September 24, 2025 19:32
Bill-hbrhbr
Bill-hbrhbr previously approved these changes Sep 24, 2025
Copy link
Author

@quinntaylormitchell quinntaylormitchell left a comment

Choose a reason for hiding this comment

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

a couple comments. also remember to update the Description section in the PR (I think you reused this branch, in the sense that this PR number used to be for something else).

Co-authored-by: Quinn Taylor Mitchell <q.mitchell@mail.utoronto.ca>
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.

2 participants