chore: move evaluationVersion to CommonConstants (#34200)
## Description > Move EVALUATION_VERSION to `CommonConstanta.java` Fixes https://github.com/appsmithorg/appsmith/issues/34171 ## Automation /ok-to-test tags="@tag.Sanity,@tag.Workflows,@tag.Git,@tag.JS" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/9478016239> > Commit: b2459448474c16742d06e2f1fa45540f518b7e72 > Cypress dashboard url: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9478016239&attempt=1" target="_blank">Click here!</a> <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Centralized the `EVALUATION_VERSION` constant, now imported from `CommonConstants` across various services and tests for improved maintainability and consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
This commit is contained in:
parent
be76aeed60
commit
8f14e2c4f3
|
|
@ -6,4 +6,5 @@ public class CommonConstantsCE {
|
|||
public static String FOR = DELIMETER_SPACE + "for" + DELIMETER_SPACE;
|
||||
public static String IN = DELIMETER_SPACE + "in" + DELIMETER_SPACE;
|
||||
public static String DEFAULT = "default";
|
||||
public static final Integer EVALUATION_VERSION = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
|||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.appsmith.server.services.ce.ApplicationPageServiceCEImpl.EVALUATION_VERSION;
|
||||
import static com.appsmith.server.constants.CommonConstants.EVALUATION_VERSION;
|
||||
import static java.lang.Boolean.FALSE;
|
||||
|
||||
@Slf4j
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ import java.util.Set;
|
|||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.appsmith.server.constants.CommonConstants.EVALUATION_VERSION;
|
||||
import static com.appsmith.server.helpers.ContextTypeUtils.getDefaultContextIfNull;
|
||||
import static com.appsmith.server.services.ce.ApplicationPageServiceCEImpl.EVALUATION_VERSION;
|
||||
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ import java.util.Set;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.appsmith.server.acl.AclPermission.MANAGE_APPLICATIONS;
|
||||
import static com.appsmith.server.constants.CommonConstants.EVALUATION_VERSION;
|
||||
import static org.apache.commons.lang.ObjectUtils.defaultIfNull;
|
||||
|
||||
@Slf4j
|
||||
|
|
@ -127,8 +128,6 @@ public class ApplicationPageServiceCEImpl implements ApplicationPageServiceCE {
|
|||
private final ClonePageService<NewAction> actionClonePageService;
|
||||
private final ClonePageService<ActionCollection> actionCollectionClonePageService;
|
||||
|
||||
public static final Integer EVALUATION_VERSION = 2;
|
||||
|
||||
@Override
|
||||
public Mono<PageDTO> createPage(PageDTO page) {
|
||||
if (page.getId() != null) {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ import reactor.test.StepVerifier;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.appsmith.server.services.ce.ApplicationPageServiceCEImpl.EVALUATION_VERSION;
|
||||
import static com.appsmith.server.constants.CommonConstants.EVALUATION_VERSION;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ import java.util.Set;
|
|||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.appsmith.server.services.ce.ApplicationPageServiceCEImpl.EVALUATION_VERSION;
|
||||
import static com.appsmith.server.constants.CommonConstants.EVALUATION_VERSION;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@ExtendWith(SpringExtension.class)
|
||||
|
|
|
|||
|
|
@ -98,10 +98,10 @@ import static com.appsmith.server.acl.AclPermission.READ_ACTIONS;
|
|||
import static com.appsmith.server.acl.AclPermission.READ_DATASOURCES;
|
||||
import static com.appsmith.server.acl.AclPermission.READ_PAGES;
|
||||
import static com.appsmith.server.acl.AclPermission.READ_WORKSPACES;
|
||||
import static com.appsmith.server.constants.CommonConstants.EVALUATION_VERSION;
|
||||
import static com.appsmith.server.constants.FieldName.ADMINISTRATOR;
|
||||
import static com.appsmith.server.constants.FieldName.DEVELOPER;
|
||||
import static com.appsmith.server.constants.FieldName.VIEWER;
|
||||
import static com.appsmith.server.services.ce.ApplicationPageServiceCEImpl.EVALUATION_VERSION;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@ExtendWith(SpringExtension.class)
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ import static com.appsmith.server.acl.AclPermission.READ_DATASOURCES;
|
|||
import static com.appsmith.server.acl.AclPermission.READ_PAGES;
|
||||
import static com.appsmith.server.acl.AclPermission.READ_WORKSPACES;
|
||||
import static com.appsmith.server.constants.ArtifactType.APPLICATION;
|
||||
import static com.appsmith.server.constants.CommonConstants.EVALUATION_VERSION;
|
||||
import static com.appsmith.server.constants.FieldName.ADMINISTRATOR;
|
||||
import static com.appsmith.server.constants.FieldName.ANONYMOUS_USER;
|
||||
import static com.appsmith.server.constants.FieldName.DEFAULT_PAGE_LAYOUT;
|
||||
|
|
@ -156,7 +157,6 @@ import static com.appsmith.server.constants.FieldName.DEVELOPER;
|
|||
import static com.appsmith.server.constants.FieldName.VIEWER;
|
||||
import static com.appsmith.server.constants.ce.FieldNameCE.WORKSPACE;
|
||||
import static com.appsmith.server.dtos.CustomJSLibContextDTO.getDTOFromCustomJSLib;
|
||||
import static com.appsmith.server.services.ApplicationPageServiceImpl.EVALUATION_VERSION;
|
||||
import static java.lang.Boolean.TRUE;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user