Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,16 @@ protected void setDefaultStatus(T entity, boolean update) {
public final void initSeedDataFromResources() throws IOException {
List<T> entities = getEntitiesFromSeedData();
for (T entity : entities) {
initializeEntity(entity);
try {
initializeEntity(entity);
} catch (Exception e) {
LOG.warn(
"Failed to initialize {} '{}': {}",
entityType,
entity.getFullyQualifiedName(),
e.getMessage(),
e);
}
Comment thread
yan-3005 marked this conversation as resolved.
}
Comment on lines 1228 to 1241
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initSeedDataFromResources now swallows exceptions from initializeEntity and continues. This is a behavioral change that can impact startup/seed correctness, but there’s no unit test asserting that the loop continues (and that subsequent entities are still initialized) when one seed fails. Consider adding a focused test using a spy/stub repository to throw on the first initializeEntity call and verify later entities are still processed (and/or that the failure is logged with the entity FQN).

Copilot uses AI. Check for mistakes.
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ private boolean hasCycleDFS(
List<String> neighbors = adjacencyList.get(node);
if (neighbors != null) {
for (String neighbor : neighbors) {
if (neighbor.equals(node)) {
continue;
}
if (hasCycleDFS(neighbor, adjacencyList, visited, recursionStack)) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package org.openmetadata.service.migration.mysql.v200;

import static org.openmetadata.service.jdbi3.locator.ConnectionType.MYSQL;
import static org.openmetadata.service.migration.utils.v200.MigrationUtil.addTableColumnSearchSettings;
import static org.openmetadata.service.migration.utils.v200.MigrationUtil.backfillAnnouncementRelationships;
import static org.openmetadata.service.migration.utils.v200.MigrationUtil.migrateLegacyActivityThreadsToActivityStream;
import static org.openmetadata.service.migration.utils.v200.MigrationUtil.migrateSuggestionsToTaskEntity;
import static org.openmetadata.service.migration.utils.v200.MigrationUtil.migrateThreadTasksToTaskEntity;

import lombok.SneakyThrows;
import org.openmetadata.service.migration.api.MigrationProcessImpl;
Expand All @@ -19,11 +21,9 @@ public Migration(MigrationFile migrationFile) {
@SneakyThrows
public void runDataMigration() {
addTableColumnSearchSettings();
migrateSuggestionsToTaskEntity(handle);
// Causing issues with collate CI, needs to be fixed before enabling this migration
// @harshach
// migrateThreadTasksToTaskEntity(handle);
migrateLegacyActivityThreadsToActivityStream(handle);
migrateSuggestionsToTaskEntity(handle, MYSQL);
migrateThreadTasksToTaskEntity(handle, MYSQL);
migrateLegacyActivityThreadsToActivityStream(handle, MYSQL);
backfillAnnouncementRelationships(handle);
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package org.openmetadata.service.migration.postgres.v200;

import static org.openmetadata.service.jdbi3.locator.ConnectionType.POSTGRES;
import static org.openmetadata.service.migration.utils.v200.MigrationUtil.addTableColumnSearchSettings;
import static org.openmetadata.service.migration.utils.v200.MigrationUtil.backfillAnnouncementRelationships;
import static org.openmetadata.service.migration.utils.v200.MigrationUtil.migrateLegacyActivityThreadsToActivityStream;
import static org.openmetadata.service.migration.utils.v200.MigrationUtil.migrateSuggestionsToTaskEntity;
import static org.openmetadata.service.migration.utils.v200.MigrationUtil.migrateThreadTasksToTaskEntity;

import lombok.SneakyThrows;
import org.openmetadata.service.migration.api.MigrationProcessImpl;
Expand All @@ -19,11 +21,9 @@ public Migration(MigrationFile migrationFile) {
@SneakyThrows
public void runDataMigration() {
addTableColumnSearchSettings();
migrateSuggestionsToTaskEntity(handle);
// Causing issues with collate CI, needs to be fixed before enabling this migration
// @harshach
// migrateThreadTasksToTaskEntity(handle);
migrateLegacyActivityThreadsToActivityStream(handle);
migrateSuggestionsToTaskEntity(handle, POSTGRES);
migrateThreadTasksToTaskEntity(handle, POSTGRES);
migrateLegacyActivityThreadsToActivityStream(handle, POSTGRES);
backfillAnnouncementRelationships(handle);
}
}
Loading
Loading