From aeb8a06dc28aec29f4e827ef30a76abbc528e178 Mon Sep 17 00:00:00 2001 From: Aditya Kumar Date: Wed, 15 May 2024 08:32:43 +0530 Subject: [PATCH] Updated the backend-system/building-backends documents Signed-off-by: Aditya Kumar --- .../building-backends/01-index.md | 8 +++- .../building-backends/08-migrating.md | 42 ++++++++++++++----- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/docs/backend-system/building-backends/01-index.md b/docs/backend-system/building-backends/01-index.md index 4caa6fd524..44aa0c7e28 100644 --- a/docs/backend-system/building-backends/01-index.md +++ b/docs/backend-system/building-backends/01-index.md @@ -6,8 +6,12 @@ sidebar_label: Overview description: Building backends using the new backend system --- -> NOTE: If you have an existing backend that is not yet using the new backend -> system, see [migrating](./08-migrating.md). +:::note Note + +If you have an existing backend that is not yet using the new backend +system, see [migrating](./08-migrating.md). + +::: This section covers how to set up and customize your own Backstage backend. It covers some aspects of how backend instances fit into the larger system, but for a more in-depth explanation of the role of backends in the backend system, see [the architecture section](../architecture/02-backends.md). diff --git a/docs/backend-system/building-backends/08-migrating.md b/docs/backend-system/building-backends/08-migrating.md index fc0bf35267..ae41193b11 100644 --- a/docs/backend-system/building-backends/08-migrating.md +++ b/docs/backend-system/building-backends/08-migrating.md @@ -201,10 +201,14 @@ const legacyPlugin = makeLegacyPlugin( After this, your backend will know how to instantiate your thing on demand and place it in the legacy plugin environment. -> NOTE: If you happen to be dealing with a service ref that does NOT have a -> default implementation, but rather has a separate service factory, then you -> will also need to import that factory and pass it to the `services` array -> argument of `createBackend`. +:::note Note + +If you happen to be dealing with a service ref that does NOT have a +default implementation, but rather has a separate service factory, then you +will also need to import that factory and pass it to the `services` array +argument of `createBackend`. + +::: ## Cleaning Up the Plugins Folder @@ -216,10 +220,14 @@ maintained by the Backstage maintainers, you may find that they have already been migrated to the new backend system. This section describes some specific such migrations you can make. -> NOTE: For each of these, note that your backend still needs to have a -> dependency (e.g. in `packages/backend/package.json`) to those plugin packages, -> and they still need to be configured properly in your app-config. Those -> mechanisms still work just the same as they used to in the old backend system. +:::note Note + +For each of these, note that your backend still needs to have a +dependency (e.g. in `packages/backend/package.json`) to those plugin packages, +and they still need to be configured properly in your app-config. Those +mechanisms still work just the same as they used to in the old backend system. + +::: ### The App Plugin @@ -880,7 +888,11 @@ auth: - resolver: emailMatchingUserEntityAnnotation ``` -> Note: the resolvers will be tried in order, but will only be skipped if they throw a `NotFoundError`. +:::note Note + +The resolvers will be tried in order, but will only be skipped if they throw a `NotFoundError`. + +::: #### Auth Plugin Modules and Their Resolvers @@ -1137,7 +1149,11 @@ backend.add(import('@backstage/plugin-search-backend/alpha')); /* highlight-add-end */ ``` -> Note: this will use the Lunr search engine which stores its index in memory +:::note Note + +This will use the Lunr search engine which stores its index in memory. + +::: #### Search Engines @@ -1226,7 +1242,11 @@ backend.add( /* highlight-add-end */ ``` -> Note: The above example includes a default allow-all policy. If that is not what you want, do not add the second line and instead investigate one of the options below. +:::note Note + +The above example includes a default allow-all policy. If that is not what you want, do not add the second line and instead investigate one of the options below. + +::: #### Custom Permission Policy