Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCD-5322 synching - Use ccd-test-definition 7.23.0 and fix WARNING: PropertyNamingStrateg… #2462

Closed
wants to merge 57 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7a12b2c
Use ccd-test-definition 7.23.0 and fix WARNING: PropertyNamingStrateg…
patelila Aug 15, 2024
c3e425d
empty commit to trigger build
patelila Aug 15, 2024
997ae0a
empty commit to trigger build
patelila Aug 15, 2024
c79d21c
empty commit to trigger build
patelila Aug 16, 2024
8ecaa79
empty commit to trigger build
patelila Aug 16, 2024
abf7c67
Use pr-1468 instead of pr-575
patelila Aug 16, 2024
13b4325
empty commit to trigger build
patelila Aug 19, 2024
779f5f3
empty commit to trigger build
patelila Aug 19, 2024
ab1846a
empty commit to trigger build
patelila Aug 19, 2024
b744191
empty commit to trigger build
patelila Aug 19, 2024
62ec7fc
empty commit to trigger build
patelila Aug 19, 2024
f74a959
remove prs values from prsToUseAat and output content of env.DEFINITI…
patelila Aug 19, 2024
97d8728
remove prs values from prsToUseAat and output content of env.DEFINITI…
patelila Aug 19, 2024
3608d01
empty commit to trigger build
patelila Aug 19, 2024
78ddac1
empty commit to trigger build
patelila Aug 19, 2024
ec44983
empty commit to trigger build
patelila Aug 20, 2024
1076b1f
empty commit to trigger build
patelila Aug 20, 2024
3b7fe80
empty commit to trigger build
patelila Aug 20, 2024
6580b80
empty commit to trigger build
patelila Aug 20, 2024
9e52157
empty commit to trigger build
patelila Aug 20, 2024
9750d75
empty commit to trigger build
patelila Aug 20, 2024
8e0da24
empty commit to trigger build
patelila Aug 20, 2024
1061b1c
setting up debug output so can find what the issue is.
patelila Aug 21, 2024
20778c9
setting up debug output so can find what the issue is.
patelila Aug 21, 2024
f65fc00
setting up debug output so can find what the issue is.
patelila Aug 21, 2024
0f1e6c6
Making sure the PR definition store is being used as it cannot find t…
patelila Aug 22, 2024
5db7ea7
typo
patelila Aug 22, 2024
95f459b
revert change
patelila Aug 22, 2024
3ab425b
empty commit to trigger build
patelila Aug 22, 2024
c0263d8
empty commit to trigger build
patelila Aug 22, 2024
99c56e8
CCD logging level to Debug
patelila Aug 22, 2024
bce5385
empty commit to trigger build
patelila Aug 22, 2024
03bef65
DATA_STORE_DEFAULT_LOG_LEVEL logging level to Debug
patelila Aug 22, 2024
126004c
empty commit to trigger build
patelila Aug 22, 2024
6063857
empty commit to trigger build
patelila Aug 23, 2024
d3dfad1
empty commit to trigger build
patelila Aug 23, 2024
3113981
Merge branch 'master' into CCD-5647_Mismatch_new
patelila Sep 9, 2024
59b816b
output value of DATA_STORE_DB_HOST
patelila Sep 9, 2024
8298fbe
empty commit to trigger build
patelila Sep 9, 2024
a8dec1c
empty commit to trigger build
patelila Sep 10, 2024
aa79e28
empty commit to trigger build
patelila Sep 10, 2024
cfa3e61
Merge branch 'master' into CCD-5647_Mismatch_new
patelila Sep 10, 2024
ced0e80
Merge branch 'master' into CCD-5647_Mismatch_new
patelila Sep 10, 2024
bed914b
empty commit to trigger build
patelila Sep 10, 2024
c46cd54
adding before smoketest
patelila Sep 11, 2024
4424353
empty commit to trigger build
patelila Sep 11, 2024
37b5dda
output elastic search hosts
patelila Sep 12, 2024
dba68ad
ccd-test-definitions: Use version 7.22.3 instead of new version 7.23.0
patelila Sep 12, 2024
9d3b0a9
empty commit to trigger build
patelila Sep 12, 2024
8681009
remove output of elastic search hosts
patelila Sep 12, 2024
adb594b
output detail for resource exception
patelila Sep 12, 2024
7588b71
Solve CheckStyle error
patelila Sep 12, 2024
1f2a96e
add throw resourceNotFoundException;
patelila Sep 12, 2024
38268d6
add throw resourceNotFoundException;
patelila Sep 12, 2024
ac64967
empty commit to trigger build
patelila Sep 12, 2024
73958e8
empty commit to trigger build
patelila Sep 12, 2024
dc561a0
ccd-test-def - 7.23.0
patelila Sep 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def branchesToSync = ['demo', 'ithc', 'perftest', 'develop']

