From 42cdb6a5bd0c10990811d908c2dc80c3578b5995 Mon Sep 17 00:00:00 2001 From: Iain Sproat <68657+iainsproat@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:43:27 +0000 Subject: [PATCH] fix(file import): handle undefined branch id - undefined branch id replaced with empty string to ensure new branch is created --- packages/fileimport-service/ifc/import_file.js | 4 ++-- packages/fileimport-service/src/daemon.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/fileimport-service/ifc/import_file.js b/packages/fileimport-service/ifc/import_file.js index 1c6e4eb6d4..5eab2cf1c0 100644 --- a/packages/fileimport-service/ifc/import_file.js +++ b/packages/fileimport-service/ifc/import_file.js @@ -20,11 +20,11 @@ async function main() { regionName ] = cmdArgs const logger = Observability.extendLoggerComponent( - parentLogger.child({ streamId, branchName, userId, fileId, filePath }), + parentLogger.child({ streamId, branchName, userId, fileId, branchId, filePath }), 'ifc' ) - logger.info('ARGV: ', filePath, userId, streamId, branchName, branchId, commitMessage) + logger.info({ commitMessage }, 'IFC parser started.') const data = fs.readFileSync(filePath) diff --git a/packages/fileimport-service/src/daemon.js b/packages/fileimport-service/src/daemon.js index bd8f4e1664..514d27947b 100644 --- a/packages/fileimport-service/src/daemon.js +++ b/packages/fileimport-service/src/daemon.js @@ -140,7 +140,7 @@ async function doTask(mainDb, regionName, taskDb, task) { info.branchName, `File upload: ${info.fileName}`, info.id, - existingBranch?.id, + existingBranch?.id || '', regionName ], { @@ -161,7 +161,7 @@ async function doTask(mainDb, regionName, taskDb, task) { info.branchName, `File upload: ${info.fileName}`, info.id, - existingBranch?.id, + existingBranch?.id || '', regionName ], { @@ -190,7 +190,7 @@ async function doTask(mainDb, regionName, taskDb, task) { info.branchName, `File upload: ${info.fileName}`, info.id, - existingBranch?.id, + existingBranch?.id || '', regionName ], {