Merge pull request #32482 from appsmithorg/release
08/04 Daily Promotion
This commit is contained in:
commit
f62952a936
4
.github/workflows/caddy-routes-test.yml
vendored
4
.github/workflows/caddy-routes-test.yml
vendored
|
|
@ -1,7 +1,9 @@
|
|||
name: Caddy routes test
|
||||
name: Caddy route tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * MON"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
name: Test, build and push Docker Image
|
||||
|
||||
run-name: >
|
||||
${{ github.workflow }} with TED:${{ inputs.ted_tag }}
|
||||
${{ github.workflow }} with TED:${{ inputs.ted_tag || 'latest' }}
|
||||
|
||||
on:
|
||||
# This workflow will run everyday at 7:00AM, 1:00PM IST on weekdays
|
||||
|
|
|
|||
|
|
@ -1213,15 +1213,7 @@ function* executePageLoadAction(
|
|||
data: payload,
|
||||
}),
|
||||
);
|
||||
yield put(
|
||||
updateActionData([
|
||||
{
|
||||
entityName: action.name,
|
||||
dataPath: "data",
|
||||
data: payload.body,
|
||||
},
|
||||
]),
|
||||
);
|
||||
|
||||
PerformanceTracker.stopAsyncTracking(
|
||||
PerformanceTransactionName.EXECUTE_ACTION,
|
||||
{
|
||||
|
|
@ -1276,15 +1268,7 @@ function* executePageLoadAction(
|
|||
undefined,
|
||||
pageAction.id,
|
||||
);
|
||||
yield put(
|
||||
updateActionData([
|
||||
{
|
||||
entityName: action.name,
|
||||
dataPath: "data",
|
||||
data: payload.body,
|
||||
},
|
||||
]),
|
||||
);
|
||||
|
||||
yield take(ReduxActionTypes.SET_EVALUATED_TREE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.appsmith.external.models.Endpoint;
|
|||
import com.appsmith.external.models.Property;
|
||||
import com.appsmith.external.models.SSLDetails;
|
||||
import com.external.plugins.exceptions.MongoPluginErrorMessages;
|
||||
import org.springframework.util.LinkedCaseInsensitiveMap;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -131,23 +132,23 @@ public class DatasourceUtils {
|
|||
}
|
||||
|
||||
private static String buildURITail(String tailInfo) {
|
||||
Map<String, String> optionsMap = new HashMap<>();
|
||||
|
||||
// case-insensitive match and preserves order of keys, hence the params ordering in the url remains unchanged
|
||||
Map<String, String> optionsMap = new LinkedCaseInsensitiveMap<>();
|
||||
for (final String part : tailInfo.split("[&;]")) {
|
||||
if (part.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
int idx = part.indexOf('=');
|
||||
if (idx >= 0) {
|
||||
String key = part.substring(0, idx).toLowerCase();
|
||||
String key = part.substring(0, idx);
|
||||
String value = part.substring(idx + 1);
|
||||
optionsMap.put(key, value);
|
||||
} else {
|
||||
optionsMap.put(part.toLowerCase(), "");
|
||||
optionsMap.put(part, "");
|
||||
}
|
||||
}
|
||||
optionsMap.putIfAbsent("authsource", "admin");
|
||||
optionsMap.put("minpoolsize", "0");
|
||||
optionsMap.putIfAbsent("minpoolsize", "0");
|
||||
return optionsMap.entrySet().stream()
|
||||
.map(entry -> {
|
||||
if (StringUtils.hasLength(entry.getValue())) {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,22 @@ public class DatasourceUtilsTest {
|
|||
public void testBuildClientURI_withUserInfoAndAuthSource() {
|
||||
|
||||
final String testUri = "mongodb://user:pass@host:port/db?param&authSource=notAdmin";
|
||||
final String resultUri = "mongodb://user:newPass@host:port/db?param&authsource=notAdmin&minpoolsize=0";
|
||||
final String resultUri = "mongodb://user:newPass@host:port/db?param&authSource=notAdmin&minpoolsize=0";
|
||||
|
||||
DatasourceConfiguration datasourceConfiguration = new DatasourceConfiguration();
|
||||
final DBAuth dbAuth = new DBAuth();
|
||||
dbAuth.setPassword("newPass");
|
||||
datasourceConfiguration.setAuthentication(dbAuth);
|
||||
datasourceConfiguration.setProperties(List.of(new Property("0", "Yes"), new Property("1", testUri)));
|
||||
final String clientURI = buildClientURI(datasourceConfiguration);
|
||||
assertEquals(resultUri, clientURI);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBuildClientURI_withUpperCaseCharacters_CaseRemainsUnchanged() {
|
||||
|
||||
final String testUri = "mongodb://user:pass@host:port/db?Param&authSource=notAdmin";
|
||||
final String resultUri = "mongodb://user:newPass@host:port/db?Param&authSource=notAdmin&minpoolsize=0";
|
||||
|
||||
DatasourceConfiguration datasourceConfiguration = new DatasourceConfiguration();
|
||||
final DBAuth dbAuth = new DBAuth();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user