Releases: backstage/backstage
v0.4.0
@backstage/backend-common@0.4.0
Minor Changes
-
12bbd74: Removes the Prometheus integration from
backend-common
.Rational behind this change is to keep the metrics integration of Backstage
generic. Instead of directly relying on Prometheus, Backstage will expose
metrics in a generic way. Integrators can then export the metrics in their
desired format. For example using Prometheus.To keep the existing behavior, you need to integrate Prometheus in your
backend:First, add a dependency on
express-prom-bundle
andprom-client
to your backend.// packages/backend/package.json "dependencies": { + "express-prom-bundle": "^6.1.0", + "prom-client": "^12.0.0",
Then, add a handler for metrics and a simple instrumentation for the endpoints.
// packages/backend/src/metrics.ts import { useHotCleanup } from '@backstage/backend-common'; import { RequestHandler } from 'express'; import promBundle from 'express-prom-bundle'; import prom from 'prom-client'; import * as url from 'url'; const rootRegEx = new RegExp('^/([^/]*)/.*'); const apiRegEx = new RegExp('^/api/([^/]*)/.*'); export function normalizePath(req: any): string { const path = url.parse(req.originalUrl || req.url).pathname || '/'; // Capture /api/ and the plugin name if (apiRegEx.test(path)) { return path.replace(apiRegEx, '/api/$1'); } // Only the first path segment at root level return path.replace(rootRegEx, '/$1'); } /** * Adds a /metrics endpoint, register default runtime metrics and instrument the router. */ export function metricsHandler(): RequestHandler { // We can only initialize the metrics once and have to clean them up between hot reloads useHotCleanup(module, () => prom.register.clear()); return promBundle({ includeMethod: true, includePath: true, // Using includePath alone is problematic, as it will include path labels with high // cardinality (e.g. path params). Instead we would have to template them. However, this // is difficult, as every backend plugin might use different routes. Instead we only take // the first directory of the path, to have at least an idea how each plugin performs: normalizePath, promClient: { collectDefaultMetrics: {} }, }); }
Last, extend your router configuration with the
metricsHandler
:+import { metricsHandler } from './metrics'; ... const service = createServiceBuilder(module) .loadConfig(config) .addRouter('', await healthcheck(healthcheckEnv)) + .addRouter('', metricsHandler()) .addRouter('/api', apiRouter);
Your Prometheus metrics will be available at the
/metrics
endpoint.
Patch Changes
- 38e24db: Move the core url and auth logic to integration for the four major providers
- Updated dependencies [38e24db]
- Updated dependencies [b8ecf6f]
- Updated dependencies [e3bd9fc]
- Updated dependencies [e3bd9fc]
- @backstage/integration@0.1.3
- @backstage/config@0.1.2
@backstage/catalog-model@0.5.0
Minor Changes
-
83b6e0c: Remove the deprecated fields
ancestors
anddescendants
from theGroup
entity.See #3049 and the PRs linked from it for details.
Patch Changes
@backstage/core@0.4.0
Minor Changes
-
ff243ce: Introducing a new optional property within
app-config.yaml
calledauth.environment
to have configurable environment value forauth.providers
Default Value: 'development'
Optional Values: 'production' | 'development'
Migration-steps:
- To override the default value, one could simply introduce the new property
environment
within theauth
section of theconfig.yaml
- re-run the build to reflect the changed configs
- To override the default value, one could simply introduce the new property
Patch Changes
- 2527628: Link
component
prop now accepts any element type. - 1c69d47: Fix React warning of descendant paragraph tag
- 04f26f8: Export the
defaultConfigLoader
implementation - Updated dependencies [b6557c0]
- Updated dependencies [e3bd9fc]
- Updated dependencies [d8d5a17]
- Updated dependencies [1665ae8]
- Updated dependencies [e3bd9fc]
- @backstage/core-api@0.2.5
- @backstage/config@0.1.2
- @backstage/theme@0.2.2
@backstage/plugin-api-docs@0.4.0
Minor Changes
-
246799c: Stop exposing a custom router from the
api-docs
plugin. Instead, use the
widgets exported by the plugin to compose your custom entity pages.Instead of displaying the API definitions directly in the API tab of the
component, it now contains tables linking to the API entities. This also adds
new widgets to display relationships (bot provides & consumes relationships)
between components and APIs.See the changelog of
create-app
for a migration guide.
Patch Changes
- Updated dependencies [2527628]
- Updated dependencies [6011b7d]
- Updated dependencies [1c69d47]
- Updated dependencies [83b6e0c]
- Updated dependencies [1665ae8]
- Updated dependencies [04f26f8]
- Updated dependencies [ff243ce]
- @backstage/core@0.4.0
- @backstage/plugin-catalog@0.2.6
- @backstage/catalog-model@0.5.0
- @backstage/theme@0.2.2
@backstage/plugin-catalog-backend@0.4.0
Minor Changes
-
83b6e0c: Remove the deprecated fields
ancestors
anddescendants
from theGroup
entity.See #3049 and the PRs linked from it for details.
Patch Changes
- 6e8bb3a: leave unknown placeholder-lookalikes untouched in the catalog processing loop
- e708679: refreshAllLocations uses a child logger of the HigherOrderOperation with a meta
component
:catalog-all-locations-refresh
- 047c018: Batch the fetching of relations
- 38d63fb: Fix string template literal
- Updated dependencies [38e24db]
- Updated dependencies [e3bd9fc]
- Updated dependencies [12bbd74]
- Updated dependencies [83b6e0c]
- Updated dependencies [e3bd9fc]
- @backstage/backend-common@0.4.0
- @backstage/config@0.1.2
- @backstage/catalog-model@0.5.0
@backstage/plugin-cost-insights@0.5.0
Minor Changes
-
e3071a0: Add support for multiple types of entity cost breakdown.
This change is backwards-incompatible with plugin-cost-insights 0.3.x; the
entities
field on Entity returned in product cost queries changed fromEntity[]
toRecord<string, Entity[]
. -
d6e8099ed: convert duration + last completed billing date to intervals
-
88ef11b: Remove calendar MoM period option and fix quarter end date logic
Patch Changes
- 90458fe: fix react-hooks/exhaustive-deps error
- Updated dependencies [2527628]
- Updated dependencies [e3bd9fc]
- Updated dependencies [e1f4e24]
- Updated dependencies [1c69d47]
- Updated dependencies [1665ae8]
- Updated dependencies [04f26f8]
- Updated dependencies [ff243ce]
- Updated dependencies [e3bd9fc]
- @backstage/core@0.4.0
- @backstage/config@0.1.2
- @backstage/test-utils@0.1.5
- @backstage/theme@0.2.2
@backstage/plugin-sentry@0.3.0
Minor Changes
-
075d3dc: The plugin uses the
proxy-backend
instead of a customsentry-backend
.
It requires a proxy configuration:app-config.yaml
:proxy: '/sentry/api': target: https://sentry.io/api/ allowedMethods: ['GET'] headers: Authorization: $env: SENTRY_TOKEN # export SENTRY_TOKEN="Bearer <your-sentry-token>"
The
MockApiBackend
is no longer configured by theNODE_ENV
variable.
Instead, the mock backend can be used with an api-override:packages/app/src/apis.ts
:import { createApiFactory } from '@backstage/core'; import { MockSentryApi, sentryApiRef } from '@backstage/plugin-sentry'; export const apis = [ // ... createApiFactory(sentryApiRef, new MockSentryApi()), ];
If you already use the Sentry backend, you must remove it from the backend:
Delete
packages/backend/src/plugins/sentry.ts
.# packages/backend/package.json ... "@backstage/plugin-scaffolder-backend": "^0.3.2", - "@backstage/plugin-sentry-backend": "^0.1.3", "@backstage/plugin-techdocs-backend": "^0.3.0", ...
// packages/backend/src/index.html const apiRouter = Router(); apiRouter.use('/catalog', await catalog(catalogEnv)); apiRouter.use('/rollbar', await rollbar(rollbarEnv)); apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv)); - apiRouter.use('/sentry', await sentry(sentryEnv)); apiRouter.use('/auth', await auth(authEnv)); apiRouter.use('/techdocs', await techdocs(techdocsEnv)); apiRouter.use('/kubernetes', await kubernetes(kubernetesEnv)); apiRouter.use('/proxy', await proxy(proxyEnv)); apiRouter.use('/graphql', await graphql(graphqlEnv)); apiRouter.use(notFoundHandler());
Patch Changes
- Updated dependencies [2527628]
- Updated dependencies [1c69d47]
- Updated dependencies [83b6e0c]
- Updated dependencies [1665ae8]
- Updated dependencies [04f26f8]
- Updated dependencies [ff243ce]
- @backstage/core@0.4.0
- @backstage/catalog-model@0.5.0
- @backstage/theme@0.2.2
@backstage/plugin-sentry-backend@0.2.0
Minor Changes
- 075d3dc: The plugin uses the
proxy-backend
instead of a customsentry-backend
.
It requires a proxy configuration:
...
v0.3.2
@backstage/catalog-model@0.3.0
Minor Changes
- 1166fcc: add kubernetes selector to component model
Patch Changes
-
1185919: Marked the
Group
entity fieldsancestors
anddescendants
for deprecation on Dec 6th, 2020. See #3049 for details.Code that consumes these fields should remove those usages as soon as possible. There is no current or planned replacement for these fields.
The BuiltinKindsEntityProcessor has been updated to inject these fields as empty arrays if they are missing. Therefore, if you are on a catalog instance that uses the updated version of this code, you can start removing the fields from your source catalog-info.yaml data as well, without breaking validation.
After Dec 6th, the fields will be removed from types and classes of the Backstage repository. At the first release after that, they will not be present in released packages either.
If your catalog-info.yaml files still contain these fields after the deletion, they will still be valid and your ingestion will not break, but they won't be visible in the types for consuming code.
@backstage/plugin-kubernetes@0.3.0
Minor Changes
- 1166fcc: add kubernetes selector to component model
Patch Changes
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-kubernetes-backend@0.2.0
@backstage/plugin-kubernetes-backend@0.2.0
Minor Changes
- 1166fcc: add kubernetes selector to component model
Patch Changes
- Updated dependencies [1166fcc]
- Updated dependencies [bff3305]
- Updated dependencies [1185919]
- Updated dependencies [b47dce0]
- @backstage/catalog-model@0.3.0
- @backstage/backend-common@0.3.1
@backstage/backend-common@0.3.1
Patch Changes
- bff3305: Added readTree support to AzureUrlReader
- b47dce0: Make integration host and url configurations visible in the frontend
@backstage/catalog-client@0.3.1
Patch Changes
@backstage/cli@0.3.1
Patch Changes
- 29a0cca: The CLI now detects and transforms linked packages. You can link in external packages by adding them to both the
lerna.json
andpackage.json
workspace paths. - faf311c: New lint rule to disallow assertions and promote
as
assertions. - @typescript-eslint/consistent-type-assertions - 31d8b69: Add experimental backend:bundle command
- 9913459: Add new
versions:check
andversions:bump
commands to simplify version management and avoid conflicts
@backstage/core@0.3.2
Patch Changes
- 475fc0a: Clear sidebar search field once a search is executed
@backstage/plugin-api-docs@0.2.2
Patch Changes
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-catalog@0.2.3
@backstage/plugin-auth-backend@0.2.3
Patch Changes
- Updated dependencies [1166fcc]
- Updated dependencies [bff3305]
- Updated dependencies [1185919]
- Updated dependencies [b47dce0]
- @backstage/catalog-model@0.3.0
- @backstage/backend-common@0.3.1
- @backstage/catalog-client@0.3.1
@backstage/plugin-catalog@0.2.3
Patch Changes
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [ef2831d]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-scaffolder@0.3.1
- @backstage/catalog-client@0.3.1
- @backstage/plugin-techdocs@0.2.3
@backstage/plugin-catalog-backend@0.2.2
Patch Changes
-
0c21212: Add support for reading groups and users from the Microsoft Graph API.
-
1185919: Marked the
Group
entity fieldsancestors
anddescendants
for deprecation on Dec 6th, 2020. See #3049 for details.Code that consumes these fields should remove those usages as soon as possible. There is no current or planned replacement for these fields.
The BuiltinKindsEntityProcessor has been updated to inject these fields as empty arrays if they are missing. Therefore, if you are on a catalog instance that uses the updated version of this code, you can start removing the fields from your source catalog-info.yaml data as well, without breaking validation.
After Dec 6th, the fields will be removed from types and classes of the Backstage repository. At the first release after that, they will not be present in released packages either.
If your catalog-info.yaml files still contain these fields after the deletion, they will still be valid and your ingestion will not break, but they won't be visible in the types for consuming code.
-
Updated dependencies [1166fcc]
-
Updated dependencies [bff3305]
-
Updated dependencies [1185919]
-
Updated dependencies [b47dce0]
- @backstage/catalog-model@0.3.0
- @backstage/backend-common@0.3.1
@backstage/plugin-catalog-graphql@0.2.2
Patch Changes
- Updated dependencies [1166fcc]
- Updated dependencies [bff3305]
- Updated dependencies [1185919]
- Updated dependencies [b47dce0]
- @backstage/catalog-model@0.3.0
- @backstage/backend-common@0.3.1
@backstage/plugin-circleci@0.2.2
Patch Changes
- a8de7f5: Improved CircleCI builds table to show more information and relevant links
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-catalog@0.2.3
@backstage/plugin-cloudbuild@0.2.2
Patch Changes
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-catalog@0.2.3
@backstage/plugin-cost-insights@0.4.1
Patch Changes
- 8e6728e: fix product icon configuration
- c93a14b: truncate large percentages > 1000%
- Updated dependencies [475fc0a]
- @backstage/core@0.3.2
@backstage/plugin-github-actions@0.2.2
Patch Changes
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-catalog@0.2.3
@backstage/plugin-jenkins@0.3.1
Patch Changes
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-catalog@0.2.3
@backstage/plugin-lighthouse@0.2.3
Patch Changes
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-catalog@0.2.3
@backstage/plugin-register-component@0.2.2
Patch Changes
- 2a71f4b: Remove catalog link on validate popup
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-catalog@0.2.3
@backstage/plugin-rollbar@0.2.3
Patch Changes
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-catalog@0.2.3
@backstage/plugin-scaffolder@0.3.1
Patch Changes
- ef2831d: Move constructing the catalog-info.yaml URL for scaffolded components to the publishers
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-catalog@0.2.3
@backstage/plugin-scaffolder-backend@0.3.2
Patch Changes
- ef2831d: Move constructing the catalog-info.yaml URL for scaffolded components to the publishers
- 5a1d8dc: Fix React entity YAML filename to new standard
- Updated dependencies [1166fcc]
- Updated dependencies [bff3305]
- Updated dependencies [1185919]
- Updated dependencies [b47dce0]
- @backstage/catalog-model@0.3.0
- @backstage/backend-common@0.3.1
@backstage/plugin-search@0.2.1
Patch Changes
- 475fc0a: Using the search field in the sidebar now navigates to the search result page.
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-catalog@0.2.3
@backstage/plugin-sentry@0.2.3
Patch Changes
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
@backstage/plugin-sonarqube@0.1.4
Patch Changes
- 26484d4: Add configuration schema
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
@backstage/plugin-techdocs@0.2.3
Patch Changes
- Updated dependencies [475fc0a]
- Updated dependencies [1166fcc]
- Updated dependencies [1185919]
- @backstage/core@0.3.2
- @backstage/catalog-model@0.3.0
- @backstage/plugin-catalog@0.2.3
@backstage/plugin-tec...
v0.3.1
@backstage/backend-common@0.3.0
Minor Changes
-
1722cb5: Added support for loading and validating configuration schemas, as well as declaring config visibility through schemas.
The new
loadConfigSchema
function exported by@backstage/config-loader
allows for the collection and merging of configuration schemas from all nearby dependencies of the project.A configuration schema is declared using the
https://backstage.io/schema/config-v1
JSON Schema meta schema, which is based on draft07. The only difference to the draft07 schema is the customvisibility
keyword, which is used to indicate whether the given config value should be visible in the frontend or not. The possible values arefrontend
,backend
, andsecret
, wherebackend
is the default. A visibility ofsecret
has the same scope at runtime, but it will be treated with more care in certain contexts, and defining bothfrontend
andsecret
for the same value in two different schemas will result in an error during schema merging.Packages that wish to contribute configuration schema should declare it in a root
"configSchema"
field inpackage.json
. The field can either contain an inlined JSON schema, or a relative path to a schema file. Schema files can be in either.json
or.d.ts
format.TypeScript configuration schema files should export a single
Config
type, for example:export interface Config { app: { /** * Frontend root URL * @visibility frontend */ baseUrl: string; }; }
-
8e2effb: Refactored UrlReader.readTree to be required and accept (url, options)
Patch Changes
- 1722cb5: Added configuration schema
- 7b37e68: Added the integration package
- Updated dependencies [1722cb5]
- Updated dependencies [7b37e68]
- @backstage/config-loader@0.3.0
- @backstage/integration@0.1.1
- @backstage/test-utils@0.1.3
@backstage/catalog-client@0.3.0
Minor Changes
- 717e43d: Changed the getEntities interface to (1) nest parameters in an object, (2) support field selection, and (3) return an object with an items field for future extension
@backstage/cli@0.3.0
Minor Changes
-
1722cb5: Added support for loading and validating configuration schemas, as well as declaring config visibility through schemas.
The new
loadConfigSchema
function exported by@backstage/config-loader
allows for the collection and merging of configuration schemas from all nearby dependencies of the project.A configuration schema is declared using the
https://backstage.io/schema/config-v1
JSON Schema meta schema, which is based on draft07. The only difference to the draft07 schema is the customvisibility
keyword, which is used to indicate whether the given config value should be visible in the frontend or not. The possible values arefrontend
,backend
, andsecret
, wherebackend
is the default. A visibility ofsecret
has the same scope at runtime, but it will be treated with more care in certain contexts, and defining bothfrontend
andsecret
for the same value in two different schemas will result in an error during schema merging.Packages that wish to contribute configuration schema should declare it in a root
"configSchema"
field inpackage.json
. The field can either contain an inlined JSON schema, or a relative path to a schema file. Schema files can be in either.json
or.d.ts
format.TypeScript configuration schema files should export a single
Config
type, for example:export interface Config { app: { /** * Frontend root URL * @visibility frontend */ baseUrl: string; }; }
Patch Changes
- 1722cb5: Added configuration schema
- 9023404: Support specifying listen host/port for frontend
- Updated dependencies [1722cb5]
- @backstage/config-loader@0.3.0
@backstage/config-loader@0.3.0
Minor Changes
-
1722cb5: Added support for loading and validating configuration schemas, as well as declaring config visibility through schemas.
The new
loadConfigSchema
function exported by@backstage/config-loader
allows for the collection and merging of configuration schemas from all nearby dependencies of the project.A configuration schema is declared using the
https://backstage.io/schema/config-v1
JSON Schema meta schema, which is based on draft07. The only difference to the draft07 schema is the customvisibility
keyword, which is used to indicate whether the given config value should be visible in the frontend or not. The possible values arefrontend
,backend
, andsecret
, wherebackend
is the default. A visibility ofsecret
has the same scope at runtime, but it will be treated with more care in certain contexts, and defining bothfrontend
andsecret
for the same value in two different schemas will result in an error during schema merging.Packages that wish to contribute configuration schema should declare it in a root
"configSchema"
field inpackage.json
. The field can either contain an inlined JSON schema, or a relative path to a schema file. Schema files can be in either.json
or.d.ts
format.TypeScript configuration schema files should export a single
Config
type, for example:export interface Config { app: { /** * Frontend root URL * @visibility frontend */ baseUrl: string; }; }
@backstage/plugin-app-backend@0.3.0
Minor Changes
-
1722cb5: Use new config schema support to automatically inject config with frontend visibility, in addition to the existing env schema injection.
This removes the confusing behavior where configuration was only injected into the app at build time. Any runtime configuration (except for environment config) in the backend used to only apply to the backend itself, and not be injected into the frontend.
Patch Changes
- Updated dependencies [1722cb5]
- Updated dependencies [1722cb5]
- Updated dependencies [7b37e68]
- Updated dependencies [8e2effb]
- @backstage/backend-common@0.3.0
- @backstage/config-loader@0.3.0
@backstage/plugin-cost-insights@0.4.0
Minor Changes
- 4040d4f: remove cost insights currency feature flag
Patch Changes
- 1722cb5: Added configuration schema
- 17a9f48: remove excessive margin from cost overview banner
- f360395: UI improvements: Increase width of first column in product entity dialog table
UI improvement: Display full cost amount in product entity dialog table - 259d848: Fix savings/excess display calculation
- Updated dependencies [1722cb5]
- @backstage/core@0.3.1
- @backstage/test-utils@0.1.3
@backstage/core@0.3.1
Patch Changes
- 1722cb5: Added configuration schema
@backstage/create-app@0.2.2
Patch Changes
-
7d7abd5: Add
app-backend
as a backend plugin, and make a single docker build of the backend the default way to deploy backstage.Note that the
app-backend
currently only is a solution for deployments of the app, it's not a dev server and is not intended for local development.Template changes
As a part of installing the
app-backend
plugin, the below changes where made. The changes are grouped into two steps, installing the plugin, and updating the Docker build and configuration.Installing the
app-backend
plugin in the backendFirst, install the
@backstage/plugin-app-backend
plugin package in your backend. These changes where made forv0.3.0
of the plugin, and the installation process might change in the future. Run the following from the root of the repo:cd packages/backend yarn add @backstage/plugin-app-backend
For the
app-backend
to get access to the static content in the frontend we also need to add the localapp
package as a dependency. Add the following to your"dependencies"
inpackages/backend/package.json
, assuming your app package is still namedapp
and on version0.0.0
:"app": "0.0.0",
Don't worry, this will not cause your entire frontend dependency tree to be added to the app, just double check that
packages/app/package.json
has a"bundled": true
field at top-level. This signals to the backend build process that the package is bundled and that no transitive dependencies should be included.Next, create
packages/backend/src/plugins/app.ts
with the following:import { createRouter } from '@backstage/plugin-app-backend'; import { PluginEnvironment } from '../types'; export default async function createPlugin({ logger, config, }: PluginEnvironment) { return await createRouter({ logger, config, appPackageName: 'app', }); }
In
packages/backend/src/index.ts
, make the following changes:Add an import for the newly created plugin setup file:
import app from './plugins/app';
Setup the following plugin env.
const appEnv = useHotMemoize(module, () => createEnv('app'));
Change service builder setup to include the
app
plugin as follows. Note that theapp
plugin is not installed on the/api
route with most other plugins.const service = createServiceBuilder(module) .loadConfig(config) .addRouter('/api', apiRouter) .addRouter('', await app(appEnv));
You should now have the
app-backend
plugin installed in your backend, ready to serve the frontend bundle!Docker build setup
Since the backend image is now the only one needed for a simple Backstage deployment, the image tag name in the
build-image
script insidepackages/backend/package.json
was changed to th...
v0.3.0
@backstage/core@0.3.0
Minor Changes
- 199237d: New DependencyGraph component added to core package.
Patch Changes
-
7b37d65: Adds the MarkdownContent component to render and display Markdown content with the default
GFM (Github flavored Markdown) dialect.<MarkdownContent content={markdownGithubFlavored} />
To render the Markdown content with plain CommonMark, set the dialect to
common-mark
<MarkdownContent content={markdown} dialect='common-mark />
-
4aca74e: Extend default config loader to read config from the window object.
Config will be read from
window.__APP_CONFIG__
which should be an object. -
e8f69ba: - The BottomLink is now able to handle with internal routes.
- @backstage/core Link component detect whether it's an external link or not, and render accordingly
-
0c0798f: Extend the table to share its current filter state. The filter state can be used together with the new
useQueryParamState
hook to store the current filter state to the browser history and restore it after navigating to other routes. -
0c0798f: Make the selected state of Select and CheckboxTree controllable from outside.
-
6627b62: Fix divider prop not respected on InfoCard
-
Updated dependencies [c5bab94]
-
Updated dependencies [4577e37]
- @backstage/core-api@0.2.1
- @backstage/theme@0.2.1
@backstage/plugin-cost-insights@0.3.0
Minor Changes
- 0703ede: rename: Tooltip -> BarChartTooltip
rename: TooltipItem -> BarChartTooltipItem
Deprecate BarChartData in favor of BarChartOptions
Export BarChartLegend component
Update BarChart props to accept options prop
Deprecate ProductCost type in favor of Entity. Update CostInsightsApi
Patch Changes
- 9a29457: Fix styling issue on Cost Insights product panels with no cost
- Updated dependencies [7b37d65]
- Updated dependencies [4aca74e]
- Updated dependencies [e8f69ba]
- Updated dependencies [0c0798f]
- Updated dependencies [0c0798f]
- Updated dependencies [199237d]
- Updated dependencies [6627b62]
- Updated dependencies [4577e37]
- @backstage/core@0.3.0
- @backstage/theme@0.2.1
@backstage/plugin-jenkins@0.3.0
Minor Changes
- a41730c: Add tooltip for Jenkins rerun button
Patch Changes
- Updated dependencies [7b37d65]
- Updated dependencies [4aca74e]
- Updated dependencies [e8f69ba]
- Updated dependencies [0c0798f]
- Updated dependencies [0c0798f]
- Updated dependencies [199237d]
- Updated dependencies [6627b62]
- Updated dependencies [4577e37]
- Updated dependencies [2d0bd1b]
- @backstage/core@0.3.0
- @backstage/theme@0.2.1
- @backstage/plugin-catalog@0.2.1
@backstage/plugin-scaffolder@0.3.0
Minor Changes
-
59166e5:
createRouter
of scaffolder backend will now require additional option asentityClient
which could be generated byCatalogEntityClient
inplugin-scaffolder-backend
package. Here is example to generateentityClient
.import { CatalogEntityClient } from '@backstage/plugin-scaffolder-backend'; import { SingleHostDiscovery } from '@backstage/backend-common'; const discovery = SingleHostDiscovery.fromConfig(config); const entityClient = new CatalogEntityClient({ discovery });
- Scaffolder's API
/v1/jobs
will accepttemplateName
instead oftemplate
Entity.
- Scaffolder's API
Patch Changes
- Updated dependencies [7b37d65]
- Updated dependencies [4aca74e]
- Updated dependencies [e8f69ba]
- Updated dependencies [0c0798f]
- Updated dependencies [0c0798f]
- Updated dependencies [199237d]
- Updated dependencies [6627b62]
- Updated dependencies [4577e37]
- Updated dependencies [2d0bd1b]
- @backstage/core@0.3.0
- @backstage/theme@0.2.1
- @backstage/plugin-catalog@0.2.1
@backstage/plugin-scaffolder-backend@0.3.0
Minor Changes
-
59166e5:
createRouter
of scaffolder backend will now require additional option asentityClient
which could be generated byCatalogEntityClient
inplugin-scaffolder-backend
package. Here is example to generateentityClient
.import { CatalogEntityClient } from '@backstage/plugin-scaffolder-backend'; import { SingleHostDiscovery } from '@backstage/backend-common'; const discovery = SingleHostDiscovery.fromConfig(config); const entityClient = new CatalogEntityClient({ discovery });
- Scaffolder's API
/v1/jobs
will accepttemplateName
instead oftemplate
Entity.
- Scaffolder's API
Patch Changes
- Updated dependencies [33b7300]
- @backstage/backend-common@0.2.1
@backstage/plugin-tech-radar@0.3.0
Minor Changes
- a906f20: Added tech radar blip history backend support and normalized the data structure
Patch Changes
- 3f05616: Make the footer color of the tech-radar work in both light and dark theme.
- Updated dependencies [7b37d65]
- Updated dependencies [4aca74e]
- Updated dependencies [e8f69ba]
- Updated dependencies [0c0798f]
- Updated dependencies [0c0798f]
- Updated dependencies [199237d]
- Updated dependencies [6627b62]
- Updated dependencies [4577e37]
- @backstage/core@0.3.0
- @backstage/theme@0.2.1
@backstage/backend-common@0.2.1
Patch Changes
- 33b7300: Capture plugin name under the /api/ prefix for http metrics
@backstage/core-api@0.2.1
Patch Changes
-
c5bab94: Updated the AuthApi
.create
methods to configure the default scope of the corresponding Auth Api. As a result the
default scope is configurable when overwriting the Core Api in the app.GithubAuth.create({ discoveryApi, oauthRequestApi, defaultScopes: ['read:user', 'repo'], }),
Replaced redundant CreateOptions of each Auth Api with the OAuthApiCreateOptions type.
export type OAuthApiCreateOptions = AuthApiCreateOptions & { oauthRequestApi: OAuthRequestApi; defaultScopes?: string[]; }; export type AuthApiCreateOptions = { discoveryApi: DiscoveryApi; environment?: string; provider?: AuthProvider & { id: string }; };
-
Updated dependencies [4577e37]
- @backstage/theme@0.2.1
@backstage/create-app@0.2.1
Patch Changes
- c56e283: Fix missing api-docs plugin registration in app template
@backstage/dev-utils@0.1.3
Patch Changes
- Updated dependencies [7b37d65]
- Updated dependencies [4aca74e]
- Updated dependencies [e8f69ba]
- Updated dependencies [0c0798f]
- Updated dependencies [0c0798f]
- Updated dependencies [199237d]
- Updated dependencies [6627b62]
- Updated dependencies [4577e37]
- @backstage/core@0.3.0
- @backstage/theme@0.2.1
@backstage/theme@0.2.1
Patch Changes
- 4577e37: Improve styling of outlined chips in dark mode.
@backstage/plugin-api-docs@0.2.1
Patch Changes
- 0c0798f: Persist table state of the API Explorer to the browser history. This allows to navigate between pages and come back to the previous filter state.
- 84b654d: Use dense table style and outlined chips in the API Explorer.
- 803527b: Upgrade @kyma-project/asyncapi-react to 0.14.2
- Updated dependencies [7b37d65]
- Updated dependencies [4aca74e]
- Updated dependencies [e8f69ba]
- Updated dependencies [0c0798f]
- Updated dependencies [0c0798f]
- Updated dependencies [199237d]
- Updated dependencies [6627b62]
- Updated dependencies [4577e37]
- Updated dependencies [2d0bd1b]
- @backstage/core@0.3.0
- @backstage/theme@0.2.1
- @backstage/plugin-catalog@0.2.1
@backstage/plugin-auth-backend@0.2.1
Patch Changes
- 7528080: Handle non-7-bit safe characters in the posted message data
- 4628763: Encode the OAuth state parameter using URL safe chars only, so that providers have an easier time forming the callback URL.
- Updated dependencies [33b7300]
- @backstage/backend-common@0.2.1
@backstage/plugin-catalog@0.2.1
Patch Changes
- 2d0bd1b: Improved the edit link to open the component yaml in edit mode in corresponding SCM. Broke out logic for createEditLink to be reused.
- Updated dependencies [7b37d65]
- Updated dependencies [4aca74e]
- Updated dependencies [e8f69ba]
- Updated dependencies [0c0798f]
- Updated dependencies [0c0798f]
- Updated dependencies [199237d]
- Updated dependencies [6627b62]
- Updated dependencies [4577e37]
- Updated dependencies [59166e5]
- @backstage/core@0.3.0
- @backstage/theme@0.2.1
- @backstage/plugin-scaffolder@0.3.0
- @backstage/plugin-techdocs@0.2.1
@backstage/plugin-circleci@0.2.1
Patch Changes
- Updated dependencies [7b37d65]
- Updated dependencies [4aca74e]
- Updated dependencies [e8f69ba]
- Updated dependencies [0c0798f]
- Updated dependencies [0c0798f]
- Updated dependencies [199237d]
- Updated dependencies [6627b62]
- Updated dependencies [4577e37]
- Updated dependencies [2d0bd1b]
- @backstage/core@0.3.0
- @backstage/theme@0.2.1
- @backstage/plugin-catalog@0.2.1
@backstage/plugin-cloudbuild@0.2.1
Patch Changes
- Updated dependencies [7b37d65]
- Updated dependencies [4aca74e]
- Updated dependencies [e8f69ba]
- Updated dependencies [0c0798f]
- Updated dependencies [0c0798f]
- Updated dependencies [199237d]
- Updated dependencies [6627b62]
- Updated dependencies [4577e37]
- Updated dependencies [2d0bd1b]
- @backstage/core@0.3.0
- @backstage/theme@0.2.1
- @backstage/plugin-catalog@0.2.1
@backstage/plugin-explore@0.2.1
Patch Changes
- Updated dependencies [7b37d65]
...
v0.2.0
@backstage/backend-common@0.2.0
Minor Changes
-
5249594: Add service discovery interface and implement for single host deployments
Went with an interface similar to the frontend DiscoveryApi, since it's dead simple but still provides a lot of flexibility in the implementation.
Also ended up with two different methods, one for internal endpoint discovery and one for external. The two use-cases are explained a bit more in the docs, but basically it's service-to-service vs callback URLs.
This did get me thinking about uniqueness and that we're heading towards a global namespace for backend plugin IDs. That's probably fine, but if we're happy with that we should leverage it a bit more to simplify the backend setup. For example we'd have each plugin provide its own ID and not manually mount on paths in the backend.
Draft until we're happy with the implementation, then I can add more docs and changelog entry. Also didn't go on a thorough hunt for places where discovery can be used, but I don't think there are many since it's been pretty awkward to do service-to-service communication.
-
56e4eb5: Make CSP configurable to fix app-backend served app not being able to fetch
See discussion here on discord
-
e37c0a0: Use localhost to fall back to IPv4 if IPv6 isn't available
-
f00ca3c: Auto-create plugin databases
Relates to #1598.
This creates databases for plugins before handing off control to plugins.
The list of plugins currently need to be hard-coded depending on the installed plugins. A later PR will properly refactor the code to provide a factory pattern where plugins specify what they need, and Knex instances will be provided based on the input.
-
6579769: Add the ability to import components from Bitbucket Server to the service catalog
-
8c2b76e: BREAKING CHANGE
The existing loading of additional config files like
app-config.development.yaml
using APP_ENV or NODE_ENV has been removed.
Instead, the CLI and backend process now accept one or more--config
flags to load config files.Without passing any flags,
app-config.yaml
and, if it exists,app-config.local.yaml
will be loaded.
If passing any--config <path>
flags, only those files will be loaded, NOT the defaultapp-config.yaml
one.The old behaviour of for example
APP_ENV=development
can be replicated using the following flags:--config ../../app-config.yaml --config ../../app-config.development.yaml
-
8afce08: Use APP_ENV before NODE_ENV for determining what config to load
-
7bbeb04: Change loadBackendConfig to return the config directly
Patch Changes
-
440a17b: Added new UrlReader interface for reading opaque data from URLs with different providers.
This new URL reading system is intended as a replacement for the various integrations towards
external systems in the catalog, scaffolder, and techdocs. It is configured via a new top-level
config section called 'integrations'.Along with the UrlReader interface is a new UrlReaders class, which exposes static factory
methods for instantiating readers that can read from many different integrations simultaneously. -
Updated dependencies [8c2b76e]
-
Updated dependencies [ce5512b]
- @backstage/config-loader@0.2.0
- @backstage/test-utils@0.1.2
@backstage/catalog-model@0.2.0
Minor Changes
-
3a42365: Add handling and docs for entity references
-
e0be86b: Entirely case insensitive read path of entities
-
f70a528: Add the User & Group entities
A user describes a person, such as an employee, a contractor, or similar. Users belong to Group entities in the catalog.
A group describes an organizational entity, such as for example a team, a business unit, or a loose collection of people in an interest group. Members of these groups are modeled in the catalog as kind User.
-
12b5fe9: Add ApiDefinitionAtLocationProcessor that allows to load a API definition from another location
-
a768a07: Add the ability to import users from GitHub Organization into the catalog.
-
5adfc00: Changes the various kind policies into a new type
KindValidator
.Adds
CatalogProcessor#validateEntityKind
that makes use of the above
validators. This moves entity schema validity checking away from entity
policies and into processors, centralizing the extension points into the
processor chain. -
b3d5796: Enable adding locations for config files that does not yet exist by adding a flag to api request
Patch Changes
- fa56f46: Fix documentation and validation message for tags
@backstage/cli@0.2.0
Minor Changes
-
28edd7d: Create backend plugin through CLI
-
1d0aec7: Upgrade dependency
esbuild@0.7.7
-
72f6cda: Adds a new
BACKSTAGE_CLI_BUILD_PARELLEL
environment variable to control
parallelism for some build steps.This is useful in CI to help avoid out of memory issues when using
terser
. The
BACKSTAGE_CLI_BUILD_PARELLEL
environment variable can be set to
true | false | [integer]
to override the default behaviour. See
terser-webpack-plugin
for more details. -
8c2b76e: BREAKING CHANGE
The existing loading of additional config files like
app-config.development.yaml
using APP_ENV or NODE_ENV has been removed.
Instead, the CLI and backend process now accept one or more--config
flags to load config files.Without passing any flags,
app-config.yaml
and, if it exists,app-config.local.yaml
will be loaded.
If passing any--config <path>
flags, only those files will be loaded, NOT the defaultapp-config.yaml
one.The old behaviour of for example
APP_ENV=development
can be replicated using the following flags:--config ../../app-config.yaml --config ../../app-config.development.yaml
-
8afce08: Use APP_ENV before NODE_ENV for determining what config to load
Patch Changes
-
3472c8b: Add codeowners processor
- Include ESNext.Promise in TypeScript compilation
-
a3840be: Upgrade dependency rollup-plugin-typescript2 to ^0.27.3
-
cba4e4d: Including source maps with all packages
-
9a3b3db: Fixed duplicate help output, and print help on invalid command
-
7bbeb04: Change loadBackendConfig to return the config directly
-
Updated dependencies [8c2b76e]
-
Updated dependencies [ce5512b]
- @backstage/config-loader@0.2.0
@backstage/config-loader@0.2.0
Minor Changes
-
8c2b76e: BREAKING CHANGE
The existing loading of additional config files like
app-config.development.yaml
using APP_ENV or NODE_ENV has been removed.
Instead, the CLI and backend process now accept one or more--config
flags to load config files.Without passing any flags,
app-config.yaml
and, if it exists,app-config.local.yaml
will be loaded.
If passing any--config <path>
flags, only those files will be loaded, NOT the defaultapp-config.yaml
one.The old behaviour of for example
APP_ENV=development
can be replicated using the following flags:--config ../../app-config.yaml --config ../../app-config.development.yaml
-
ce5512b: Added support for new shorthand when defining secrets, where
$env: ENV
can be used instead of$secret: { env: ENV }
etc.
@backstage/core@0.2.0
Minor Changes
-
819a702: Add SAML login to backstage
-
482b631: Fix dense in Structured Metadata Table
-
1c60f71: Added EmptyState component
-
b79017f: Updated the
GithubAuth.create
method to configure the default scope of the Github Auth Api. As a result the
default scope is configurable when overwriting the Core Api in the app.GithubAuth.create({ discoveryApi, oauthRequestApi, defaultScopes: ['read:user', 'repo'], }),
-
6d97d2d: The InfoCard variant
'height100'
is deprecated. Use variant'gridItem'
instead.When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items.
Set to the'gridItem'
variant to display the InfoCard with full height suitable for Grid:
<InfoCard variant="gridItem">...</InfoCard>
Changed the InfoCards in '@backstage/plugin-github-actions', '@backstage/plugin-jenkins', '@backstage/plugin-lighthouse'
to pass an optional variant to the corresponding card of the plugin.As a result the overview content of the EntityPage shows cards with full height suitable for Grid.
Patch Changes
-
ae59833: Fix banner position and color
This PR closes: #2245
The "fixed" props added to control the position of the banner. When it is set to true the banner will be shown in bottom of that page and the width will be based on the content of the message.
-
144c66d: Fixed banner component position in DismissableBanner component
-
93a3fa3: Add forwardRef to the SidebarItem
-
782f3b3: add test case for Progress component
-
2713f28: fix the warnin...
Transition to using Changesets
This release marks the transition from lerna versioning to changesets, as well as from fixed alpha prereleases to decoupled version 0.x
semver versioning. From this release until version 1.0
, minor version bumps indicate a breaking change to a package.
This release does not contain any changes on top of the last prerelease.
v0.1.1-alpha.24
Backend (example-backend, or backends created with @backstage/create-app)
- The default mount point for backend plugins have been changed to
/api
. These changes are done in the backend package itself, so it is recommended that you sync up existing backend packages with this new pattern. #2562 - A service discovery mechanism for backend plugins has been added, and is now a requirement for several backend plugins. See packages/backend/src/index.ts for how to set it up using
SingleHostDiscovery
from@backstage/backend-common
. Note that the default base path for plugins is set to/api
to that change, but it can be set to use the old behavior via thebasePath
option. #2600
@backstage/auth-backend
- The default mount path of backend plugins was changed to
/api/:pluginId
, and as part of that it was needed to enable configuration of the base path of the auth backend, so that it can construct redirect URLs correctly. Note that you will also need to reconfigure any allowed redirect URLs to include/api
if you switch to the new recommended pattern. #2562 - The auth backend now requires an implementation of
PluginEndpointDiscovery
from@backstage/backend-common
to be passed in asdiscovery
. See the changes to@backstage/backend
.
@backstage/proxy-backend
- The proxy backend now requires an implementation of
PluginEndpointDiscovery
from@backstage/backend-common
to be passed in asdiscovery
. See the changes to@backstage/backend
.
@backstage/techdocs-backend
- The TechDocs backend now requires an implementation of
PluginEndpointDiscovery
from@backstage/backend-common
to be passed in asdiscovery
. See the changes to@backstage/backend
.
@backstage/plugin-identity-backend
- This plugin was removed, remove it from your backend if it's there. #2616
v0.1.1-alpha.23
@backstage/core
- Renamed
SessionStateApi
toSessionApi
andlogout
tosignOut
. Custom implementations of theSingInPage
app-component will need to rename theirlogout
function. The different auth provider items for theUserSettingsMenu
have been consolidated into a singleProviderSettingsItem
, meaning you need to replace existing usages ofOAuthProviderSettings
andOIDCProviderSettings
. #2555.
v0.1.1-alpha.22
@backstage/core
- Introduced initial version of an inverted app/plugin relationship, where plugins export components for apps to use, instead registering themselves directly into the app. This enables more fine-grained control of plugin features, and also composition of plugins such as catalog pages with additional cards and tabs. This breaks the use of
RouteRef
s, and there will be more changes related to this in the future, but this change lays the initial foundation. Seepackages/app
and followup PRs for how to update plugins for this change. #2076 - Switch to an automatic dependency injection mechanism for all Utility APIs, allowing plugins to ship default implementations of their APIs. See https://backstage.io/docs/api/utility-apis. #2285
@backstage/cli
- Change
backstage-cli backend:build-image
to forward all args todocker image build
, instead of just tag. Also add--build
flag for building all dependent packages before packaging the workspace for the docker build. #2299
@backstage/create-app
- Change root
tsc
output dir todist-types
, in order to allow for standalone plugin repos. #2278
@backstage/catalog-backend
- We have simplified the way that GitHub ingestion works. The
catalog.processors.githubApi
key is deprecated, in favor ofcatalog.processors.github
. At the same time, the location typegithub/api
is likewise deprecated, in favor ofgithub
. This location type now serves both raw HTTP reads and APIv3 reads, depending on how you configure it. It also supports having several providers at once - for example, both public GitHub and an internal GitHub Enterprise, with different keys. If you still use thecatalog.processors.githubApi
config key, things will work but you will get a deprecation warning at startup. In a later release, support for the old key will go away entirely. See the configuration section in the docs for more details.
v0.1.1-alpha.21
@backstage/core
- Material-UI: Bumped to 4.11.0, which is the version that create-app will
resolve to, because we wanted to get the renaming of ExpansionPanel to
Accordion into place. This gets rid of a lot of console deprecation warnings
in newly scaffolded apps.
@backstage/cli
-
Set
NODE_ENV
totest
when running test. #2214 -
Fix for backend plugins names requiring to be prefixed with
@backstage
to build. #2224
@backstage/backend-common
- The backend plugin
service builder
no longer addsexpress.json()
automatically to all routes. While convenient
in a lot of cases, it also led to problems where for example the proxy
middleware could hang because the body had already been altered and could not
be streamed. Also, plugins that rather wanted to handle e.g. form encoded data
still had to cater to that manually. We therefore decided to let plugins add
express.json()
themselves if they happen to deal with JSON data.
@backstage/catalog-backend
- Add rules configuration for catalog location and entity kinds. The default rules should cover most use-cases, but you may need to allow specific entity kinds when using things like Template or Group entities. #2118