Conversation
|
Warning Review failedThe pull request is closed. WalkthroughThe changes focus on updating the Docker files and scripts to streamline the usage of PostgreSQL 13 binaries. This involves modifying the environment variables and executable paths to improve consistency and simplify commands by avoiding explicit version numbers. Changes
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
|
/build-deploy-preview skip-tests=true |
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9542059512. |
|
Deploy-Preview-URL: https://ce-34265.dp.appsmith.com |
There was a problem hiding this comment.
Actionable comments posted: 1
Outside diff range and nitpick comments (2)
deploy/docker/fs/opt/appsmith/entrypoint.sh (2)
Line range hint
65-65: Declare and assign separately to avoid masking return values which can lead to hidden bugs if the commands fail.- local generated_appsmith_mongodb_password=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13; echo "") + local generated_appsmith_mongodb_password + generated_appsmith_mongodb_password=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13; echo "")Also applies to: 69-69, 73-73, 77-77
Line range hint
89-89: Explicitly specify the location of the sourced file to avoid runtime errors and ensure that the script is robust.- . "$TMP/pre-define.env" + if [[ -f "$TMP/pre-define.env" ]]; then + . "$TMP/pre-define.env" + else + echo "Error: Environment file $TMP/pre-define.env not found." + exit 1 + fi
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- deploy/docker/base.dockerfile (1 hunks)
- deploy/docker/fs/opt/appsmith/entrypoint.sh (3 hunks)
- deploy/docker/fs/opt/appsmith/run-postgres.sh (1 hunks)
Files not reviewed due to errors (1)
- deploy/docker/base.dockerfile (no review received)
Files skipped from review due to trivial changes (1)
- deploy/docker/fs/opt/appsmith/run-postgres.sh
Additional context used
Hadolint
deploy/docker/base.dockerfile
[warning] 17-17: Pin versions in apt get install. Instead of
apt-get install <package>useapt-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] 38-38: 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] 38-38: Double quote to prevent globbing and word splitting. (SC2086)
[warning] 49-49: 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] 55-55: 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)
Shellcheck
deploy/docker/fs/opt/appsmith/entrypoint.sh
[warning] 65-65: Declare and assign separately to avoid masking return values. (SC2155)
[warning] 69-69: Declare and assign separately to avoid masking return values. (SC2155)
[warning] 73-73: Declare and assign separately to avoid masking return values. (SC2155)
[warning] 77-77: Declare and assign separately to avoid masking return values. (SC2155)
[warning] 89-89: ShellCheck can't follow non-constant source. Use a directive to specify location. (SC1090)
Reason for this previously documented at #34265 (comment).
Reason for this previously documented at #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 -->
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 -->
Instead of using absolute paths to Postgres binaries, and in doing so, hard-coding the Postgres version number, we add the bin folder to
PATHso they're available directly.This also won't need the
currentsymlink we created. That symlink is causing problems in some post-installations scripts inapt/dpkg, since they're expecting a number in that folder, and seescurrent, it's confused and produces this error:After this is merged, we should be able to get rid of the
currentsymlink as well./test sanity
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9541787920
Commit: 1012266
Cypress dashboard.
Tags:
@tag.SanitySummary by CodeRabbit