Removed code that catches error and formatted changeset markdown

Signed-off-by: Niall Thomson <thomson.niall@gmail.com>
This commit is contained in:
Niall Thomson
2024-06-11 22:19:44 -04:00
parent 90a7340efd
commit 2b8b4f115a
2 changed files with 17 additions and 21 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
'@backstage/plugin-catalog-backend-module-aws': patch
---
AwsOrganizationCloudAccountProcessor configuration field roleArn is deprecated in favor of new field accountId
`AwsOrganizationCloudAccountProcessor` configuration field `roleArn` is deprecated in favor of new field `accountId`
@@ -106,27 +106,23 @@ export class AwsOrganizationCloudAccountProcessor implements CatalogProcessor {
this.logger?.info('Discovering AWS Organization Account objects');
try {
(await this.getAwsAccounts())
.map(account => this.mapAccountToComponent(account))
.filter(entity => {
if (location.target !== '') {
if (entity.metadata.annotations) {
return (
entity.metadata.annotations[ORGANIZATION_ANNOTATION] ===
location.target
);
}
return false;
(await this.getAwsAccounts())
.map(account => this.mapAccountToComponent(account))
.filter(entity => {
if (location.target !== '') {
if (entity.metadata.annotations) {
return (
entity.metadata.annotations[ORGANIZATION_ANNOTATION] ===
location.target
);
}
return true;
})
.forEach(entity => {
emit(processingResult.entity(location, entity));
});
} catch (e) {
this.logger?.error(e);
}
return false;
}
return true;
})
.forEach(entity => {
emit(processingResult.entity(location, entity));
});
return true;
}