Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add missing libcurl4 dependency to clp-core and package execution containers. #670

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

gibber9809
Copy link
Contributor

@gibber9809 gibber9809 commented Jan 16, 2025

Description

As pointed out in #669 the core container for the package is missing the libcurl4 dependency. This PR adds libcurl4 to the core container (and explicitly pulls libcurl4 into the execution containers).

Validation performed

  • Locally built core container and confirmed that it can now run clp-s

Summary by CodeRabbit

  • Dependency Updates
    • Added libcurl4 package to Docker image setup scripts for Ubuntu Focal and Jammy distributions
    • Ensures consistent library availability across different Ubuntu versions

Copy link
Contributor

coderabbitai bot commented Jan 16, 2025

Walkthrough

The pull request introduces the installation of the libcurl4 package in the Docker image setup scripts for both Ubuntu Focal and Jammy distributions. This change is reflected in the install-prebuilt-packages.sh scripts located in the tools/docker-images directory, as well as in the Dockerfile for the core Ubuntu Focal image. The addition of libcurl4 enhances the set of libraries available during the Docker image build process.

Changes

File Path Change Summary
tools/docker-images/.../focal/setup-scripts/install-prebuilt-packages.sh Added libcurl4 to package installation list
tools/docker-images/.../jammy/setup-scripts/install-prebuilt-packages.sh Added libcurl4 to package installation list
components/core/tools/docker-images/.../focal/Dockerfile Added libcurl4 to package installation list

The changes are consistent across the relevant files, all involving the inclusion of the libcurl4 package in the apt-get install command.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

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

Sorry, I misspoke offline. It's not the execution containers that need libcurl4 (they already have it, although it doesn't hurt to add explicitly), but rather the core container.

Copy link
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 (2)
components/core/tools/docker-images/clp-core-ubuntu-focal/Dockerfile (2)

Line range hint 2-9: Consider pinning package versions for reproducible builds.

While the package installation works, consider pinning specific versions of all packages (libcurl4, libmariadb-dev, libssl-dev) to ensure reproducible builds and prevent unexpected issues from package updates.

Example:

RUN apt-get update \
    && apt-get install -y \
-    libcurl4 \
-    libmariadb-dev \
-    libssl-dev
+    libcurl4=7.68.0-1ubuntu2.20 \
+    libmariadb-dev=1:10.3.38-0ubuntu0.20.04.1 \
+    libssl-dev=1.1.1f-1ubuntu2.20

Line range hint 3-4: Consider documenting or addressing the hidden dependency.

The TODO comment indicates that libssl-dev is a hidden dependency. Consider:

  1. Documenting why this dependency is required
  2. Investigating if it can be made explicit in the package requirements
  3. Adding tests to validate the dependency relationship

Would you like me to help create an issue to track the investigation of this hidden dependency?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9dc5e90 and 88f831e.

📒 Files selected for processing (1)
  • components/core/tools/docker-images/clp-core-ubuntu-focal/Dockerfile (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: lint-check (ubuntu-latest)
  • GitHub Check: build (macos-latest)
  • GitHub Check: lint-check (macos-latest)
🔇 Additional comments (1)
components/core/tools/docker-images/clp-core-ubuntu-focal/Dockerfile (1)

7-7: LGTM! Verify package installation in the built image.

The addition of libcurl4 as a runtime dependency is correct and aligns with the PR objectives.

Run this script to verify the package installation in the built image:

✅ Verification successful

The libcurl4 package addition is properly implemented.

The package is correctly:

  • Added as a runtime dependency in the base stage
  • Installed alongside compatible dependencies
  • Cleaned up to maintain minimal image size
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify libcurl4 package installation and its dependencies
# Note: This assumes the image has been built and tagged as clp-core-ubuntu-focal

# Check if libcurl4 is installed and get its version
docker run --rm clp-core-ubuntu-focal dpkg-query -W -f='${Package} ${Version}\n' libcurl4

# List all dependencies of libcurl4
docker run --rm clp-core-ubuntu-focal apt-cache depends libcurl4

Length of output: 352


Script:

#!/bin/bash
# Search for libcurl4 mentions across the codebase
echo "=== Searching for libcurl4 mentions ==="
rg -i "libcurl4" --type-add 'docker:*.{dockerfile,Dockerfile}' --type docker -C 3

echo -e "\n=== Checking complete Dockerfile content ==="
cat components/core/tools/docker-images/clp-core-ubuntu-focal/Dockerfile

echo -e "\n=== Looking for related package configurations ==="
fd -e json -e yaml -e yml -e conf | xargs rg -l "curl|ssl"

Length of output: 1785

@gibber9809 gibber9809 changed the title fix(clp-package): Add missing libcurl4 dependency in execution containers. fix(clp-package): Add missing libcurl4 dependency to core ubuntu focal container. Jan 16, 2025
Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

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

For the PR title, how about:

fix: Add missing `libcurl4` dependency to clp-core and package execution containers.

@gibber9809 gibber9809 changed the title fix(clp-package): Add missing libcurl4 dependency to core ubuntu focal container. fix: Add missing libcurl4 dependency to clp-core and package execution containers. Jan 16, 2025
@gibber9809 gibber9809 merged commit e04f77a into y-scope:main Jan 16, 2025
21 checks passed
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