Skip to content

Commit

Permalink
catalog-backend: start warning about usage of deprecated location types
Browse files Browse the repository at this point in the history
  • Loading branch information
Rugvip committed Dec 21, 2020
1 parent d7bb7bf commit 5de26b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/shaggy-candles-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---

Start warning about usage of deprecated location types, such as `github`
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export class UrlReaderProcessor implements CatalogProcessor {
emit: CatalogProcessorEmit,
): Promise<boolean> {
if (deprecatedTypes.includes(location.type)) {
// TODO(Rugvip): Let's not enable this warning yet, as we want to move over the example YAMLs
// in this repo to use the 'url' type first.
// this.options.logger.warn(
// `Using deprecated location type '${location.type}' for '${location.target}', use 'url' instead`,
// );
// TODO(Rugvip): Remove this warning a month or two into 2021, and remove support for the deprecated types.
this.options.logger.warn(
`Location '${location.target}' uses deprecated location type '${location.type}', use 'url' instead. ` +
'Use "scripts/migrate-location-types.js" in the Backstage repo to migrate existing locations.',
);
} else if (location.type !== 'url') {
return false;
}
Expand Down

0 comments on commit 5de26b9

Please sign in to comment.