Merge branch 'master' into fix/security-vulnerability-CVE-2021-23820

This commit is contained in:
Patrik Oldsberg
2022-04-19 17:04:40 +02:00
committed by GitHub
495 changed files with 7253 additions and 4430 deletions
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-techdocs-backend': patch
---
Specify type of `visibilityPermission` property on collators and collator factories.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': minor
---
Override default commit message and author details in GitLab action
-28
View File
@@ -1,28 +0,0 @@
---
'@backstage/plugin-catalog-backend': minor
---
**BREAKING (alpha api):** Replace `createCatalogPolicyDecision` export with `createCatalogConditionalDecision`, which accepts a permission parameter of type `ResourcePermission<'catalog-entity'>` along with conditions. The permission passed is expected to be the handled permission in `PermissionPolicy#handle`, whose type must first be narrowed using methods like `isPermission` and `isResourcePermission`:
```typescript
class TestPermissionPolicy implements PermissionPolicy {
async handle(
request: PolicyQuery<Permission>,
_user?: BackstageIdentityResponse,
): Promise<PolicyDecision> {
if (
// Narrow type of `request.permission` to `ResourcePermission<'catalog-entity'>
isResourcePermission(request.permission, RESOURCE_TYPE_CATALOG_ENTITY)
) {
return createCatalogConditionalDecision(
request.permission,
catalogConditions.isEntityOwner(
_user?.identity.ownershipEntityRefs ?? [],
),
);
}
return {
result: AuthorizeResult.ALLOW,
};
```
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/integration': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-catalog-backend-module-msgraph': patch
---
Clarify that config locations that emit User and Group kinds now need to declare so in the `catalog.locations.[].rules`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-bazaar': patch
---
Pass authorization header with Backstage token to backend requests.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-search-backend': patch
---
Check for non-resource permissions when authorizing result-by-result in AuthorizedSearchEngine.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
**DEPRECATION**: The `AuthProviderFactoryOptions` type has been deprecated, as the options are now instead inlined in the `AuthProviderFactory` type. This will make it possible to more easily introduce new options in the future without a possibly breaking change.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-permission-react': minor
---
**BREAKING**: More restrictive typing for `usePermission` hook and `PermissionedRoute` component. It's no longer possible to pass a `resourceRef` unless the permission is of type `ResourcePermission`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Updated openid-client from 4.1.2 to 5.1.3
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-tasks': patch
---
Refactored the internal `TaskWorker` class to make it easier to test.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-home': patch
---
Export template logos `TemplateBackstageLogo` and `TemplateBackstageLogoIcon` from package.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Fixed an issue where sometimes entities would have stale relations "stuck" and
not getting removed as expected, after the other end of the relation had stopped
referring to them.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-permission-common': minor
---
Add `resourceType` property to `PermissionCondition` type to allow matching them with `ResourcePermission` instances.
-52
View File
@@ -1,52 +0,0 @@
---
'@backstage/create-app': patch
---
Made `User` and `Group` entity kinds not permitted by the default
`catalog.rules` config.
The effect of this is that after creating a new Backstage repository, its
catalog no longer permits regular users to register `User` or `Group` entities
using the Backstage interface. Additionally, if you have config locations that
result in `User` or `Group` entities, you need to add those kinds to its own
specific rules:
```yaml
catalog:
locations:
# This applies for example to url type locations
- type: url
target: https://example.com/org.yaml
rules:
- allow: [User, Group]
# But also note that this applies to ALL org location types!
- type: github-org
target: https://github.com/my-org-name
rules:
- allow: [User, Group]
```
This rule change does NOT affect entity providers, only things that are emitted
by entity processors.
We recommend that this change is applied to your own Backstage repository, since
it makes it impossible for regular end users to affect your org data through
e.g. YAML files. To do so, remove the two kinds from the default rules in your config:
```diff
catalog:
rules:
- - allow: [Component, System, API, Group, User, Resource, Location]
+ - allow: [Component, System, API, Resource, Location]
```
And for any location that in any way results in org data being ingested, add the corresponding rule to it:
```diff
catalog:
locations:
- type: github-org
target: https://github.com/my-org-name
+ rules:
+ - allow: [User, Group]
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-techdocs': patch
---
imports from `@backstage/plugin-search-react` instead of `@backstage/plugin-search`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-react': patch
---
Prevent permissions with types other than `ResourcePermission<'catalog-entity'>` from being used with the `useEntityPermission` hook.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Bump the `rushstack` api generator libraries to their latest versions
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder': minor
---
Added a context menu to the scaffolder page that provides links to the template editor and actions reference. These links and the presence of the context menu can be toggled through the `contextMenu` prop of the scaffolder page.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Use new `PermissionEvaluator#authorizeConditional` method when retrieving permission conditions.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-permission-common': patch
'@backstage/plugin-permission-node': patch
---
Removed [strict](https://github.com/colinhacks/zod#strict) validation from `PermissionCriteria` schemas to support backward-compatible changes.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
build(deps): bump `eslint-plugin-jest` from 25.3.4 to 26.1.2
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/catalog-model': patch
'@backstage/config-loader': patch
'@backstage/plugin-tech-insights-backend-module-jsonfc': patch
---
build(deps): bump `ajv` from 7.0.3 to 8.10.0
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-kubernetes': patch
---
build(deps): bump `cronstrue` from 1.125.0 to 2.2.0
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
build(deps): bump `isbinaryfile` from 4.0.8 to 5.0.0
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
build(deps): bump `eslint-webpack-plugin` from 2.6.0 to 3.1.1
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-kafka-backend': patch
---
build(deps-dev): bump `@types/jest-when` from 2.7.2 to 3.5.0
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
build(deps): bump `@gitbeaker/core` from 34.6.0 to 35.6.0
-21
View File
@@ -1,21 +0,0 @@
---
'@backstage/core-app-api': patch
'@backstage/core-components': patch
'@backstage/core-plugin-api': patch
'@backstage/version-bridge': patch
'@backstage/plugin-catalog-graph': patch
'@backstage/plugin-catalog-import': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-git-release-manager': patch
'@backstage/plugin-kafka': patch
'@backstage/plugin-kubernetes': patch
'@backstage/plugin-lighthouse': patch
'@backstage/plugin-rollbar': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-search-react': patch
'@backstage/plugin-search': patch
'@backstage/plugin-techdocs-react': patch
'@backstage/plugin-techdocs': patch
---
build(deps-dev): bump `@testing-library/react-hooks` from 7.0.2 to 8.0.0
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
build(deps): bump `@spotify/eslint-config-base` from 12.0.0 to 13.0.0
-64
View File
@@ -1,64 +0,0 @@
---
'@backstage/core-app-api': patch
'@backstage/core-components': patch
'@backstage/core-plugin-api': patch
'@backstage/dev-utils': patch
'@backstage/integration-react': patch
'@backstage/test-utils': patch
'@backstage/plugin-airbrake': patch
'@backstage/plugin-allure': patch
'@backstage/plugin-analytics-module-ga': patch
'@backstage/plugin-apache-airflow': patch
'@backstage/plugin-api-docs': patch
'@backstage/plugin-azure-devops': patch
'@backstage/plugin-badges': patch
'@backstage/plugin-bitrise': patch
'@backstage/plugin-catalog-graph': patch
'@backstage/plugin-catalog-import': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-catalog': patch
'@backstage/plugin-circleci': patch
'@backstage/plugin-cloudbuild': patch
'@backstage/plugin-code-climate': patch
'@backstage/plugin-code-coverage': patch
'@backstage/plugin-config-schema': patch
'@backstage/plugin-cost-insights': patch
'@backstage/plugin-explore-react': patch
'@backstage/plugin-explore': patch
'@backstage/plugin-firehydrant': patch
'@backstage/plugin-fossa': patch
'@backstage/plugin-gcalendar': patch
'@backstage/plugin-gcp-projects': patch
'@backstage/plugin-git-release-manager': patch
'@backstage/plugin-github-actions': patch
'@backstage/plugin-github-deployments': patch
'@backstage/plugin-gitops-profiles': patch
'@backstage/plugin-gocd': patch
'@backstage/plugin-graphiql': patch
'@backstage/plugin-home': patch
'@backstage/plugin-ilert': patch
'@backstage/plugin-jenkins': patch
'@backstage/plugin-kafka': patch
'@backstage/plugin-kubernetes': patch
'@backstage/plugin-lighthouse': patch
'@backstage/plugin-newrelic': patch
'@backstage/plugin-org': patch
'@backstage/plugin-pagerduty': patch
'@backstage/plugin-periskop': patch
'@backstage/plugin-rollbar': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-search': patch
'@backstage/plugin-sentry': patch
'@backstage/plugin-shortcuts': patch
'@backstage/plugin-sonarqube': patch
'@backstage/plugin-splunk-on-call': patch
'@backstage/plugin-stack-overflow': patch
'@backstage/plugin-tech-insights': patch
'@backstage/plugin-tech-radar': patch
'@backstage/plugin-techdocs': patch
'@backstage/plugin-todo': patch
'@backstage/plugin-user-settings': patch
'@backstage/plugin-xcmetrics': patch
---
build(deps): bump `@testing-library/user-event` from 13.5.0 to 14.0.0
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
build(deps): bump `@spotify/eslint-config-typescript`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
build(deps): bump `@spotify/eslint-config-react` from 12.0.0 to 13.0.0
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
build(deps): bump `npm-packlist` from 3.0.0 to 5.0.0
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-api-docs': patch
---
build(deps): bump `@asyncapi/react-component`
-63
View File
@@ -1,63 +0,0 @@
---
'@backstage/plugin-permission-node': minor
---
**BREAKING**: Stronger typing in `PermissionPolicy` 🎉.
Previously, it was entirely the responsibility of the `PermissionPolicy` author to only return `CONDITIONAL` decisions for permissions that are associated with a resource, and to return the correct kind of `PermissionCondition` instances inside the decision. Now, the policy authoring helpers provided in this package now ensure that the decision and permission match.
**For policy authors**: rename and adjust api of `createConditionExports`. Previously, the function returned a factory for creating conditional decisions named `createPolicyDecision`, which had a couple of drawbacks:
1. The function always creates a _conditional_ policy decision, but this was not reflected in the name.
2. Conditional decisions should only ever be returned from `PermissionPolicy#handle` for resource permissions, but there was nothing in the API that encoded this constraint.
This change addresses the drawbacks above by making the following changes for policy authors:
- The `createPolicyDecision` method has been renamed to `createConditionalDecision`.
- Along with conditions, the method now accepts a permission, which must be a `ResourcePermission`. This is expected to be the handled permission in `PermissionPolicy#handle`, whose type must first be narrowed using methods like `isPermission` and `isResourcePermission`:
```typescript
class TestPermissionPolicy implements PermissionPolicy {
async handle(
request: PolicyQuery<Permission>,
_user?: BackstageIdentityResponse,
): Promise<PolicyDecision> {
if (
// Narrow type of `request.permission` to `ResourcePermission<'catalog-entity'>
isResourcePermission(request.permission, RESOURCE_TYPE_CATALOG_ENTITY)
) {
return createCatalogConditionalDecision(
request.permission,
catalogConditions.isEntityOwner(
_user?.identity.ownershipEntityRefs ?? [],
),
);
}
return {
result: AuthorizeResult.ALLOW,
};
```
**BREAKING**: when creating `PermissionRule`s, provide a `resourceType`.
```diff
export const isEntityOwner = createCatalogPermissionRule({
name: 'IS_ENTITY_OWNER',
description: 'Allow entities owned by the current user',
+ resourceType: RESOURCE_TYPE_CATALOG_ENTITY,
apply: (resource: Entity, claims: string[]) => {
if (!resource.relations) {
return false;
}
return resource.relations
.filter(relation => relation.type === RELATION_OWNED_BY)
.some(relation => claims.includes(relation.targetRef));
},
toQuery: (claims: string[]) => ({
key: 'relations.ownedBy',
values: claims,
}),
});
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-search-backend': patch
---
Use `PermissionEvaluator` instead of `PermissionAuthorizer`, which is now deprecated.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-app-api': patch
---
Refactored the route collection logic to prepare for future changes and avoid duplicate element tree traversal for the analytics context.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-tasks': minor
---
Adds the ability to manually trigger tasks which are registered
-14
View File
@@ -1,14 +0,0 @@
---
'@backstage/plugin-permission-common': minor
---
Refactor api types into more specific, decoupled names.
- **BREAKING:**
- Renamed `AuthorizeDecision` to `EvaluatePermissionResponse`
- Renamed `AuthorizeQuery` to `EvaluatePermissionRequest`
- Renamed `AuthorizeRequest` to `EvaluatePermissionRequestBatch`
- Renamed `AuthorizeResponse` to `EvaluatePermissionResponseBatch`
- Renamed `Identified` to `IdentifiedPermissionMessage`
- Add `PermissionMessageBatch` helper type
- Add `ConditionalPolicyDecision`, `DefinitivePolicyDecision`, and `PolicyDecision` types from `@backstage/plugin-permission-node`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog': patch
---
Corrected replacements for depreciated FilteredEntityLayout items
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-search-backend': minor
---
**BREAKING**: The `authorization` property is no longer returned on search results when queried. Note: this will only result in a breaking change if you have custom code in your frontend that relies on the `authorization.resourceRef` property on documents.
-19
View File
@@ -1,19 +0,0 @@
---
'@backstage/create-app': patch
---
Remove the `knex` package that is installed in the `packages/backend` as it's provided by the `@backstage/*` packages for you automatically. You can make the following change in your `packages/backend/package.json` if you wish to apply this change.
```diff
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
"clean": "backstage-cli package clean",
- "migrate:create": "knex migrate:make -x ts"
```
```diff
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
- "knex": "^0.21.6",
"pg": "^8.3.0",
```
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-user-settings': patch
---
Wired up the OneLogin provider to be visible in the Settings UI when configured correctly.
Previously it wasn't visible at all.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-sentry': patch
---
Exposed options for the material table
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/cli': patch
---
Introduced a new experimental test configuration with a number of changes. It switches the coverage provider from `v8` to the default Babel provider, along with always enabling source maps in the Sucrase transform. It also adds a custom module loader that caches both file transforms and VM script objects across all projects in a test run, which provides a big performance boost when running tests from the project root, increasing speed and reducing memory usage.
This new configuration is not enabled by default. It is enabled by setting the environment variable `BACKSTAGE_NEXT_TESTS` to a non-empty value.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-node': minor
---
**BREAKING**: Removed the deprecated `id` and `entity` fields from `BackstageSignInResult`.
-10
View File
@@ -1,10 +0,0 @@
---
'@backstage/plugin-search-react': patch
---
api-report clean up - the package now exports following additional types:
`SearchContextProviderProps`
`SearchContextValue`
`SearchContextProviderForStorybookProps`
`SearchApiProviderForStorybookProps`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-search': patch
---
Support customizing the content of the `SidebarSearchModal`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Add BackstageTab to overridableComponents so can override styles in a theme
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder': patch
---
Changed input label for owner field in GitlabRepoPicker
-8
View File
@@ -1,8 +0,0 @@
---
'@backstage/plugin-permission-node': minor
---
**BREAKING:**
- Rename `PolicyAuthorizeQuery` to `PolicyQuery`
- Remove `PolicyDecision`, `DefinitivePolicyDecision`, and `ConditionalPolicyDecision`. These types are now exported from `@backstage/plugin-permission-common`
-8
View File
@@ -1,8 +0,0 @@
---
'@backstage/plugin-permission-common': patch
---
Added `PermissionEvaluator`, which will replace the existing `PermissionAuthorizer` interface. This new interface provides stronger type safety and validation by splitting `PermissionAuthorizer.authorize()` into two methods:
- `authorize()`: Used when the caller requires a definitive decision.
- `authorizeConditional()`: Used when the caller can optimize the evaluation of any conditional decisions. For example, a plugin backend may want to use conditions in a database query instead of evaluating each resource in memory.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-user-settings': patch
---
Dynamically layout User Settings theme toggle container
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-catalog-react': patch
---
Decouple tags picker from backend entities
`EntityTagPicker` fetches all the tags independently and it doesn't require all the entities to be available client side.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend-module-msgraph': patch
---
Now plugin configuration accept a new optional parameter `groupSelect` which allow the client to fetch defined fields from the ms-graph api.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-home': patch
---
- Adds new `HomePageStackOverflowQuestions` component which renders a list of stack overflow questions on your homepage.
- Exports `ComponentRenderer` type.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-permission-node': minor
---
**BREAKING:** `ServerPermissionClient` now implements `PermissionEvaluator`, which moves out the capabilities for evaluating conditional decisions from `authorize()` to `authorizeConditional()` method.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
**DEPRECATION**: The `getEntityClaims` helper has been deprecated, with `getDefaultOwnershipEntityRefs` being added to replace it.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-jenkins-backend': patch
---
Use `PermissionEvaluator` instead of `PermissionAuthorizer`, which is now deprecated.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-badges-backend': patch
---
allow overriding `DefaultBadgeBuilder.getMarkdownCode`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-kubernetes': patch
---
export kubernetes components
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-tech-insights-node': patch
---
Adds an optional timeout to fact retriever registrations to stop a task if it runs too long.
-76
View File
@@ -1,76 +0,0 @@
---
'@backstage/plugin-catalog-backend-module-aws': patch
---
Add a new provider `AwsS3EntityProvider` as replacement for `AwsS3DiscoveryProcessor`.
In order to migrate from the `AwsS3DiscoveryProcessor` you need to apply
the following changes:
**Before:**
```yaml
# app-config.yaml
catalog:
locations:
- type: s3-discovery
target: https://sample-bucket.s3.us-east-2.amazonaws.com/prefix/
```
```ts
/* packages/backend/src/plugins/catalog.ts */
import { AwsS3DiscoveryProcessor } from '@backstage/plugin-catalog-backend-module-aws';
const builder = await CatalogBuilder.create(env);
/** ... other processors ... */
builder.addProcessor(new AwsS3DiscoveryProcessor(env.reader));
```
**After:**
```yaml
# app-config.yaml
catalog:
providers:
awsS3:
yourProviderId: # identifies your dataset / provider independent of config changes
bucketName: sample-bucket
prefix: prefix/ # optional
region: us-east-2 # optional, uses the default region otherwise
```
```ts
/* packages/backend/src/plugins/catalog.ts */
import { AwsS3EntityProvider } from '@backstage/plugin-catalog-backend-module-aws';
const builder = await CatalogBuilder.create(env);
/** ... other processors and/or providers ... */
builder.addEntityProvider(
...AwsS3EntityProvider.fromConfig(env.config, {
logger: env.logger,
schedule: env.scheduler.createScheduledTaskRunner({
frequency: Duration.fromObject({ minutes: 30 }),
timeout: Duration.fromObject({ minutes: 3 }),
}),
}),
);
```
For simple setups, you can omit the provider ID at the config
which has the same effect as using `default` for it.
```yaml
# app-config.yaml
catalog:
providers:
awsS3:
# uses "default" as provider ID
bucketName: sample-bucket
prefix: prefix/ # optional
region: us-east-2 # optional, uses the default region otherwise
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-todo-backend': patch
---
Fix method to get source-location.
-25
View File
@@ -1,25 +0,0 @@
---
'@backstage/plugin-org': patch
---
Provides the ability to hide the relations toggle on the `OwnershipCard` as well as setting a default relation type.
To hide the toggle simply include the `hideRelationsToggle` prop like this:
```tsx
<EntityOwnershipCard
variant="gridItem"
entityFilterKind={customEntityFilterKind}
hideRelationsToggle
/>
```
To set the default relation type, add the `relationsType` prop with a value of direct or aggregated, the default if not provided is direct. Here is an example:
```tsx
<EntityOwnershipCard
variant="gridItem"
entityFilterKind={customEntityFilterKind}
relationsType="aggregated"
/>
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Added an experimental `package fix` command which applies automated fixes to the target package. The initial fix that is available is to add missing monorepo dependencies to the target package.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-search-common': patch
---
- Introduce `SearchDocument` type. This type contains the subset of `IndexableDocument` properties relevant to the frontend, and is intended to be used for documents returned to the frontend from the search API.
- `SearchResultSet` is now a wrapper for documents of type `SearchDocument`, and is intended to be used in the frontend. This isn't a breaking change, since `IndexableDocument`s are valid `SearchDocument`s, so the old and new types are compatible.
- Introduce `IndexableResultSet` type, which wraps `IndexableDocument` instances in the same way as `SearchResultSet`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
The backend will no longer fail to start up when configured secrets do not match the configuration schema.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Stop logging "Stopped watcher" when shutting down the development backend.
-61
View File
@@ -1,61 +0,0 @@
---
'@backstage/plugin-kubernetes-backend': minor
---
**BREAKING** Custom cluster suppliers need to cache their getClusters result
To allow custom `KubernetesClustersSupplier` instances to refresh the list of clusters
the `getClusters` method is now called whenever the list of clusters is needed.
Existing `KubernetesClustersSupplier` implementations will need to ensure that `getClusters`
can be called frequently and should return a cached result from `getClusters` instead.
For example, here's a simple example of a custom supplier in `packages/backend/src/plugins/kubernetes.ts`:
```diff
-import { KubernetesBuilder } from '@backstage/plugin-kubernetes-backend';
+import {
+ ClusterDetails,
+ KubernetesBuilder,
+ KubernetesClustersSupplier,
+} from '@backstage/plugin-kubernetes-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
+import { Duration } from 'luxon';
+
+export class CustomClustersSupplier implements KubernetesClustersSupplier {
+ constructor(private clusterDetails: ClusterDetails[] = []) {}
+
+ static create(refreshInterval: Duration) {
+ const clusterSupplier = new CustomClustersSupplier();
+ // setup refresh, e.g. using a copy of https://github.com/backstage/backstage/blob/master/plugins/search-backend-node/src/runPeriodically.ts
+ runPeriodically(
+ () => clusterSupplier.refreshClusters(),
+ refreshInterval.toMillis(),
+ );
+ return clusterSupplier;
+ }
+
+ async refreshClusters(): Promise<void> {
+ this.clusterDetails = []; // fetch from somewhere
+ }
+
+ async getClusters(): Promise<ClusterDetails[]> {
+ return this.clusterDetails;
+ }
+}
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
- const { router } = await KubernetesBuilder.createBuilder({
+ const builder = await KubernetesBuilder.createBuilder({
logger: env.logger,
config: env.config,
- }).build();
+ });
+ builder.setClusterSupplier(
+ CustomClustersSupplier.create(Duration.fromObject({ minutes: 60 })),
+ );
+ const { router } = await builder.build();
```
-30
View File
@@ -1,30 +0,0 @@
---
'@backstage/plugin-org': patch
---
Introduced a new MyGroupsSidebarItem SidebarItem that links to one or more groups based on the logged in user's membership.
To use MyGroupsSidebarItem you'll need to add it to your `Root.tsx` like this:
```diff
// app/src/components/Root/Root.tsx
+ import { MyGroupsSidebarItem } from '@backstage/plugin-org';
+ import GroupIcon from '@material-ui/icons/People';
<SidebarPage>
<Sidebar>
//...
<SidebarGroup label="Menu" icon={<MenuIcon />}>
{/* Global nav, not org-specific */}
//...
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
+ <MyGroupsSidebarItem
+ singularTitle="My Squad"
+ pluralTitle="My Squads"
+ icon={GroupIcon}
+ />
//...
</SidebarGroup>
</ Sidebar>
</SidebarPage>
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-react': patch
---
Changed catalog filter components to only pay attention to query parameters relevant to the component.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': minor
---
**BREAKING**: All sign-in resolvers must now return a `token` in their sign-in result. Returning an `id` is no longer supported.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Adjust the error messages when entities fail validation, to clearly state what entity that failed it
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Declare oauth2 `clientSecret` with visibility secret
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend-module-aws': patch
---
Corrected title and URL to setup documentation in README
-13
View File
@@ -1,13 +0,0 @@
---
'@backstage/create-app': patch
---
Removed `@octokit/rest` and `@gitbeaker/node` from backend dependencies as these are unused in the default app.
To apply these changes to your existing app, remove the following lines from the `dependencies` section of `packages/backend/package.json`
```diff
"@backstage/plugin-techdocs-backend": "^1.0.0",
- "@gitbeaker/node": "^34.6.0",
- "@octokit/rest": "^18.5.3",
```
-8
View File
@@ -1,8 +0,0 @@
---
'@backstage/plugin-search-backend': patch
'@backstage/plugin-search-backend-node': patch
'@backstage/plugin-search-backend-module-elasticsearch': patch
'@backstage/plugin-search-backend-module-pg': patch
---
Use new `IndexableResultSet` type as return type of query method in `SearchEngine` implementation.
-25
View File
@@ -1,25 +0,0 @@
---
'@backstage/create-app': patch
---
Add type resolutions for `@types/react` and `types/react-dom`.
The reason for this is the usage of `"@types/react": "*"` as a dependency which is very common practice in react packages. This recently resolves to react 18 which introduces several breaking changes in both internal and external packages.
To apply these changes to your existing installation, add a resolutions block to your `package.json`
```json
"resolutions": {
"@types/react": "^17",
"@types/react-dom": "^17"
},
```
If your existing app depends on react 16, use this resolution block instead.
```json
"resolutions": {
"@types/react": "^16",
"@types/react-dom": "^16"
},
```
-63
View File
@@ -1,63 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
**DEPRECATION**: All `create<Provider>Provider` and `<provider>*SignInResolver` have been deprecated. Instead, a single `providers` object is exported which contains all built-in auth providers.
If you have a setup that currently looks for example like this:
```ts
import {
createRouter,
defaultAuthProviderFactories,
createGoogleProvider,
googleEmailSignInResolver,
} from '@backstage/plugin-auth-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
return await createRouter({
...env,
providerFactories: {
...defaultAuthProviderFactories,
google: createGoogleProvider({
signIn: {
resolver: googleEmailSignInResolver,
},
}),
},
});
}
```
You would migrate it to something like this:
```ts
import {
createRouter,
providers,
defaultAuthProviderFactories,
} from '@backstage/plugin-auth-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
return await createRouter({
...env,
providerFactories: {
...defaultAuthProviderFactories,
google: providers.google.create({
signIn: {
resolver:
providers.google.resolvers.emailMatchingUserEntityAnnotation(),
},
}),
},
});
}
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Added `spec.profile.displayName` to search index for Group kinds
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-app-api': patch
---
fixed empty body issue for POST requests using FetchAPI with 'plugin://' prefix
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-stack-overflow-backend': minor
---
Add stack overflow backend plugin
-8
View File
@@ -1,8 +0,0 @@
---
'@backstage/plugin-permission-backend': patch
'@backstage/plugin-permission-react': patch
'@backstage/plugin-search-backend': patch
'@backstage/test-utils': patch
---
Use updated types from `@backstage/plugin-permission-common`
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-catalog-common': patch
'@backstage/plugin-jenkins-common': patch
---
Use `createPermission` helper when creating permissions.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-org': patch
---
add aggregated ownership type for kind group in OwnershipCard
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': minor
---
**BREAKING:** Mark CatalogBuilder#addPermissionRules as @alpha.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Enable internal batching of very large deletions, to not run into SQL binding limits
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog': patch
---
Added tableOptions property to CatalogTable and DefaultCatalogPage to support customization of the Catalog Table. Related issue #10453
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': minor
---
Add new `draft` option to the `publish:github:pull-request` action.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Applied the fix from version 0.12.3 of this package, which is part of the v1.0.1 release of Backstage.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder': minor
---
The Template Preview page has been renamed to Template Editor, and is not available at the `/edit` path instead. There is a redirect in place from `/preview`.
-58
View File
@@ -1,58 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
**DEPRECATION** The `AuthResolverContext` has received a number of changes, which is the context used by auth handlers and sign-in resolvers.
The following fields deprecated: `logger`, `tokenIssuer`, `catalogIdentityClient`. If you need to access the `logger`, you can do so through a closure instead. The `tokenIssuer` has been replaced with an `issueToken` method, which is available directory on the context. The `catalogIdentityClient` has been replaced by the `signInWithCatalogUser` method, as well as the lower level `findCatalogUser` method and `getDefaultOwnershipEntityRefs` helper.
It should be possible to migrate most sign-in resolvers to more or less only use `signInWithCatalogUser`, for example an email lookup resolver like this one:
```ts
async ({ profile }, ctx) => {
if (!profile.email) {
throw new Error('Profile contained no email');
}
const entity = await ctx.catalogIdentityClient.findUser({
annotations: {
'acme.org/email': profile.email,
},
});
const claims = getEntityClaims(entity);
const token = await ctx.tokenIssuer.issueToken({ claims });
return { id: entity.metadata.name, entity, token };
};
```
can be migrated to the following:
```ts
async ({ profile }, ctx) => {
if (!profile.email) {
throw new Error('Profile contained no email');
}
return ctx.signInWithCatalogUser({
annotations: {
'acme.org/email': profile.email,
},
});
};
```
While a direct entity name lookup using a user ID might look like this:
```ts
async ({ result: { fullProfile } }, ctx) => {
return ctx.signInWithCatalogUser({
entityRef: {
name: fullProfile.userId,
},
});
};
```
If you want more control over the way that users are looked up, ownership is assigned, or tokens are issued, you can use a combination of the `findCatalogUser`, `getDefaultOwnershipEntityRefs`, and `issueToken` instead.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-graph': patch
---
Added renderNode and renderLabel property to EntityRelationsGraph to support customization using CustomNode and CustomLabel components
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-tech-insights-backend': patch
---
Updated README.md with better install instructions
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
Added the GerritUrlReader that implements "readUrl".
-84
View File
@@ -1,84 +0,0 @@
---
'@backstage/plugin-search-backend-node': minor
'@backstage/create-app': patch
---
**BREAKING**: `IndexBuilder.addCollator()` now requires a `schedule` parameter (replacing `defaultRefreshIntervalSeconds`) which is expected to be a `TaskRunner` that is configured with the desired search indexing schedule for the given collator.
`Scheduler.addToSchedule()` now takes a new parameter object (`ScheduleTaskParameters`) with two new options `id` and `scheduledRunner` in addition to the migrated `task` argument.
NOTE: The search backend plugin now creates a dedicated database for coordinating indexing tasks.
To make this change to an existing app, make the following changes to `packages/backend/src/plugins/search.ts`:
```diff
+import { Duration } from 'luxon';
/* ... */
+ const schedule = env.scheduler.createScheduledTaskRunner({
+ frequency: Duration.fromObject({ minutes: 10 }),
+ timeout: Duration.fromObject({ minutes: 15 }),
+ initialDelay: Duration.fromObject({ seconds: 3 }),
+ });
indexBuilder.addCollator({
- defaultRefreshIntervalSeconds: 600,
+ schedule,
factory: DefaultCatalogCollatorFactory.fromConfig(env.config, {
discovery: env.discovery,
tokenManager: env.tokenManager,
}),
});
indexBuilder.addCollator({
- defaultRefreshIntervalSeconds: 600,
+ schedule,
factory: DefaultTechDocsCollatorFactory.fromConfig(env.config, {
discovery: env.discovery,
tokenManager: env.tokenManager,
}),
});
const { scheduler } = await indexBuilder.build();
- setTimeout(() => scheduler.start(), 3000);
+ scheduler.start();
/* ... */
```
NOTE: For scenarios where the `lunr` search engine is used in a multi-node configuration, a non-distributed `TaskRunner` like the following should be implemented to ensure consistency across nodes (alternatively, you can configure
the search plugin to use a non-distributed DB such as [SQLite](https://backstage.io/docs/tutorials/configuring-plugin-databases#postgresql-and-sqlite-3)):
```diff
+import { TaskInvocationDefinition, TaskRunner } from '@backstage/backend-tasks';
/* ... */
+ const schedule: TaskRunner = {
+ run: async (task: TaskInvocationDefinition) => {
+ const startRefresh = async () => {
+ while (!task.signal?.aborted) {
+ try {
+ await task.fn(task.signal);
+ } catch {
+ // ignore intentionally
+ }
+
+ await new Promise(resolve => setTimeout(resolve, 600 * 1000));
+ }
+ };
+ startRefresh();
+ },
+ };
indexBuilder.addCollator({
- defaultRefreshIntervalSeconds: 600,
+ schedule,
factory: DefaultCatalogCollatorFactory.fromConfig(env.config, {
discovery: env.discovery,
tokenManager: env.tokenManager,
}),
});
/* ... */
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-search': patch
---
Switch to `SearchDocument` type in `DefaultResultListItem` props
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Defensively encode URL parameters when fetching ELB keys
-14
View File
@@ -1,14 +0,0 @@
---
'@backstage/backend-tasks': patch
---
Fixed the `initialDelay` parameter of tasks to properly make task workers
_always_ wait before the first invocations on startup, not just the very first
time that the task is ever created. This behavior is more in line with
expectations. Callers to not need to update their code.
Also clarified in the doc comment for the field that this wait applies only on
an individual worker level. That is, if you have a cluster of workers then each
individual machine may postpone its first task invocation by the given amount of
time to leave room for the service to settle, but _other_ workers may still
continue to invoke the task on the regular cadence in the meantime.

Some files were not shown because too many files have changed in this diff Show More