Skip to content

chore: Remove current symlink to Postgres#34454

Merged
sharat87 merged 1 commit intoreleasefrom
sharat87-patch-3
Jun 25, 2024
Merged

chore: Remove current symlink to Postgres#34454
sharat87 merged 1 commit intoreleasefrom
sharat87-patch-3

Conversation

@sharat87
Copy link
Member

@sharat87 sharat87 commented Jun 25, 2024

Reason for this previously documented at #34265 (comment).

Cypress tests don' make sense since the only diff is on base.dockerfile.

Summary by CodeRabbit

  • Chores
    • Updated Dockerfile to streamline PostgreSQL setup. Removed creation of a symlink to the current version of PostgreSQL.

Reason for this previously documented at #34265 (comment).
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 25, 2024

Walkthrough

The key change involves removing the creation of a symlink that pointed to the current version of PostgreSQL in a Dockerfile, while still focusing on installing necessary packages and setting up the environment.

Changes

File Path Change Summary
deploy/docker/base.dockerfile Removed symlink creation to the current PostgreSQL version, focusing instead on package installations and environment setup.

Poem

In Docker's depths, we made a shift,
No more symlinks, a simple thrift.
PostgreSQL, though still in play,
We trim the steps, smooth the way.
Code and Compose, streamlined lives,
Efficiency in each line thrives! 🚀🐰


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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

@sharat87 sharat87 requested review from abhvsn and mohanarpit June 25, 2024 04:53
@sharat87 sharat87 marked this pull request as ready for review June 25, 2024 04:53
@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Jun 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 (6)
deploy/docker/base.dockerfile (6)

Line range hint 17-17: Pin versions in apt-get install to avoid potential inconsistencies.

To ensure reproducibility and avoid unexpected changes when packages are updated, it's advisable to pin versions of the packages being installed.

- apt-get install --no-install-recommends --yes supervisor curl nfs-common gnupg wget netcat openssh-client gettext ca-certificates
+ apt-get install --no-install-recommends --yes supervisor=3.3.5 curl=7.68.0 nfs-common=1.3.4 gnupg=2.2.19 wget=1.20.3 netcat=1.10 openssh-client=1:8.2p1 gettext=0.19.8.1 ca-certificates=20210119

Line range hint 17-17: Set the SHELL option -o pipefail before using pipes in RUN commands.

This is a best practice to ensure that errors in a pipeline are not masked. If any command in a pipeline fails, this will cause the entire pipeline to fail, which is critical for detecting errors early.

+ SHELL ["/bin/bash", "-o", "pipefail"]

Line range hint 17-17: Replace apt with apt-get for non-interactive use in scripts.

apt-get is more suitable for use in scripts as it does not have the interactive progress bars and prompts that apt does.

- apt update
+ apt-get update

Line range hint 17-17: Ensure that apt-get lists are deleted after package installation.

This is a common practice to reduce the image size and remove unnecessary files.

+  && rm -rf /var/lib/apt/lists/*

Line range hint 36-36: Double quote variables to prevent globbing and word splitting.

This is important to ensure that the shell does not interpret special characters or spaces in the variable as separate arguments or commands.

- 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"
+ 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"

Line range hint 17-17: Consistently use SHELL option -o pipefail across all RUN commands with pipes.

This change ensures that all commands in the pipeline fail if any command fails, which is crucial for error detection.

+ SHELL ["/bin/bash", "-o", "pipefail"]

Also applies to: 36-36, 47-47, 53-53

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between dc79ebb and 886c0ed.

Files selected for processing (1)
  • deploy/docker/base.dockerfile (1 hunks)
Additional context used
Hadolint
deploy/docker/base.dockerfile

[warning] 17-17: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version> (DL3008)


[info] 17-17: Delete the apt-get lists after installing something (DL3009)


[warning] 17-17: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)


[warning] 17-17: Do not use apt as it is meant to be a end-user tool, use apt-get or apt-cache instead (DL3027)


[warning] 36-36: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)


[info] 36-36: Double quote to prevent globbing and word splitting. (SC2086)


[warning] 47-47: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)


[warning] 53-53: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check (DL4006)

@sharat87 sharat87 merged commit 064d74c into release Jun 25, 2024
@sharat87 sharat87 deleted the sharat87-patch-3 branch June 25, 2024 07:33
Shivam-z pushed a commit to Shivam-z/appsmith that referenced this pull request Jul 10, 2024
Reason for this previously documented at
appsmithorg#34265 (comment).

Cypress tests don' make sense since the only diff is on
`base.dockerfile`.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated Dockerfile to streamline PostgreSQL setup. Removed creation of
a symlink to the current version of PostgreSQL.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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