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: add warning for custom APPSMITH_GIT_ROOT #33355

Merged
merged 3 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions deploy/docker/fs/opt/appsmith/run-with-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ fi

if [[ -z "${APPSMITH_GIT_ROOT:-}" ]]; then
export APPSMITH_GIT_ROOT=/appsmith-stacks/git-storage
else
echo "WARNING: It appears a custom value has been configured for APPSMITH_GIT_ROOT. This behaviour is deprecated and will soon be removed."
fi
mkdir -pv "$APPSMITH_GIT_ROOT"

Expand Down
5 changes: 5 additions & 0 deletions deploy/docker/fs/opt/appsmith/utils/bin/backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ async function createGitStorageArchive(destFolder) {

const gitRoot = getGitRoot(process.env.APPSMITH_GIT_ROOT);

if (gitRoot != "/appsmith-stacks/git-storage/"){
Copy link
Member

Choose a reason for hiding this comment

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

This condition will always fail, even if custom git root isn't set. If you see the function getGitRoot, we have:

shot-2024-05-27-04-17-05

The default value there doesn't have a trailing /. Can we test and verify this once please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea got it

console.log('WARNING: It appears a custom value has been configured for APPSMITH_GIT_ROOT.'+
' This behaviour is deprecated and will soon be removed.')
}

await executeCopyCMD(gitRoot, destFolder)

console.log('Created git-storage archive');
Expand Down