Skip to content

Commit c15e36a

Browse files
committed
follow review hints
1 parent 594b071 commit c15e36a

File tree

7 files changed

+5
-24
lines changed

7 files changed

+5
-24
lines changed

data-migrator/core/src/main/java/io/camunda/migration/data/impl/clients/DbClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ public void listSkippedEntitiesByType(TYPE type) {
177177
* skipped entities, even when some are migrated (removed from skipped list) during processing.
178178
*
179179
* @param type the entity type to process
180-
* @param callback function that processes an entity and returns true if migrated, false if skipped
180+
* @param callback function that processes a skipped entity and returns {@code null} if it was
181+
* successfully migrated, or an {@link EntitySkippedException} if the entity remains skipped
182+
* @return a list of {@link EntitySkippedException}s for all entities that could not be migrated
181183
*/
182184
public List<EntitySkippedException> fetchAndHandleSkippedForType(TYPE type, Function<IdKeyDbModel, EntitySkippedException> callback) {
183185
int pageSize = properties.getPageSize();

data-migrator/core/src/main/java/io/camunda/migration/data/impl/logging/VariableServiceLogs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class VariableServiceLogs {
3838
public static final String JSON_DESERIALIZATION_ERROR = "Error while deserializing JSON into Map type.";
3939

4040
/**
41-
* Logs a warning message for variable interceptor failure.
41+
* Logs a debug message for variable interceptor failure.
4242
*
4343
* @param interceptorName the name of the failed interceptor
4444
* @param variableName the name of the variable being processed

data-migrator/distro/src/main/java/io/camunda/migration/data/app/MigratorApp.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,7 @@ public static void migrateHistory(ConfigurableApplicationContext context, Applic
219219
// Extract entity type filters if --list-skipped is used
220220
if (mode == MigratorMode.LIST_SKIPPED) {
221221
List<IdKeyMapper.TYPE> entityTypeFilters = extractEntityTypeFilters(appArgs);
222-
if (!entityTypeFilters.isEmpty()) {
223-
historyMigrator.printSkippedHistoryEntities(entityTypeFilters);
224-
}
222+
historyMigrator.printSkippedHistoryEntities(entityTypeFilters);
225223
} else if (mode == MigratorMode.RETRY_SKIPPED) {
226224
historyMigrator.retry();
227225

data-migrator/qa/integration-tests/src/test/java/io/camunda/migration/data/qa/history/entity/HistoryFlowNodeTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ public void shouldSetFlowNodeScopeKeyForFlowNodeInSubprocess() {
136136
// the flow node of start event ("start_insideSub") in subprocess can be processed before its parent flow node ("subprocess"),
137137
// causing the "start_insideSub" to be skipped
138138
historyMigrator.migrate();
139-
// retry the skipped ones to ensure all flow nodes are migrated
140-
historyMigrator.retry();
141-
historyMigrator.migrate();
142139

143140
// then
144141
List<ProcessInstanceEntity> processInstances = searchHistoricProcessInstances("subProcess");
@@ -182,9 +179,6 @@ public void shouldSetFlowNodeScopeKeyForFlowNodeInCalledProcess() {
182179

183180
// when
184181
historyMigrator.migrate();
185-
// need to run with retry to migrate child instances with flow node dependencies
186-
historyMigrator.retry();
187-
historyMigrator.migrate();
188182

189183
// then
190184
List<ProcessInstanceEntity> parentProcessInstances = searchHistoricProcessInstances("callingProcessId");

data-migrator/qa/integration-tests/src/test/java/io/camunda/migration/data/qa/history/entity/HistoryIncidentTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,6 @@ public void shouldMigrateIncidentForNestedProcessInstance() {
108108

109109
// when
110110
historyMigrator.migrate();
111-
// need to run with retry to migrate child instances with flow node dependencies
112-
historyMigrator.retry();
113-
historyMigrator.migrate();
114111

115112
// then
116113

data-migrator/qa/integration-tests/src/test/java/io/camunda/migration/data/qa/history/entity/HistoryProcessInstanceTest.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ public void shouldMigrateCallActivityAndSubprocess() {
107107

108108
// when
109109
historyMigrator.migrate();
110-
// need to run with retry to migrate child instances with flow node dependencies
111-
historyMigrator.retry();
112-
historyMigrator.migrate();
113110

114111
// then
115112
List<ProcessInstanceEntity> parentProcessInstance = searchHistoricProcessInstances("callingProcessId");
@@ -185,9 +182,6 @@ public void shouldPopulateRootProcessInstanceKeyForCallActivity() {
185182

186183
// when
187184
historyMigrator.migrate();
188-
// need to run with retry to migrate child instances with flow node dependencies
189-
historyMigrator.retry();
190-
historyMigrator.migrate();
191185

192186
// then
193187
List<ProcessInstanceEntity> parentProcessInstances = searchHistoricProcessInstances("callingProcessId");
@@ -240,9 +234,6 @@ public void shouldPopulateParentFlowNodeInstanceKeyForCallActivity() {
240234

241235
// when
242236
historyMigrator.migrate();
243-
// need to run with retry to migrate child instances with flow node dependencies
244-
historyMigrator.retry();
245-
historyMigrator.migrate();
246237

247238
// then
248239
List<ProcessInstanceEntity> parentProcessInstances = searchHistoricProcessInstances("callingProcessId");

data-migrator/qa/integration-tests/src/test/java/io/camunda/migration/data/qa/runtime/SkipAndRetryProcessInstancesTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import io.camunda.search.entities.ProcessInstanceEntity;
2525
import io.camunda.search.query.ProcessInstanceQuery;
2626
import io.github.netmikey.logunit.api.LogCapturer;
27-
import io.netty.handler.logging.LogLevel;
2827
import java.util.ArrayList;
2928
import java.util.List;
3029
import java.util.regex.Matcher;

0 commit comments

Comments
 (0)