docs/releases/v1.40.0-next.2-changelog.md
Upgrade Helper: https://backstage.github.io/upgrade-helper/?to=1.40.0-next.2
5863b04: BREAKING CHANGES
The createBuiltinActions method has been removed, as this should no longer be needed with the new backend system route, and was only useful when passing the default list of actions again in the old backend system. You should be able to rely on the default behaviour of the new backend system which is to merge the actions.
The createCatalogRegisterAction and createFetchCatalogEntityAction actions no longer require an AuthService, and now accepts a CatalogService instead of CatalogClient.
Unless you're providing your own override action to the default, this should be a non-breaking change.
You can migrate using the following if you're getting typescript errors:
import { catalogServiceRef } from '@backstage/plugin-catalog-node';
import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha';
export const myModule = createBackendModule({
pluginId: 'scaffolder',
moduleId: 'test',
register({ registerInit }) {
registerInit({
deps: {
scaffolder: scaffolderActionsExtensionPoint,
catalog: catalogServiceRef,
},
async init({ scaffolder, catalog }) {
scaffolder.addActions(
createCatalogRegisterAction({
catalog,
}),
createFetchCatalogEntityAction({
catalog,
integrations,
}),
);
},
});
},
});
89a941d: Migrating to latest action format
023629e: Enable usage of secrets within 'each' step of software templates. For example, you can now structure your each step like this:
each:
[
{ name: "Service1", token: "${{ secrets.token1 }}" },
{ name: "Service2", token: "${{ secrets.token2 }}" },
]
e92e481: Add tests for Scaffolder
Updated dependencies
zod schemabackstage.pluginId field in package.json to all default plugin package templates for the new command.406acb6: Add support to customize the about card icon links via EntityIconLinkBlueprint and provide a default catalog view catalog source, launch scaffolder template and read techdocs docs icon links extensions.
BREAKING ALPHA
The Scaffolder launch template and TechDocs read documentation icons have been extracted from the default Catalog about card links and are now provided respectively by the Scaffolder and TechDocs plugins in the new frontend system. It means that they will not be available unless you install the TechDocs and Scaffolder plugins. Also If you are using translation for these icon link titles other than the default, you should now translate them using the scaffolder translation reference or the TechDocs translation reference (the translation keys are still the same, aboutCard.viewTechdocs and aboutCard.launchTemplate).
BitbucketCloudEntityProvider now accepts a CatalogService instead of a CatalogApi.restrictUsersToGroup: true in app-config under your module settings.406acb6: Introduces a new EntityIconLinkBlueprint that customizes the About card icon links on the Catalog entity page.
The blueprint currently accepts a useProps hook as param and this function returns the following props that will be passed to the icon link component:
| Name | Description | Type | Default Value |
|---|---|---|---|
icon | The icon to display. | JSX.Element | N/A |
label | The label for the element. | string | N/A |
title | The title for the element. | string | N/A |
disabled | Whether the element is disabled. | boolean | false |
href | The URL to navigate to when the element is clicked. | string | N/A |
onClick | A function to call when the element is clicked. | () => void | N/A |
Here is an usage example:
import { EntityIconLinkBlueprint } from '@backstage/plugin-catalog-react/alpha';
//...
EntityIconLinkBlueprint.make({
name: 'my-icon-link',
params: {
useProps() {
const { t } = useTranslationRef(myIconLinkTranslationRef);
return {
label: t('myIconLink.label'),
icon: <MyIconLinkIcon />,
href: '/my-plugin',
};
},
},
});
Additionally, the app-config.yaml file allows you to override some of the default icon link parameters, including label and title values. Here's how to set them:
app:
extensions:
- entity-icon-link:my-plugin/my-icon-link:
config:
label: 'My Custom Icon Link label'
Finally, you can disable all links if you want to hide the About card header completely (useful, for example, when links are displayed on separate cards). The header is hidden when no icon links extensions are enabled.
Scaffolder plugin is now responsible for providing an entity icon link extension to launch templates from the catalog entity page.5863b04: BREAKING CHANGES
The createGithubEnvironmentAction action no longer requires an AuthService, and now accepts a CatalogService instead of CatalogClient.
Unless you're providing your own override action to the default, this should be a non-breaking change.
You can migrate using the following if you're getting typescript errors:
import { catalogServiceRef } from '@backstage/plugin-catalog-node';
import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha';
export const myModule = createBackendModule({
pluginId: 'scaffolder',
moduleId: 'test',
register({ registerInit }) {
registerInit({
deps: {
scaffolder: scaffolderActionsExtensionPoint,
catalog: catalogServiceRef,
},
async init({ scaffolder, catalog }) {
scaffolder.addActions(
createGithubEnvironmentAction({
catalog,
}),
);
},
});
},
});
5863b04: BREAKING CHANGES
The legacy methods to define createTemplateActions have been replaced with the new native zod approaches for defining input and output schemas.
You can migrate actions that look like the following with the below examples:
// really old legacy json schema
createTemplateAction<{ repoUrl: string }, { repoOutput: string }>({
id: 'test',
schema: {
input: {
type: 'object'
required: ['repoUrl']
properties: {
repoUrl: {
type: 'string',
description: 'repository url description'
}
}
}
}
});
// old zod method
createTemplateAction({
id: 'test'
schema: {
input: {
repoUrl: z.string({ description: 'repository url description' })
}
}
})
// new method:
createTemplateAction({
id: 'test',
schema: {
input: {
repoUrl: z => z.string({ description: 'repository url description' })
}
}
})
// or for more complex zod types like unions
createTemplateAction({
id: 'test',
schema: {
input: z => z.object({
repoUrl: z.string({ description: 'repository url description' })
})
}
})
This breaking change also means that logStream has been removed entirely from ActionsContext, and that the logger is now just a LoggerService implementation instead. There is no replacement for the logStream, if you wish to still keep using a logStream we recommend that you create your own stream that writes to ctx.logger instead.
3cea7ee: BREAKING CHANGES
Because of the removal of the logStream property to the ActionsContext this has been removed from the createMockActionContext method.
You can remove this as it's no longer supported in the scaffolder actions.
TechDocs plugin is now responsible for providing an entity icon link extension to read documentation from the catalog entity page.user credentials mock behave more like productionenum schema values.HAS_LABEL permission rule, similar to the HAS_ANNOTATION permission rule.WelcomeTitle to properly default to the previous value of inheritcatalogServiceRefcatalogServiceRefoctokit dependency as it was not being used