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

fix: Refactor init mongodb flow to check and enable replica set for external mongodb #10010

Conversation

geekup-legodevops
Copy link
Contributor

@geekup-legodevops geekup-legodevops commented Dec 27, 2021

Description

  • Add flow to check if MongoDB URI pointing to local service or not. Perform local mongodb init as normal
  • Remove unnecessary environment variables for MongoDB credentials and directly extract credentials from URI
  • Add prefix /api/v1 in the API_BASE_URL
  • Add flow to check external MongoDB is set as replica set or not. If yes, initiate the replica set. If not, print out error message and stop installation.

Fixes # (issue)

[Bug]: Using external MongoDB will still try to connect and configure local MongoDB

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@vercel
Copy link

vercel bot commented Dec 27, 2021

@geekup-legodevops is attempting to deploy a commit to the Appsmith Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@sharat87 sharat87 left a comment

Choose a reason for hiding this comment

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

In addition to these comments, I think there's a conflict as well. Please merge release back into this branch just in case.

deploy/docker/templates/docker.env.sh Show resolved Hide resolved
deploy/docker/entrypoint.sh Outdated Show resolved Hide resolved
deploy/docker/entrypoint.sh Outdated Show resolved Hide resolved
deploy/docker/entrypoint.sh Outdated Show resolved Hide resolved
deploy/docker/entrypoint.sh Outdated Show resolved Hide resolved
deploy/docker/entrypoint.sh Outdated Show resolved Hide resolved
deploy/docker/entrypoint.sh Outdated Show resolved Hide resolved
deploy/docker/entrypoint.sh Outdated Show resolved Hide resolved
@github-actions
Copy link

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Jan 20, 2022
@github-actions
Copy link

This PR has been closed because of inactivity.

@github-actions github-actions bot closed this Jan 31, 2022
@sharat87 sharat87 reopened this Feb 7, 2022
@sharat87 sharat87 changed the title Fix: Refactor init mongodb flow to check and enable replica set for external mongodb fix: Refactor init mongodb flow to check and enable replica set for external mongodb Feb 7, 2022
@sharat87 sharat87 merged commit 2d8e7fe into appsmithorg:release Feb 9, 2022
@MichaelLeeHobbs
Copy link

#11418 Bug on line 125

  if [[ $isUriLocal -gt 0 ]]; then

Should be

  if [[ $isUriLocal -eq 0 ]]; then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Using external MongoDB will still try to connect and configure local MongoDB
4 participants