copy metrics to container#71
Conversation
WalkthroughA single Dockerfile change adds copying the metrics directory into the image with "COPY metrics ./metrics/". No other instructions were modified; existing chown and runtime steps remain unchanged. The build now requires a metrics directory in the context. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Docker as Docker Daemon
participant Img as Image Filesystem
Dev->>Docker: docker build .
Docker->>Img: COPY service_client ./service_client/
Docker->>Img: COPY metrics ./metrics/
Docker->>Img: chown and runtime steps (unchanged)
Docker-->>Dev: Built image with /opt/app-root/src/metrics
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
Dockerfile (1)
16-16: Optional: add a build-time import smoke check (as non-root).A quick import check during build can catch regressions early if the directory goes missing or import paths change.
You can insert this after Line 20 (USER 1001):
RUN python -c "import importlib; importlib.import_module('metrics.metrics'); print('metrics import OK')"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
Dockerfile(1 hunks)
⏰ 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). (1)
- GitHub Check: Red Hat Konflux / assisted-service-mcp-saas-main-on-pull-request
🔇 Additional comments (1)
Dockerfile (1)
16-16: Fix aligns with PR objective; should resolve ModuleNotFoundError.Copying the metrics directory into APP_HOME makes metrics/metrics.py importable at runtime. This directly addresses the import path used by service_client (from metrics.metrics import API_CALL_LATENCY).
Please confirm that the repository build context contains:
- metrics/metrics.py (module path matches the import), and
- metrics is not excluded via .dockerignore.
|
🤦 Thanks @maorfr /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carbonin, maorfr The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
this PR copies the
metricsdirectory to the container for it to be found.this fixes an error introduced in #67:
Summary by CodeRabbit