backstage
backstage copied to clipboard
Split search backend plugin initialization into build and start phases
Hey, I just made a Pull Request!
As discussed over in #24794, the backend search plugin needs to have two phases during initialization: build and start.
The build phase is synchronous and ensures that the searchIndexService
state is initialized before creating the HTTP router. This "build" phase is necessary to ensure the collators are all added to the searchIndexService
object before trying to use that list of document types within the zod request schema that is used to validate incoming requests. Prior to this change, the set of types would be empty at initialization time and incoming requests would be rejected due to validation errors.
:heavy_check_mark: Checklist
Changed Packages
Package Name | Package Path | Changeset Bump | Current Version |
---|---|---|---|
@backstage/plugin-search-backend-node | plugins/search-backend-node | patch | v1.2.22 |
@backstage/plugin-search-backend | plugins/search-backend | patch | v1.5.8 |
Tested this locally, and works. Also the code looks like what I expected.
CC @drodil @freben
PS: The PR state is weird? No reviewers assigned, no uffizi? Haven't looked at PRs in a bit, no idea if that's normal these days.
Thank you for contributing to Backstage! The changes in this pull request will be part of the 1.28.0
release, scheduled for Tue, 18 Jun 2024.
Uffizzi Cluster pr-24796
was deleted.