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
Is your feature request related to a problem? Please describe.
We deploy our instance of the connector in a cloud environment, where we don't have control over the name assigned to our MongoDB databases. However due to the following line in the initAccount method of ConnectorRuntime.ts, this doesn't work:
As can be seen here, the connector requires the database name to always start with acc-.
Describe the solution you'd like
Rather than always requiring this prefix, it should be possible to fully configure the database name.
For backwards compatibility reasons, I would suggest the following in the ConnectorRuntime.ts:
This means that an optional dbNamePrefix can be passed in the configuration. If no such parameter is given, the behaviour remains unchanged.
In our case, the relevant part of the config looks like this:
{
"database": {
"dbNamePrefix": ""
}
}
Describe alternatives you've considered
Currently we're running patch files on four files to enable the desired behaviour. I have attached these patch files as part of this ticket; in our own Dockerfile (which is a modified copy of the Connector Dockerfile we run the patches as follows:
# basic setup, of the builder, retrieve the code (ommited for brevity)COPY build/ConnectorRuntime.ts.patch ConnectorRuntime.ts.patch
RUN patch src/ConnectorRuntime.ts < ConnectorRuntime.ts.patch
COPY build/ConnectorRuntimeConfig.ts.patch ConnectorRuntimeConfig.ts.patch
RUN patch src/ConnectorRuntimeConfig.ts < ConnectorRuntimeConfig.ts.patch
COPY build/connectorConfig.json.patch connectorConfig.json.patch
RUN patch src/jsonSchemas/connectorConfig.json < connectorConfig.json.patch
COPY build/connectorConfig.ts.patch connectorConfig.ts.patch
RUN patch src/jsonSchemas/connectorConfig.ts < connectorConfig.ts.patch
RUN npm ci
RUN npm run build
RUN .ci/writeBuildInformation.sh
If this feature were to be implemented, we could use the provided Docker image instead.
Environment
Connector
Is your feature request related to a problem? Please describe.
We deploy our instance of the connector in a cloud environment, where we don't have control over the name assigned to our MongoDB databases. However due to the following line in the
initAccount
method of ConnectorRuntime.ts, this doesn't work:As can be seen here, the connector requires the database name to always start with
acc-
.Describe the solution you'd like
Rather than always requiring this prefix, it should be possible to fully configure the database name.
For backwards compatibility reasons, I would suggest the following in the
ConnectorRuntime.ts
:This means that an optional
dbNamePrefix
can be passed in the configuration. If no such parameter is given, the behaviour remains unchanged.In our case, the relevant part of the config looks like this:
Describe alternatives you've considered
Currently we're running patch files on four files to enable the desired behaviour. I have attached these patch files as part of this ticket; in our own Dockerfile (which is a modified copy of the Connector Dockerfile we run the patches as follows:
If this feature were to be implemented, we could use the provided Docker image instead.
Our patch files
connectorConfig.json.patch (for the
src/jsonSchemas/connectorConfig.json
)connectorConfig.ts.patch (for the
src/jsonSchemas/connectorConfig.ts
)ConnectorRuntime.ts.patch (for the
src/ConnectorRuntime.ts
)ConnectorRuntimeConfig.ts.patch (for the
src/ConnectorRuntimeConfig.ts
)The text was updated successfully, but these errors were encountered: