Skip to content

Commit

Permalink
fix: error if tileset validation fails TDE-586 (#135)
Browse files Browse the repository at this point in the history
Small change to log error if tileset validation fails, so that it is
obvious in the Argo Workflow for TDE-586.
  • Loading branch information
amfage authored Nov 30, 2022
1 parent dbb002b commit 09ca6ea
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/commands/tileset-validate/tileset.validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ export const commandTileSetValidate = command({
// Failed origin

failed++;
logger.warn({ fileName, got: { x: bounds[0], y: bounds[3] }, expected }, 'File:Invalid:Origin');
logger.error({ fileName, got: { x: bounds[0], y: bounds[3] }, expected }, 'File:Invalid:Origin');
} else if (width !== expected?.width || height !== expected.height) {
// Failed on size of tile

failed++;
logger.warn({ fileName, got: { x: bounds[0], y: bounds[3] }, expected }, 'File:Invalid:Size');
logger.error({ fileName, got: { width: width, height: height }, expected }, 'File:Invalid:Size');
}

if (checked % 100 === 0) logger.info({ checked, total, failed, lastFile: fileName }, 'File:Checked');
Expand All @@ -68,5 +68,9 @@ export const commandTileSetValidate = command({
await Q.join();

logger.info({ checked, total, failed }, 'File:Checked');
if (failed > 0) {
logger.error({ failures: failed }, 'TilesetValidate:Done:Failed');
process.exit(1);
}
},
});

0 comments on commit 09ca6ea

Please sign in to comment.