Follow-up
runContentMigration (lib/utils/runContentMigration.js) currently works around adaptlearning/adapt-migrations#65, where migrate() swallows failed migration steps (logs + rolls back, but resolves successfully without throwing). Because no error is thrown, the existing try/catch in migrateCourseData (import) and migrateExistingCourses (framework update) never fired, so a failed content migration was silently treated as a successful import.
As a stopgap, runContentMigration wraps the adapt-migrations logger with createErrorCapturingLogger and throws if any error-level logs are emitted during migrate().
Once migrate() propagates the error itself (throws / returns an error state), revert the workaround back to standard try/catch:
References
Follow-up
runContentMigration(lib/utils/runContentMigration.js) currently works around adaptlearning/adapt-migrations#65, wheremigrate()swallows failed migration steps (logs + rolls back, but resolves successfully without throwing). Because no error is thrown, the existingtry/catchinmigrateCourseData(import) andmigrateExistingCourses(framework update) never fired, so a failed content migration was silently treated as a successful import.As a stopgap,
runContentMigrationwraps the adapt-migrations logger withcreateErrorCapturingLoggerand throws if any error-level logs are emitted duringmigrate().Action when adaptlearning/adapt-migrations#65 is merged & released
Once
migrate()propagates the error itself (throws / returns an error state), revert the workaround back to standardtry/catch:adapt-migrationsdependency to the version that propagates migration errorslib/utils/runContentMigration.js, remove thecreateErrorCapturingLoggerwrapper and the post-migrate()error check; restore plainawait migrate({ journal, logger })lib/utils/createErrorCapturingLogger.js, its barrel export inlib/utils.js, andtests/utils-createErrorCapturingLogger.spec.jstests/utils-runContentMigration.spec.js(the existingtry/catchin the callers will once again surface the thrown error)migrateCourseDatastill raisesFW_IMPORT_MIGRATION_FAILEDon a failing migrationReferences