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

SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi… #4056

Merged
merged 22 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d4e927e
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 14, 2024
94454e8
Merge branch 'master' into SSCSSI-404-hearing-api-merge-with-enable-flag
srochani Oct 14, 2024
2bfa290
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 14, 2024
851fff5
Merge remote-tracking branch 'origin/SSCSSI-404-hearing-api-merge-wit…
srochani Oct 14, 2024
3a85c61
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 14, 2024
c9c58fe
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 14, 2024
646785a
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 14, 2024
9b55561
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 15, 2024
dc6e8e3
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 15, 2024
bca7871
Merge branch 'master' into SSCSSI-404-hearing-api-merge-with-enable-flag
srochani Oct 15, 2024
20f09ad
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 15, 2024
6bcb9c0
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 15, 2024
6ba5c90
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 15, 2024
2412447
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 15, 2024
ed52d35
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 15, 2024
0038817
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 16, 2024
58eadc4
Merge branch 'master' into SSCSSI-404-hearing-api-merge-with-enable-flag
srochani Oct 16, 2024
10213f2
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 16, 2024
ad4dc95
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 16, 2024
caea8c2
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 16, 2024
49fda28
SSCSSI-404: merge sscs-hearings-api into sscs-tribunals-case-api - wi…
srochani Oct 17, 2024
6458446
Merge branch 'master' into SSCSSI-404-hearing-api-merge-with-enable-flag
srochani Oct 21, 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
8 changes: 8 additions & 0 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ def secrets = [
secret('tya-link', 'SSCS_TRACK_YOUR_APPEAL_LINK'),
secret('evidence-share-topic-shared-access-key', 'AMQP_PASSWORD'),

// hearing-api
secret('idam-s2s-api', 'IDAM_S2S_URL'),
secret('caseworker-ref-api', 'CASEWORKER_REF_API_URL'),
secret('ccd-api', 'CORE_CASE_DATA_API_URL'),
secret('judicial-ref-api', 'JUDICIAL_REF_API_URL'),
secret('s2s-micro', 'IDAM_S2S_AUTH_MICROSERVICES'),
secret('common-ref-data-api', 'COMMON_REF_API_URL'),

// e2es
secret('test-e2e-caseofficer-username', 'TEST_CASEOFFICER_USERNAME'),
secret('test-e2e-caseofficer-password', 'TEST_CASEOFFICER_PASSWORD'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ java:
SUBSCRIPTION_NAME: "${SERVICE_NAME}-servicebus-main-topic"
AMQP_HOST: "sscs-sb-preview.servicebus.windows.net"
AMQP_USERNAME: "RootManageSharedAccessKey"
HEARINGS_EVENT_QUEUE_NAME: ${SERVICE_NAME}-servicebus-tribunals-to-hearing-api
HEARINGS_EVENT_QUEUE_NAME: "${SERVICE_NAME}-servicebus-tribunals-to-hearing-api"
ROBOTICS_EMAIL_FROM: "sscs@hmcts.net"
ROBOTICS_EMAIL_TO: "fake"
ROBOTICS_EMAIL_SCOTTISH_TO: "fake2"
Expand All @@ -67,6 +67,26 @@ java:
HOURS_END_TIME: 23
RUN_DB_MIGRATION_ON_STARTUP: true
TEST_RECIPIENTS_POSTCODE: "*"
HMC_HEARINGS_LISTENING_ENABLED: true
TRIBUNALS_HEARINGS_LISTENING_ENABLED: true
EXUI_API_URL: "https://${SERVICE_NAME}-xui"
IDAM_S2S_URL: "http://rpe-service-auth-provider-aat.service.core-compute-aat.internal"
CASEWORKER_REF_API_URL: "http://rd-caseworker-ref-api-aat.service.core-compute-aat.internal"
COMMON_REF_API_URL: "http://rd-commondata-api-aat.service.core-compute-aat.internal"
JUDICIAL_REF_API_URL: "http://rd-judicial-api-aat.service.core-compute-aat.internal"
HMC_API_URL: "http://hmc-cft-hearing-service-aat.service.core-compute-aat.internal"
#Messaging
HMC_HEARINGS_TOPIC_NAME: "hmc-to-cft-aat"
HMC_HEARINGS_TOPIC_SUBSCRIPTION_NAME: "hmc-to-sscs-subscription-pr-4056"
TRIBUNALS_EVENT_QUEUE_NAME: "${SERVICE_NAME}-servicebus-tribunals-to-hearing-api"
TRIBUNALS_EVENT_QUEUE_POLICY_NAME: "RootManageSharedAccessKey"
TRIBUNALS_EVENT_QUEUE_NAMESPACE: "sscs-sb-preview"
HMC_HEARINGS_TOPIC_NAMESPACE: "hmc-servicebus-aat"
HMC_DEPLOYMENT_ID: "deployment-${SERVICE_NAME}"
HMC_DEPLOYMENT_FILTER_ENABLED: true
HEARINGS_CASE_UPDATE_V2_ENABLED: true
ADJOURNMENT_ENABLED: true
BYPASS_HEARING_API_SERVICE: true
secrets:
JOB_SCHEDULER_DB_PASSWORD:
secretRef: postgres
Expand All @@ -77,6 +97,9 @@ java:
AMQP_PASSWORD:
secretRef: sscs-sb-preview
key: primaryKey
TRIBUNALS_EVENT_QUEUE_ACCESS_KEY:
secretRef: sscs-sb-preview
key: primaryKey
postgresql:
enabled: false

Expand Down
8 changes: 5 additions & 3 deletions charts/sscs-tribunals-api/values.preview.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ java:
CITIZEN_LOGIN_SERVICE_V2: true
ADD_LINK_TO_OTHER_ASSOCIATED_CASES_V2: true
BYPASS_NOTIFICATIONS_SERVICE: true
BYPASS_HEARING_API_SERVICE: true
HANDLE_CCD_CALLBACKMAP_V2: true
TESTING_SUPPORT_ENABLED: true
TOPIC_NAME: "${SERVICE_NAME}-servicebus-main-topic"
Expand Down Expand Up @@ -148,7 +149,7 @@ xui-webapp:
SERVICES_IDAM_API_URL: https://idam-api.aat.platform.hmcts.net
SERVICES_S2S: http://rpe-service-auth-provider-aat.service.core-compute-aat.internal
SERVICES_HEARINGS_COMPONENT_API: http://jurisdiction-hearings-api-aat.service.core-compute-aat.internal
SERVICES_HEARINGS_COMPONENT_API_SSCS: http://${SERVICE_NAME}-sscs-hearings-api
SERVICES_HEARINGS_COMPONENT_API_SSCS: http://${SERVICE_NAME}-java
SomeshRA marked this conversation as resolved.
Show resolved Hide resolved
SERVICES_PRD_LOCATION_API: http://rd-location-ref-api-aat.service.core-compute-aat.internal
SERVICES_PRD_JUDICIAL_API: http://rd-judicial-api-aat.service.core-compute-aat.internal
SERVICES_PRD_COMMONDATA_API: http://rd-commondata-api-aat.service.core-compute-aat.internal
Expand Down Expand Up @@ -584,7 +585,7 @@ redis:
sscs-hearings-api:
enabled: true
java:
image: "hmctspublic.azurecr.io/sscs/hearings-api:latest" #Change to pr if required
image: "hmctspublic.azurecr.io/sscs/hearings-api:pr-646" #Change to pr if required
releaseNameOverride: ${SERVICE_NAME}-sscs-hearings-api
ingressHost: hearings-${SERVICE_FQDN}
environment:
Expand All @@ -604,7 +605,7 @@ sscs-hearings-api:
#Messaging
HMC_HEARINGS_LISTENING_ENABLED: true
HMC_HEARINGS_TOPIC_NAME: "hmc-to-cft-aat"
HMC_HEARINGS_TOPIC_SUBSCRIPTION_NAME: "hmc-to-sscs-subscription-pr-3973"
HMC_HEARINGS_TOPIC_SUBSCRIPTION_NAME: "hmc-to-sscs-subscription-pr-4056"
TRIBUNALS_HEARINGS_LISTENING_ENABLED: true
TRIBUNALS_EVENT_QUEUE_NAME: ${SERVICE_NAME}-servicebus-tribunals-to-hearing-api
TRIBUNALS_EVENT_QUEUE_POLICY_NAME: RootManageSharedAccessKey
Expand All @@ -615,6 +616,7 @@ sscs-hearings-api:
CORE_CASE_DATA_CASE_TYPE_ID: Benefit-${CHANGE_ID}
HEARINGS_CASE_UPDATE_V2_ENABLED: true
ADJOURNMENT_ENABLED: true
BYPASS_HEARING_API_SERVICE: true
secrets:
TRIBUNALS_EVENT_QUEUE_ACCESS_KEY:
secretRef: sscs-sb-preview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import java.util.List;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand All @@ -31,7 +30,6 @@
@SpringBootTest
@AutoConfigureMockMvc(addFilters = false)
@ActiveProfiles("integration")
@Disabled("Please remove this line when Hearing api bypass feature flag is true")
class ServiceHearingsControllerTest {

private static final long CASE_ID = 1625080769409918L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ public class HearingsJmsConfig {
@Value("${azure.service-bus.hmc-to-hearings-api.idleTimeout}")
private Long idleTimeout;

@Bean
@ConditionalOnProperty({"feature.bypass-hearing-api-service.enabled", "flags.hmc-to-hearings-api.enabled"})
public ConnectionFactory hmcHearingJmsConnectionFactory(@Value("${spring.application.name}") final String clientId) {
@Value("${spring.application.name}")
private String clientId;

private ConnectionFactory hmcHearingJmsConnectionFactory() {
String connection = String.format(AMQP_CONNECTION_STRING_TEMPLATE, namespace + connectionPostfix, idleTimeout);
JmsConnectionFactory jmsConnectionFactory = new JmsConnectionFactory(connection);
jmsConnectionFactory.setUsername(username);
jmsConnectionFactory.setPassword(password);
jmsConnectionFactory.setClientID(clientId);

return new CachingConnectionFactory(jmsConnectionFactory);
}

@Bean
@ConditionalOnProperty({"feature.bypass-hearing-api-service.enabled", "flags.hmc-to-hearings-api.enabled"})
public JmsListenerContainerFactory<DefaultMessageListenerContainer> hmcHearingsEventTopicContainerFactory(
ConnectionFactory hmcHearingJmsConnectionFactory,
DefaultJmsListenerContainerFactoryConfigurer configurer) {
ConnectionFactory hmcHearingJmsConnectionFactory = hmcHearingJmsConnectionFactory();
DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
factory.setConnectionFactory(hmcHearingJmsConnectionFactory);
factory.setReceiveTimeout(receiveTimeout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ public class TribunalsHearingsJmsConfig {
@Value("${azure.service-bus.amqp-connection-string-template:amqps://%1s?amqp.idleTimeout=%2d}")
public String amqpConnectionStringTemplate;

@Bean
public ConnectionFactory tribunalsHearingsJmsConnectionFactory(@Value("${spring.application.name}") final String clientId) {
@Value("${spring.application.name}")
private String clientId;

private ConnectionFactory tribunalsHearingsJmsConnectionFactory() {
String connection = String.format(amqpConnectionStringTemplate, namespace + connectionPostfix, idleTimeout);
JmsConnectionFactory jmsConnectionFactory = new JmsConnectionFactory(connection);
jmsConnectionFactory.setUsername(username);
Expand All @@ -53,8 +55,8 @@ public ConnectionFactory tribunalsHearingsJmsConnectionFactory(@Value("${spring.

@Bean
public JmsListenerContainerFactory<DefaultMessageListenerContainer> tribunalsHearingsEventQueueContainerFactory(
ConnectionFactory tribunalsHearingsJmsConnectionFactory,
DefaultJmsListenerContainerFactoryConfigurer defaultJmsListenerContainerFactoryConfigurer) {
ConnectionFactory tribunalsHearingsJmsConnectionFactory = tribunalsHearingsJmsConnectionFactory();
DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
factory.setConnectionFactory(tribunalsHearingsJmsConnectionFactory);
factory.setReceiveTimeout(receiveTimeout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public HmcHearingsEventTopicListener(@Value("${sscs.serviceCode}") String sscsSe
)
public void onMessage(JmsBytesMessage message) throws JMSException, HmcEventProcessingException {

if (!isByPassHearingServiceEnabled && isDeploymentFilterEnabled && !isMessageReleventForDeployment(message)) {
log.info("isByPassHearingServiceEnabled && isDeploymentFilterEnabled ------------------------> {}, {}", isByPassHearingServiceEnabled,
isDeploymentFilterEnabled);
if (isDeploymentFilterEnabled && !isMessageReleventForDeployment(message)) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class TribunalsHearingsEventQueueListener {
)
public void handleIncomingMessage(HearingRequest message) throws TribunalsEventProcessingException, GetCaseException, UpdateCaseException {

log.info("isByPassHearingServiceEnabled ------------------------> {}", isByPassHearingServiceEnabled);
if (!isByPassHearingServiceEnabled) {
return;
}
Expand Down
Loading