Skip to content

Commit

Permalink
fix: only print warning on failure to resolve table
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilch committed Dec 18, 2024
1 parent 3354eb1 commit 83c3ced
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,12 @@ export class ModelTransformer extends TransformerModelBase implements Transforme
ddbDatasources.forEach(([modelName, datasource]) => {
if (datasource.ds.dynamoDbConfig && !cdk.isResolvableObject(datasource.ds.dynamoDbConfig)) {
dataSourceMapping[modelName] = datasource.ds.dynamoDbConfig.tableName;
} else {
// TODO: probably need a link to docs for this
console.warn(
`Could not resolve table name for ${modelName}. DataSourceMappingOutput is incomplete. Please manually add ${modelName} to the mapping for your migration.`,
);
}
// TODO: probably need a link to docs for this
console.warn(
`Could not resolve table name for ${modelName}. DataSourceMappingOutput is incomplete. Please manually add ${modelName} to the mapping for your migration.`,
);
});
});
if (context.transformParameters.enableGen2Migration && context.transformParameters.enableTransformerCfnOutputs) {
Expand Down

0 comments on commit 83c3ced

Please sign in to comment.