Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .github/workflows/build-gradle-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
jobs:
build-gradle-project:
env:
IMAGE_TAG: 4.1

IMAGE_TAG: 4.2
runs-on: ubuntu-latest
steps:
- name: Get branch names
Expand Down
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
21.0.4
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
}

group='kingstonduo'
version='4.1'
version='4.2'


apply plugin: 'java'
Expand Down
13 changes: 12 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Changelog

## Release 4.1 [unreleased]
## Release 4.2 [unreleased]
Brief summary of what's in this release:
Removed the calls to Notification Service and the configuration to talk to it since we are no longer sending success emails

### Breaking changes

Breaking changes include any database updates needed, if we need to edit any files on system (like .env or certs, etc). Things that are outside of the code itself that need changed for the system to work.


---

## Release 4.1 [Released 10/16/2024]
Brief summary of what's in this release:
- Upgrade to Java 21

Expand Down
27 changes: 0 additions & 27 deletions src/main/java/org/kpmp/stateManager/NotificationHandler.java

This file was deleted.

6 changes: 1 addition & 5 deletions src/main/java/org/kpmp/stateManager/StateService.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,17 @@ public class StateService {
private String uploadFailedState;
@Value("${package.state.upload.succeeded}")
private String uploadSucceededState;
private NotificationHandler notificationHandler;
private StateDisplayRepository stateDisplayRepo;

@Autowired
public StateService(CustomStateRepository stateRepository, NotificationHandler notificationHandler,
StateDisplayRepository stateDisplayRepo) {
public StateService(CustomStateRepository stateRepository, StateDisplayRepository stateDisplayRepo) {
this.stateRepository = stateRepository;
this.notificationHandler = notificationHandler;
this.stateDisplayRepo = stateDisplayRepo;
}

@CacheEvict(value = "states", allEntries = true)
public String setState(State state, String origin) {
State savedState = stateRepository.save(state);
notificationHandler.sendNotification(state.getPackageId(), state.getState(), origin, state.getCodicil());
return savedState.getId();
}

Expand Down
3 changes: 0 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ spring.main.banner-mode=off
state.service.host=http://localhost:3060
state.service.endpoint=/v1/state/host

notification.service.host=http://eridanus-spring:3040
notification.endpoint=/v2/notifications/package

data-manager.service.host=http://data-manager-service:5000
data-manager.service.endpoint=/v1/dlu

Expand Down
58 changes: 0 additions & 58 deletions src/test/java/org/kpmp/stateManager/NotificationHandlerTest.java

This file was deleted.

5 changes: 1 addition & 4 deletions src/test/java/org/kpmp/stateManager/StateServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ public class StateServiceTest {
private CustomStateRepository stateRepository;
private StateService service;
@Mock
private NotificationHandler notificationHandler;
@Mock
private StateDisplayRepository stateDisplayRepo;

@BeforeEach
public void setUp() throws Exception {
MockitoAnnotations.openMocks(this);
service = new StateService(stateRepository, notificationHandler, stateDisplayRepo);
service = new StateService(stateRepository, stateDisplayRepo);
ReflectionTestUtils.setField(service, "uploadFailedState", "UPLOAD_FAILED");
ReflectionTestUtils.setField(service, "uploadSucceededState", "UPLOAD_SUCCEEDED");
}
Expand All @@ -56,7 +54,6 @@ public void testSetState() {

assertEquals("id", stateId);
verify(stateRepository).save(state);
verify(notificationHandler).sendNotification("packageId", "state", "origin", "codicil");
}

@Test
Expand Down
Loading