Adjust to review
Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-search-backend-module-techdocs': minor
|
||||
'@backstage/plugin-search-backend-module-techdocs': patch
|
||||
---
|
||||
|
||||
**BREAKING:** Moved `schedule` & `collators` settings from module options into app-config for the new backend system. You can now pass in a `TaskScheduleDefinitionConfig` through the `search.techdocs.schedule` configuration key & configure the `TechDocsCollatorFactory` with the key `search.techdocs.collators`.
|
||||
**BREAKING:** Moved `schedule` & `collators` settings from module options into app-config for the new backend system. You can now pass in a `TaskScheduleDefinitionConfig` through the `search.collators.techdocs.schedule` configuration key & configure the `TechDocsCollatorFactory` with the key `search.collators.techdocs`.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-search-backend-module-explore': minor
|
||||
'@backstage/plugin-search-backend-module-explore': patch
|
||||
---
|
||||
|
||||
**BREAKING:** Moved `schedule` from module options into app-config for the new backend system. You can now pass in a `TaskScheduleDefinitionConfig` through the `search.explore.schedule` configuration key.
|
||||
Breaking change for the alpha export moved `schedule` from module options into app-config for the new backend system. You can now pass in a `TaskScheduleDefinitionConfig` through the `search.collators.explore.schedule` configuration key.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/permission-backend': patch
|
||||
---
|
||||
|
||||
Refactor backend plugin creation parameter from callback to object.
|
||||
+4
-2
@@ -18,8 +18,10 @@ import { TaskScheduleDefinitionConfig } from '@backstage/backend-tasks';
|
||||
|
||||
export interface Config {
|
||||
search?: {
|
||||
explore?: {
|
||||
schedule?: TaskScheduleDefinitionConfig;
|
||||
collators?: {
|
||||
explore?: {
|
||||
schedule?: TaskScheduleDefinitionConfig;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -61,9 +61,9 @@ export const searchModuleExploreCollator = createBackendModule({
|
||||
initialDelay: { seconds: 3 },
|
||||
};
|
||||
|
||||
const schedule = config.has('search.explore.schedule')
|
||||
const schedule = config.has('search.collators.explore.schedule')
|
||||
? readTaskScheduleDefinitionFromConfig(
|
||||
config.getConfig('search.explore.schedule'),
|
||||
config.getConfig('search.collators.explore.schedule'),
|
||||
)
|
||||
: defaultSchedule;
|
||||
|
||||
|
||||
+3
-3
@@ -18,9 +18,9 @@ import { TaskScheduleDefinitionConfig } from '@backstage/backend-tasks';
|
||||
|
||||
export interface Config {
|
||||
search?: {
|
||||
techdocs?: {
|
||||
schedule?: TaskScheduleDefinitionConfig;
|
||||
collators?: {
|
||||
collators?: {
|
||||
techdocs?: {
|
||||
schedule?: TaskScheduleDefinitionConfig;
|
||||
locationTemplate?: string;
|
||||
parallelismLimit?: number;
|
||||
legacyPathCasing?: boolean;
|
||||
|
||||
@@ -62,9 +62,9 @@ export const searchModuleTechDocsCollator = createBackendModule({
|
||||
initialDelay: { seconds: 3 },
|
||||
};
|
||||
|
||||
const schedule = config.has('search.explore.schedule')
|
||||
const schedule = config.has('search.collators.techdocs.schedule')
|
||||
? readTaskScheduleDefinitionFromConfig(
|
||||
config.getConfig('search.explore.schedule'),
|
||||
config.getConfig('search.collators.techdocs.schedule'),
|
||||
)
|
||||
: defaultSchedule;
|
||||
|
||||
|
||||
+1
-1
@@ -217,7 +217,7 @@ describe('DefaultTechDocsCollatorFactory', () => {
|
||||
|
||||
// Only 1 entity with TechDocs configured multiplied by 3 pages.
|
||||
expect(documents).toHaveLength(3);
|
||||
expect(_config.get('search.techdocs.collators.parallelismLimit')).toEqual(
|
||||
expect(_config.get('search.collators.techdocs.parallelismLimit')).toEqual(
|
||||
1,
|
||||
);
|
||||
});
|
||||
|
||||
+2
-2
@@ -105,10 +105,10 @@ export class DefaultTechDocsCollatorFactory implements DocumentCollatorFactory {
|
||||
'techdocs.legacyUseCaseSensitiveTripletPaths',
|
||||
) || false;
|
||||
const locationTemplate = config.getOptionalString(
|
||||
'search.techdocs.collators.locationTemplate',
|
||||
'search.collators.techdocs.locationTemplate',
|
||||
);
|
||||
const parallelismLimit = config.getOptionalNumber(
|
||||
'search.techdocs.collators.parallelismLimit',
|
||||
'search.collators.techdocs.parallelismLimit',
|
||||
);
|
||||
return new DefaultTechDocsCollatorFactory({
|
||||
...options,
|
||||
|
||||
Reference in New Issue
Block a user