You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the entrypoint.sh script, we check if the MongoDB in use, has replicaSet initiated or not. This is usually done with a rs.initiate() on the cluster.
We need the replicaSet to be enabled on MongoDB, since the backend server relies on MongoDB changeStreams, which is a feature, only available if replicaSet is enabled.
However, to use the changeStream APIs, having the read or readWrite role on MongoDB is enough. But the check we do in entrypoint.sh, runs rs.status() to see if replicaSet is initiated. This rs.status() call, unfortunately, requires the ClusterMonitor role, unlike the changeStream API.
To tackle this, we created the appsmithctl check_replica_set command. This command would attempt to use the changeStream API, and report success or failure. But this failed on certain configurations, where MongoDB was running as a single-node-cluster, on localhost, or a local/internal network. This was an edge case.
That edge case is solved by this PR. With this, we can use appsmithctl check-replica-set in the entrypoint.sh again.
The following are new failures, please fix them before merging the PR cypress/integration/Regression_TestSuite/ClientSideTests/ActionExecution/Error_handling_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/AdminSettings/Admin_settings_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_API_with_List_Widget_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Invalid_binding_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Binding/No_Binding_Prompt_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Binding/TableV2Widgets_NavigateTo_Validation_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/DynamicHeight/DynamicHeight_CanvasHeight_resize_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Linting/EntityPropertiesLint_spec.ts
cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ForkApplication_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/ViewMode_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/VisualTests/JSEditorIndent_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/JSONForm/JSONForm_AutoGenerateFormEnabled_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/Autocomplete_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab/Tab_OnEvent_Navigation_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Tab_reset_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Column_Order_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/TableV2/TableV2_Widget_Derived_Column_Computed_value_spec.js
cypress/integration/Regression_TestSuite/ClientSideTests/Workspace/CreateAppWithSameNameInWorkspace_spec.js
cypress/integration/Regression_TestSuite/ServerSideTests/ApiTests/API_Unique_name_spec.js
The following are new failures, please fix them before merging the PR cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_To_App_spec.js
cypress/integration/Regression_TestSuite/ServerSideTests/QueryPane/S3_2_spec.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the
entrypoint.shscript, we check if the MongoDB in use, has replicaSet initiated or not. This is usually done with ars.initiate()on the cluster.We need the replicaSet to be enabled on MongoDB, since the backend server relies on MongoDB
changeStreams, which is a feature, only available if replicaSet is enabled.However, to use the
changeStreamAPIs, having thereadorreadWriterole on MongoDB is enough. But the check we do inentrypoint.sh, runsrs.status()to see ifreplicaSetis initiated. Thisrs.status()call, unfortunately, requires theClusterMonitorrole, unlike thechangeStreamAPI.To tackle this, we created the
appsmithctl check_replica_setcommand. This command would attempt to use thechangeStreamAPI, and report success or failure. But this failed on certain configurations, where MongoDB was running as a single-node-cluster, on localhost, or a local/internal network. This was an edge case.That edge case is solved by this PR. With this, we can use
appsmithctl check-replica-setin theentrypoint.shagain.