// Variables to switch pipeline logic and wiring per type of build

def definitionStoreDevelopPr = "PR-575" // This doesn't change frequently, but when it does, only change this value.
def dataStoreApiDevelopPr = "PR-1260" // This doesn't change frequently, but when it does, only change this value.
def prsToUseAat = "PR-1793,PR-1888" // Set this value to a PR number, or add it as a comma-separated value, if it's to follow CI/CD.
def definitionStoreDevelopPr = "PR-1468" // This doesn't change frequently, but when it does, only change this value.
def dataStoreApiDevelopPr = "PR-2462" // This doesn't change frequently, but when it does, only change this value.
def prsToUseAat = "" // Set this value to a PR number, or add it as a comma-separated value, if it's to follow CI/CD.

def secrets = [
'ccd-${env}': [
Expand Down Expand Up @@ -140,6 +140,8 @@ withPipeline(type, product, component) {
}

echo "ES FTA Enabled = ${env.ELASTIC_SEARCH_FTA_ENABLED} on branch ${env.BRANCH_NAME}"
echo "env.DEFINITION_STORE_URL_BASE = ${env.DEFINITION_STORE_URL_BASE}"
echo "env.DATA_STORE_DB_HOST = ${env.DATA_STORE_DB_HOST}"

syncBranchesWithMaster(branchesToSync)
overrideVaultEnvironments(vaultOverrides)
Expand All @@ -158,6 +160,10 @@ withPipeline(type, product, component) {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/BEFTA Report for Smoke Tests/**/*'
}

before('smoketest:aat') {
env.DEFINITION_STORE_URL_BASE = "https://ccd-definition-store-api-staging.aat.platform.hmcts.net"
}

afterAlways('smoketest:aat') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/BEFTA Report for Smoke Tests/**/*'
}
Expand Down
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def versions = [
ext['spring-security.version'] = '5.7.11'
ext['spring-framework.version'] = '5.3.27'
ext['jackson.version'] = '2.16.0'
ext['beftaFwVersion'] = '9.0.2'

configurations {
compileClasspath {
Expand Down Expand Up @@ -337,8 +338,8 @@ dependencies {
implementation 'org.jooq:jool-java-8:0.9.14'
implementation 'com.github.hmcts:ccd-case-document-am-client:1.7.1'

testImplementation group: 'com.github.hmcts', name: 'ccd-test-definitions', version: '7.22.3'
testImplementation group: 'com.github.hmcts', name: 'befta-fw', version: '9.0.2'
testImplementation group: 'com.github.hmcts', name: 'ccd-test-definitions', version: '7.23.0'
testImplementation group: 'com.github.hmcts', name: 'befta-fw', version: beftaFwVersion

contractTestImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}"
contractTestImplementation "org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}"
Expand Down
4 changes: 3 additions & 1 deletion charts/ccd-data-store-api/values.preview.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ java:
DATA_STORE_DB_PASSWORD: "{{ .Values.postgresql.auth.password}}"
DATA_STORE_DB_OPTIONS: "?stringtype=unspecified"
DATA_STORE_DB_MAX_POOL_SIZE: 10
DEFINITION_STORE_HOST: http://ccd-definition-store-api-pr-575-java/
DEFINITION_STORE_HOST: http://ccd-definition-store-api-pr-1468-java/
USER_PROFILE_HOST: http://ccd-user-profile-api-pr-399-java/
ELASTIC_SEARCH_ENABLED: true # enable whenever ES required on a particular PR
ELASTIC_SEARCH_NODES_DISCOVERY_ENABLED: true
Expand All @@ -38,6 +38,8 @@ java:
LOGGING_LEVEL_UK_GOV_HMCTS_CCD_SECURITY_IDAM: DEBUG
LOG_CALLBACK_DETAILS:
DEFAULT_CACHE_TTL_SEC: 1
DATA_STORE_DEFAULT_LOG_LEVEL: DEBUG

postgresql:
enabled: true

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.hmcts.ccd.data.documentdata;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.AllArgsConstructor;
import lombok.Data;
Expand All @@ -9,7 +9,7 @@
@NoArgsConstructor
@AllArgsConstructor
@Data
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class DocumentDataRequest {

String attributePath;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package uk.gov.hmcts.ccd.domain.model.casefileview;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Value;

import java.util.List;

@Value
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class CategoriesAndDocuments {
Integer caseVersion;
List<Category> categories;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package uk.gov.hmcts.ccd.domain.model.casefileview;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Value;

import java.util.List;

@Value
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class Category {
String categoryId;
String categoryName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package uk.gov.hmcts.ccd.domain.model.casefileview;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.annotations.ApiModel;
import lombok.Value;

import java.time.LocalDateTime;

@Value
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
@ApiModel(value = "Document definition")
public class Document {
String documentURL;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.hmcts.ccd.domain.model.refdata;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Builder;
import lombok.Value;
Expand All @@ -12,7 +12,7 @@
@Value
@Builder
@Jacksonized
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class BuildingLocation implements Serializable {
String buildingLocationId;
String buildingLocationName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.hmcts.ccd.domain.model.refdata;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Builder;
import lombok.Value;
Expand All @@ -9,10 +9,11 @@
import java.io.Serializable;
import java.time.LocalDate;


@Value
@Builder
@Jacksonized
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class CourtVenue implements Serializable {
String courtVenueId;
String epimmsId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package uk.gov.hmcts.ccd.domain.model.refdata;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Builder;
import lombok.Value;
Expand All @@ -13,7 +13,7 @@
@Value
@Builder
@Jacksonized
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class ServiceReferenceData implements Serializable {
long serviceId;
String orgUnit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,22 @@ private void verifyRequiredAccessExistsForCaseType(String eventId,
Set<AccessProfile> accessProfiles) {
if (!accessControlService.canAccessCaseTypeWithCriteria(caseTypeDefinition,
accessProfiles, CAN_READ)) {
throw new ResourceNotFoundException(NO_CASE_TYPE_FOUND);
ResourceNotFoundException resourceNotFoundException = new ResourceNotFoundException(NO_CASE_TYPE_FOUND);
resourceNotFoundException.withDetails("No READ Access");
throw resourceNotFoundException;
}
if (!accessControlService.canAccessCaseTypeWithCriteria(caseTypeDefinition,
accessProfiles, CAN_CREATE)) {
throw new ResourceNotFoundException(NO_CASE_TYPE_FOUND);
ResourceNotFoundException resourceNotFoundException = new ResourceNotFoundException(NO_CASE_TYPE_FOUND);
resourceNotFoundException.withDetails("No Create Access");
throw resourceNotFoundException;
}
if (!accessControlService.canAccessCaseEventWithCriteria(eventId,
caseTypeDefinition.getEvents(),
accessProfiles, CAN_CREATE)) {
throw new ResourceNotFoundException(NO_EVENT_FOUND);
ResourceNotFoundException resourceNotFoundException = new ResourceNotFoundException(NO_EVENT_FOUND);
resourceNotFoundException.withDetails("No Create Access");
throw resourceNotFoundException;
}
}

Expand All @@ -185,12 +191,16 @@ private void verifyMandatoryAccessForCase(String eventId, CaseDetails caseDetail
if (!accessControlService.canAccessCaseTypeWithCriteria(caseTypeDefinition,
accessProfiles,
CAN_READ)) {
throw new ResourceNotFoundException(NO_CASE_TYPE_FOUND);
ResourceNotFoundException resourceNotFoundException = new ResourceNotFoundException(NO_CASE_TYPE_FOUND);
resourceNotFoundException.withDetails("No READ Access");
throw resourceNotFoundException;
}
if (!accessControlService.canAccessCaseTypeWithCriteria(caseTypeDefinition,
accessProfiles,
CAN_UPDATE)) {
throw new ResourceNotFoundException(NO_CASE_TYPE_FOUND);
ResourceNotFoundException resourceNotFoundException = new ResourceNotFoundException(NO_CASE_TYPE_FOUND);
resourceNotFoundException.withDetails("No Update Access");
throw resourceNotFoundException;
}
if (!accessControlService.canAccessCaseEventWithCriteria(eventId,
caseTypeDefinition.getEvents(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import uk.gov.hmcts.ccd.data.casedetails.SecurityClassification;

import java.time.LocalDateTime;
import java.util.Map;

@JsonIgnoreProperties(ignoreUnknown = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class ElasticSearchCaseDetailsDTO {

private String id;
Expand Down