diff --git a/.changeset/lucky-seas-live.md b/.changeset/lucky-seas-live.md new file mode 100644 index 0000000000..bd084f6ebf --- /dev/null +++ b/.changeset/lucky-seas-live.md @@ -0,0 +1,11 @@ +--- +'@backstage/plugin-catalog-backend': minor +--- + +The `UrlReaderProccessor` accepts a new config flag `catalog.useUrlReadersSearch` to always call the `search` method of `UrlReaders`. + +This flag currently defaults to `false`, but adopters are encouraged to enable it as this behavior will be the default in a future release. + +Previous behavior was to call the `search` method only if the parsed Git URL's filename contained a wildcard and use `readUrl` otherwise. `UrlReaderService` must implement this logic in the `search` method instead. + +This allows each `UrlReaderService` implementation to check whether it's a search URL (that contains a wildcard pattern) or not using logic that is specific to each provider. diff --git a/.changeset/tiny-spoons-repeat.md b/.changeset/tiny-spoons-repeat.md index c365875bd9..8b6c2669bd 100644 --- a/.changeset/tiny-spoons-repeat.md +++ b/.changeset/tiny-spoons-repeat.md @@ -1,15 +1,6 @@ --- '@backstage/backend-defaults': patch -'@backstage/plugin-catalog-backend': minor --- -The `UrlReaderProccessor` accepts a new config flag `catalog.useUrlReadersSearch` to always call the `search` method of `UrlReaders`. - -This flag currently defaults to `false`, but adopters are encouraged to enable it as this behavior will be the default in a future release. - -Previous behavior was to call the `search` method only if the parsed Git URL's filename contained a wildcard and use `readUrl` otherwise. `UrlReaderService` must implement this logic in the `search` method instead. - -This allows each `UrlReaderService` implementation to check whether it's a search URL (that contains a wildcard pattern) or not using logic that is specific to each provider. - In the different `UrlReadersService`, the `search` method have been updated to use the `readUrl` if the given URL doesn't contain a pattern. -For `UrlReaders` that didn't implement the `search` method, `readUrl` is now called internally. +For `UrlReaders` that didn't implement the `search` method, `readUrl` is now called internally and throws if the given URL doesn't contain a pattern.