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

chore: Don't need wget anymore #37667

Merged
merged 1 commit into from
Nov 25, 2024
Merged

chore: Don't need wget anymore #37667

merged 1 commit into from
Nov 25, 2024

Conversation

sharat87
Copy link
Member

@sharat87 sharat87 commented Nov 25, 2024

We don't use wget, just curl in all places.

Tested with full suite on EE.

Automation

/test sanity

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Chores
    • Updated PostgreSQL version from 13 to 14 in the installation process.
    • Removed wget from the package installation command, streamlining the setup.
    • Retained language settings and environment variables for compatibility.
    • Maintained existing installation steps for Java and NodeJS, ensuring consistency.

Copy link
Contributor

coderabbitai bot commented Nov 25, 2024

Walkthrough

The pull request modifies the base.dockerfile to update the package installation process. The wget package is removed, and several packages including supervisor, curl, nfs-common, gnupg, and gettext are installed instead. The PostgreSQL version is updated from postgresql-13 to postgresql-14, while the installation steps for Java and NodeJS remain unchanged. The cleanup process and environment variables are retained, ensuring consistency in the Docker image.

Changes

File Change Summary
deploy/docker/base.dockerfile Removed wget from installation; added supervisor, curl, nfs-common, gnupg, gettext, and ca-certificates; updated PostgreSQL from postgresql-13 to postgresql-14; retained Java and NodeJS installations; kept cleanup process unchanged.

Possibly related PRs

Suggested labels

skip-changelog

Suggested reviewers

  • mohanarpit
  • pratapaprasanna
  • nidhi-nair

🎉 In the Dockerfile, we made a change,
Removing wget, a tidy exchange.
With PostgreSQL now a version higher,
Our image builds will surely inspire!
Clean and lean, we keep it bright,
A smoother deploy, all set for flight! 🚀


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 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.

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.

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Nov 25, 2024
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

🧹 Outside diff range and nitpick comments (2)
deploy/docker/base.dockerfile (2)

Line range hint 41-44: Add checksum verification for downloads

While Node.js downloads include SHA256 verification, other curl downloads lack checksum verification. Consider adding similar verification for Java and Caddy downloads.

Example implementation:

  && version="17.0.9+9" \
+ && curl -LOsS "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-$version/OpenJDK17U-jdk_$(uname -m | sed s/x86_64/x64/)_linux_hotspot_$(echo $version | tr + _).tar.gz.sha256.txt" \
  && curl --location "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-$version/OpenJDK17U-jdk_$(uname -m | sed s/x86_64/x64/)_linux_hotspot_$(echo $version | tr + _).tar.gz" \
+ | tee jdk.tar.gz | sha256sum -c jdk.tar.gz.sha256.txt \
- | tar -xz -C /opt/java --strip-components 1
+ && tar -xzf jdk.tar.gz -C /opt/java --strip-components 1 \
+ && rm jdk.tar.gz jdk.tar.gz.sha256.txt

Line range hint 19-30: Consider optimizing layer caching

The package installation steps could be optimized for better layer caching. Consider combining related operations into single RUN instructions while keeping logical grouping.

Example restructuring:

RUN set -o xtrace \
  && apt-get update \
  && apt-get upgrade --yes \
  && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes \
    supervisor curl nfs-common gnupg \
    gettext \
    ca-certificates \
+ && curl --silent --show-error --location https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add - \
+ && curl --silent --show-error --location https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
+ && echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list \
+ && echo "deb http://apt.postgresql.org/pub/repos/apt $(grep CODENAME /etc/lsb-release | cut -d= -f2)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
+ && apt-get update \
+ && apt-get install --no-install-recommends --yes mongodb-org redis postgresql-14 \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/*
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 392524e and 85fde98.

📒 Files selected for processing (1)
  • deploy/docker/base.dockerfile (1 hunks)
🔇 Additional comments (2)
deploy/docker/base.dockerfile (2)

21-23: LGTM: Package changes align with requirements

The replacement of wget with curl is appropriate, and the additional packages are properly specified with minimal installation flags.

Let's verify no remaining wget dependencies:


Line range hint 30-30: Verify PostgreSQL upgrade impact

The upgrade from PostgreSQL 13 to 14 is a major version change. While the installation change is correct, we should ensure proper migration handling.

Let's check for PostgreSQL-specific configurations:

Also applies to: 32-32

@sharat87 sharat87 merged commit a320605 into release Nov 25, 2024
17 checks passed
@sharat87 sharat87 deleted the sharat87-patch-3 branch November 25, 2024 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Adding this label to a PR prevents it from being listed in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants