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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.6.1 [TODO]
### Fixed
- Fixed V1 schedules endpoint returning an empty list when V1 schedules have a null `partitionId`.

## 2.6.0 [2026-04-29]
### Fixed
- Prevent missing contextual external or previous files from clearing existing contextual data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;

@Data
@Builder
Expand All @@ -38,9 +39,9 @@ public List<ScheduleResponseDto> toScheduleV1ResponseDtos() {
}

return kraftwerkExecutionScheduleList.stream()
.filter(schedule -> schedule != null && schedule.getPartitionId() != null)
.filter(Objects::nonNull)
.map(schedule -> ScheduleResponseDto.builder()
.collectionInstrumentId(schedule.getPartitionId())
.collectionInstrumentId(collectionInstrumentId)
.lastExecution(lastExecution)
.frequency(schedule.getFrequency())
.scheduleBeginDate(schedule.getScheduleBeginDate())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void toScheduleV1ResponseDtos_null_schedule_ignored_test() {
}

@Test
void toScheduleV1ResponseDtos_no_partitionId_schedule_ignored_test() {
void toScheduleV1ResponseDtos_no_partitionId_schedule_not_ignored_test() {
//GIVEN
String collectionInstrumentId = "test";
String frequency = "0 0 0 0 0 0";
Expand Down Expand Up @@ -231,7 +231,7 @@ void toScheduleV1ResponseDtos_no_partitionId_schedule_ignored_test() {
List<ScheduleResponseDto> scheduleResponseDtoList = dataProcessingContextModel.toScheduleV1ResponseDtos();

//THEN
Assertions.assertThat(scheduleResponseDtoList).hasSize(1);
Assertions.assertThat(scheduleResponseDtoList).hasSize(2);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ void getSchedulesV1_test() {

DataProcessingContextDocument dataProcessingContextDocument = new DataProcessingContextDocument();
dataProcessingContextDocument.setPartitionId(collectionInstrumentId);
dataProcessingContextDocument.setCollectionInstrumentId(collectionInstrumentId);
dataProcessingContextDocument.setKraftwerkExecutionScheduleList(kraftwerkExecutionScheduleList);
when(dataProcessingContextPersistancePort.findAll()).thenReturn(List.of(dataProcessingContextDocument));

Expand Down
Loading