fix(container): preserve LogSight package metadata - #15
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Docker builder now includes ChangesPackage metadata validation
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 166e913d74
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Verify installed package metadata | ||
| run: | | ||
| docker run --rm --entrypoint python logsight-ai:${{ github.sha }} -c \ | ||
| "from importlib.metadata import metadata; package = metadata('logsight-ai'); assert package['Requires-Python'] == '>=3.10'; assert package['Description-Content-Type'] == 'text/markdown'" |
There was a problem hiding this comment.
Assert the packaged README body
When README.md is omitted from the Docker build context, setuptools can still infer Description-Content-Type: text/markdown from the .md filename in pyproject.toml and copy Requires-Python directly from that file, while warning and producing an empty long description. Consequently, both assertions pass against the behavior this commit is meant to prevent; assert that the installed metadata payload contains a known README passage so CI detects a recurrence.
Useful? React with 👍 / 👎.
Summary
Repairs the container build context for setuptools package metadata and verifies the metadata of the package installed in the final image.
Addresses part of #13.
Problem
The Docker builder invoked the project build while omitting README.md, even though pyproject.toml declares it as the package readme. This makes the container build context diverge from the source-package build and risks incomplete package metadata.
Root cause
The Dockerfile copied the build configuration and package directory but not all files required by the declared build metadata.
Changes
Reproducibility
GitHub Actions runs docker build, logsight health inside the final image, and the new metadata assertion on this exact PR commit.
Metrics
No benchmark, coverage, latency, or security metric is added or modified.
Risk
Low. The runtime command and dependencies are unchanged; the image build now receives the declared metadata source file.
Rollback
Revert commits 1e5c58f and 166e913.
Remaining work
Issue #13 remains the tracker for full end-to-end AIOps evaluation, clean-clone validation, and broader evidence work.
Summary by CodeRabbit
Tests
Bug Fixes