docs/releases/v1.29.0-changelog.md
Upgrade Helper: https://backstage.github.io/upgrade-helper/?to=1.29.0
getPath option from httpRouterServiceFactory, as well as the HttpRouterFactoryOptions type.defaultServiceFactories option of createSpecializedBackend. This is an immediate breaking change as usage of this function is expected to be very rare.ServiceFactoryTest.get method was deprecated and the ServiceFactoryTest.getSubject should be used instead. The getSubject method has the same behavior, but has a better method name to indicate that the service instance returned is the subject currently being tested.() => BackendFeature) has been deprecated. This typically means that you need to update the installed features to use the latest version of @backstage/backend-plugin-api. If the feature is from a third-party package, please reach out to the package maintainer to update it.MiddlewareFactory deprecation wrappinggetPath option from httpRouterServiceFactory, as well as the HttpRouterFactoryOptions type.ServiceFactoryTest.get method was deprecated and the ServiceFactoryTest.getSubject should be used instead. The getSubject method has the same behavior, but has a better method name to indicate that the service instance returned is the subject currently being tested.rootHttpRouterServiceFactory to allow it to be constructed with options, but without declaring options via createServiceFactory.rootConfigServiceFactory to allow it to be constructed with options, but without declaring options via createServiceFactory.PermissionsService no longer supports passing the deprecated token option, and the request options are now required.53ced70: Added a new Root Health Service which adds new endpoints for health checks.
083eaf9: Fix bug where ISO durations could no longer be used for schedules
062c01c: Deprecated the ability to define options for service factories through createServiceFactory. In the future all service factories will return a plain ServiceFactory object, rather than allowing users to pass options to the factory. To allow for customization of a service implementation one can instead export one or a few building blocks that allows for simple re-implementation of the service instead.
For example, instead of:
export const fooServiceFactory = createServiceFactory<FooService>(
(options?: { bar: string }) => ({
service: fooServiceRef,
deps: { logger: coreServices.logger },
factory({ logger }) {
return {
// Implementation of the foo service using the `bar` option.
};
},
}),
);
We instead encourage service implementations to provide an easy to use API for re-implementing the service for advanced use-cases:
/** @public */
export class DefaultFooService implements FooService {
static create(options: { bar: string; logger: LoggerService }) {
return new DefaultFooService(options.logger, options.bar ?? 'default');
}
private constructor(
private readonly logger: string,
private readonly bar: string,
) {}
// The rest of the implementation
}
A user that wishes to customize the service can then easily do so by defining their own factory:
export const customFooServiceFactory = createServiceFactory<FooService>({
service: fooServiceRef,
deps: { logger: coreServices.logger },
factory({ logger }) {
return DefaultFooService.create({ logger, bar: 'baz' });
},
});
This is of course more verbose than the previous solution where the factory could be customized through fooServiceFactory({ bar: 'baz' }), but this is a simplified which in practice should be using static configuration instead.
In cases where the old options patterns significantly improves the usability of the service factory, the old pattern can still be implemented like this:
const fooServiceFactoryWithOptions = (options?: { bar: string }) =>
createServiceFactory<FooService>({
service: fooServiceRef,
deps: { logger: coreServices.logger },
factory({ logger }) {
return {
// Implementation of the foo service using the `bar` option.
};
},
});
export const fooServiceFactory = Object.assign(
fooServiceFactoryWithOptions,
fooServiceFactoryWithOptions(),
);
This change is being made because the ability to define an options callback encourages bad design of services factories. When possible, a service should be configurable through static configuration, and the existence of options may discourage that. More importantly though, the existing options do not work well with the dependency injection system of services, which is a problem for callbacks an other more advanced options. This lead to a bad pattern where only a few explicit dependencies where made available in callbacks, rather than providing an API that allowed simple re-implementation of the service with full access to dependency injection.
A separate benefit of this change is that it simplifies the TypeScript types in a way that allows TypeScript to provide a much better error message when a service factory doesn't properly implement the service interface.
fe47a3e: All service config types were renamed to option types in order to standardize frontend and backend create* function signatures:
ServiceRefConfig type was renamed toServiceRefOptions;RootServiceFactoryConfig type was renamed to RootServiceFactoryOptions;PluginServiceFactoryConfig type was renamed to PluginServiceFactoryOptionsUpdated dependencies
d3c39fc: Allow for the disabling of external routes through config, which was rendered impossible after the introduction of default targets.
app:
routes:
bindings:
# This has the effect of removing the button for registering new
# catalog entities in the scaffolder template list view
scaffolder.registerComponent: false
token for bitbucketCloud integrationcb32ca7: BREAKING: readLdapOrg and the LdapProviderConfig type now always accept arrays of user and group configs, not just single items.
Added support for single ldap catalog provider to provide list and undefined user and group bindings next to standard single one.
token option from EvaluatorRequestOptions. The PermissionsClient now has its own PermissionClientRequestOptions type that declares the token option instead.ServerPermissionClient to match the new PermissionsService interface, where the deprecated token option has been removed and the options are now required.ed10fd2: The PermissionPolicy interface has been updated to align with the recent changes to the Backstage auth system. The second argument to the handle method is now of the new PolicyQueryUser type. This type maintains the old fields from the BackstageIdentityResponse, which are now all deprecated. Instead, two new fields have been added, which allows access to the same information:
credentials - A BackstageCredentials object, which is useful for making requests to other services on behalf of the user as part of evaluating the policy. This replaces the deprecated token field. See the Auth Service documentation for information about how to create a token using these credentials.info - A BackstageUserInfo object, which contains the same information as the deprecated identity, except for the type field that was redundant.Most existing policies can be updated by replacing the BackstageIdentityResponse type with PolicyQueryUser, which is exported from @backstage/plugin-permission-node, as well as replacing any occurrences of user?.identity with user?.info.
28b2cfb: Fix invalid cross-reference in API Reference docs
Updated dependencies
EntityPicker as done earlier with MultiEntityPicker to fix performance issues with large data sets. VirtualizedListbox extracted into reusable component.MultiEntityPicker. Fixes performance issues with large data sets.bitbucketCloud autocomplete in RepoUrlPickerRepoUrlPicker would still require the owner field for azure@rjsf/utils to 5.18.5.
Updated dependency @rjsf/core to 5.18.5.
Updated dependency @rjsf/material-ui to 5.18.5.
Updated dependency @rjsf/validator-ajv8 to 5.18.5.catalogFilter array on OwnedEntityPickerautocomplete extension point to provide additional autocomplete handlerscatalog:write scaffolder action to show correct file path location in log messageesbuild to ^0.21.0.ccfc9d1: Fixed bug resulting from missing required owner and repo arguments in getEnvironmentPublicKey in action github:environment:create.
Adding environment secrets now works as expected.
141f366: Added action to enable GitHub Pages on a repo
4410fed: Fixed issue with octokit call missing owner and repo when creating environment variables and secrets using github:environment:create action
dfaa28d: Adds requireLastPushApproval input property to configure Branch Protection Settings in github:publish action
Adds requireLastPushApproval input property to configure Branch Protection Settings in github:repo:push action
Updated dependencies
bitbucketCloud autocomplete in RepoUrlPicker@rjsf/utils to 5.18.5.
Updated dependency @rjsf/core to 5.18.5.
Updated dependency @rjsf/material-ui to 5.18.5.
Updated dependency @rjsf/validator-ajv8 to 5.18.5.ServiceFactoryTest.get method was deprecated and the ServiceFactoryTest.getSubject should be used instead. The getSubject method has the same behavior, but has a better method name to indicate that the service instance returned is the subject currently being tested.isDockerDisabledForTests is deprecated and will no longer be exported in the near future as it should only be used internally.mockServices.startTestBackend and ServiceFactoryTester to only accept plain service factory or backend feature objects, no longer supporting the callback form. This lines up with the changes to @backstage/backend-plugin-api and should not require any code changes.setupRequestMockHandlers methods to registerMswTestHooks.mockServices.httpAuth.factory to allow it to still be constructed with options, but without declaring options via createServiceFactory.EXPERIMENTAL_MODULE_FEDERATION for the app build, and using the frontend-dynamic-container package role to create a container. Both of these are experimental and will change in the future.winston and yn from the template of backend plugins;
msw to version 2.3.1 in the template of backend plugins;
starting with v1 and switching later to v2 is tedious and not straight forward; it's easier to start with v2;plugin-common in backstage-cli. Now, when executing backstage-cli new to create a new plugin-common package, the output message accurately reflects the action by displaying Creating common plugin package... instead of the previous, less accurate Creating backend plugin....esbuild to ^0.21.0.package.json should be of a unique name to avoid typescript resolution issuesbackendPlugin and backendModule factory now includes a step for automatically adding the new backend plugin/module to the index.ts file of the backend.frontend-dynamic-container role.<Select> component with empty string as placeholder gave an errorSelect component to take in a data-testid parameter ensuring backwards compatibility with default value corresponding to previously hardcoded data-testid of "select".MyGroupsSidebarItem to the sidebar in the create-app templatecreate-app templatecreate-app templated3c39fc: Allow for the disabling of external routes through config, which was rendered impossible after the introduction of default targets.
app:
routes:
bindings:
# This has the effect of removing the button for registering new
# catalog entities in the scaffolder template list view
scaffolder.registerComponent: false
Updated dependencies
setupRequestMockHandlers methods to registerMswTestHooks.setupRequestMockHandlers methods to registerMswTestHooks.autocomplete handler to provide autocomplete options for RepoUrlPickerdefaultEksClusterEntityTransformer to allow library consumers to layer additional changes on top of the default transformer.9112efc: Adds support for repository events.
The provider adds a subscription to the topic github.repository.
Hereby, it supports events of type repository with actions
archiveddeletededitedrenamedtransferredunarchivedActions skipped as they don't require entity changes:
createdprivatizedpublicizedIf the config option validateLocationsExist is enabled, an API request
is necessary and will be executed.
This affects the actions renamed, transferred, and unarchive
of event type repository.
Catalog entities related to the GithubEntityProvider instance will be adjusted
according to action and its meaning for them.
Updated dependencies
catalog.providers.gitlab.<your-org>.restrictUsersToGroup. Setting this to true will make Backstage only import users from the group defined in the group key, instead of all users in the organisation (self-hosted) or of the root group (SaaS). It will default to false, keeping the original implementation intact, when not explicitly set.97caf55: Creates a new module to make logging catalog errors simple. This module subscribes to catalog events and logs them.
See Backstage documentation for details on how to install and configure the plugin.
Updated dependencies
@rjsf/utils to 5.18.5.
Updated dependency @rjsf/core to 5.18.5.
Updated dependency @rjsf/material-ui to 5.18.5.
Updated dependency @rjsf/validator-ajv8 to 5.18.5.@rjsf/utils to 5.18.5.
Updated dependency @rjsf/core to 5.18.5.
Updated dependency @rjsf/material-ui to 5.18.5.
Updated dependency @rjsf/validator-ajv8 to 5.18.5.HTML markup of the FixDialog component, ul and li are not allowed inside a p tag.5132d28: The useGetEntities hook could result in requests to /api/catalog/entities where the headers exceed the default maximum Node.js header size of 16KB. The hook logic has been adjusted to batch the requests.
c307ef4: Added relationType property to EntityMembersListCard component that allows for display users related to a group via some other relationship aside from memberOf.
Also, as a side effect, the relationsType property has been deprecated in favor of a more accurately named relationAggregation property.
Updated dependencies
ed10fd2: The PermissionPolicy interface has been updated to align with the recent changes to the Backstage auth system. The second argument to the handle method is now of the new PolicyQueryUser type. This type maintains the old fields from the BackstageIdentityResponse, which are now all deprecated. Instead, two new fields have been added, which allows access to the same information:
credentials - A BackstageCredentials object, which is useful for making requests to other services on behalf of the user as part of evaluating the policy. This replaces the deprecated token field. See the Auth Service documentation for information about how to create a token using these credentials.info - A BackstageUserInfo object, which contains the same information as the deprecated identity, except for the type field that was redundant.Most existing policies can be updated by replacing the BackstageIdentityResponse type with PolicyQueryUser, which is exported from @backstage/plugin-permission-node, as well as replacing any occurrences of user?.identity with user?.info.
Updated dependencies
PolicyQueryUser type.RepoUrlPicker would still require the owner field for azureautocomplete handler to provide autocomplete options for RepoUrlPickertargetBranch now fetch the default branch from Bitbucket repository.
This prevents from errors when no targetBranch is provided and the default repository branch is different from master, for example: main.variables to gitlab:pipeline:triggerRepoUrlPicker would still require the owner field for azureautocomplete extension point to provide additional autocomplete handlersAuthorizedSearchEngine will now ignore the deprecated token option, and treat it as an unauthorized request. This will not have any effect in practice, since credentials are always provided by the router.