Merge pull request #32482 from appsmithorg/release

08/04 Daily Promotion
This commit is contained in:
Trisha Anand 2024-04-08 13:06:43 +05:30 committed by GitHub
commit f62952a936
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 28 additions and 26 deletions

View File

@ -1,7 +1,9 @@
name: Caddy routes test
name: Caddy route tests
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * MON"
jobs:
build:

View File

@ -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

View File

@ -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);
}
}

View File

@ -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())) {

View File

@ -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();