Skip to content

chore: Remove unused netcat and openssh-client#37662

Merged
sharat87 merged 2 commits intoreleasefrom
sharat87-patch-3
Nov 23, 2024
Merged

chore: Remove unused netcat and openssh-client#37662
sharat87 merged 2 commits intoreleasefrom
sharat87-patch-3

Conversation

@sharat87
Copy link
Member

@sharat87 sharat87 commented Nov 23, 2024

These packages were installed in daf60fa for use with the appsmithctl migrate command, which has never been documented, been deprecated and then deleted from code for some time now.

Removing these packages now as we don't need them any longer.

Tested on EE and verified /test all to have passed.

Automation

/test sanity

🔍 Cypress test results

Warning

Tests have not run on the HEAD 5f83399 yet


Sat, 23 Nov 2024 11:41:28 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Updated the base image to ubuntu:20.04 for improved compatibility.
    • Introduced a new builder stage for Caddy with the caddy-ratelimit module.
    • Enhanced support for internationalization by setting environment variables for language and locale.
    • Added a new section in the documentation for managing processes within the Docker container using Supervisord.
  • Improvements

    • Streamlined package installation process by removing unnecessary packages.
    • Optimized the final image size with cleanup commands and maintained essential database services.
    • Updated documentation to reflect changes and improve clarity on process management.

@sharat87 sharat87 marked this pull request as ready for review November 23, 2024 08:29
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 23, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The changes in this pull request involve significant updates to the Dockerfile for the Appsmith application. The base image has been switched to ubuntu:20.04, and a new builder image caddy:builder-alpine has been introduced. Several environment variables have been added or modified to support internationalization and set temporary paths. The installation process for Java and Node.js remains, with Java version specified. Cleanup commands are included to optimize the image size, and volume declarations for application stacks are also maintained.

Changes

File Change Summary
deploy/docker/base.dockerfile - Updated base image to ubuntu:20.04.
- Added caddy:builder-alpine for Caddy build.
- Added environment variables for LANG, LC_ALL, TMP, and WWW_PATH.
- Updated PATH for PostgreSQL.
- Added volume declaration for /appsmith-stacks.
- Removed netcat and openssh-client from installed packages.
- Preserved installation steps for MongoDB, Redis, PostgreSQL, Java, and Node.js, including cleanup commands.
deploy/docker/README.md - Removed "Migrate To New Server" section.
- Added "Supervisor" section for managing processes within the container.

Possibly related PRs

Suggested labels

ok-to-test

Suggested reviewers

  • pratapaprasanna
  • mohanarpit

🎉 In the Dockerfile, changes abound,
With Ubuntu 20.04 now renowned.
Caddy's built with care,
Environment variables flair,
Appsmith's setup, smooth and sound! 🚀


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.

@sharat87 sharat87 requested a review from mohanarpit November 23, 2024 08:29
@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 23, 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: 1

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

Line range hint 1-5: Consider upgrading to Ubuntu 22.04 LTS

While the current setup works, Ubuntu 20.04 is approaching end of standard support. Consider upgrading to Ubuntu 22.04 LTS for longer support lifecycle.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 86d17a6 and 34dce2d.

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

Line range hint 82-91: LGTM! Cleanup steps are thorough

The cleanup process removes unnecessary files and properly manages the volume declaration.


Line range hint 35-41: Address the TODO comment about Java version management

The hardcoded version is a temporary solution. Consider implementing a more robust version management strategy.

Let's check for the latest available versions:

Would you like help implementing a more robust version detection mechanism?

✅ Verification successful

TODO comment can be resolved - Linux binaries are now available

The latest release (17.0.13_11) includes Linux binaries for all architectures. You can now implement the version detection using the commented-out curl command:

version="$(curl --write-out '%{redirect_url}' 'https://github.com/adoptium/temurin17-binaries/releases/latest' | sed 's,.*jdk-,,')"
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check latest Temurin releases for Linux binaries
gh api repos/adoptium/temurin17-binaries/releases | jq -r '.[].tag_name' | head -n 5

Length of output: 155


Script:

#!/bin/bash
# Check if Linux binaries exist for the latest version
gh api repos/adoptium/temurin17-binaries/releases/latest | jq -r '.assets[].name' | grep -i linux

Length of output: 10315

&& apt-get upgrade --yes \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes \
supervisor curl nfs-common gnupg wget netcat openssh-client \
supervisor curl nfs-common gnupg wget \
Copy link
Contributor

@coderabbitai coderabbitai bot Nov 23, 2024

Choose a reason for hiding this comment

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

💡 Codebase verification

Documentation needs to be updated to remove deprecated migrate command reference

The packages can be safely removed, but the README.md still contains a reference to the deprecated appsmithctl migrate command in the "Migrate To New Server" section.

  • deploy/docker/README.md: Remove or update the "Migrate To New Server" section as the command is no longer supported
🔗 Analysis chain

Verify removal of netcat and openssh-client dependencies

The removal of these packages aligns with the deprecation of the appsmithctl migrate command.

Let's verify there are no remaining references to these packages or the migrate command:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining references to netcat, openssh-client, or migrate command
rg -i "netcat|openssh-client|appsmithctl migrate"

Length of output: 150


Script:

#!/bin/bash
# Check the README.md content for context around the migrate command
cat deploy/docker/README.md

Length of output: 9529

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

@sharat87, thank you for updating the documentation!


If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!

mohanarpit
mohanarpit previously approved these changes Nov 23, 2024
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