diff --git a/.changeset/create-app-1716903719.md b/.changeset/create-app-1716903719.md new file mode 100644 index 0000000000..b50d431d4b --- /dev/null +++ b/.changeset/create-app-1716903719.md @@ -0,0 +1,5 @@ +--- +'@backstage/create-app': patch +--- + +Bumped create-app version. diff --git a/.changeset/empty-tables-ring.md b/.changeset/empty-tables-ring.md new file mode 100644 index 0000000000..c83a987228 --- /dev/null +++ b/.changeset/empty-tables-ring.md @@ -0,0 +1,8 @@ +--- +'@backstage/plugin-kubernetes-react': minor +'@backstage/plugin-catalog-import': minor +'@backstage/plugin-kubernetes': patch +'@backstage/plugin-search': patch +--- + +Migrate from identityApi to fetchApi in frontend plugins. diff --git a/.changeset/little-cooks-approve.md b/.changeset/little-cooks-approve.md new file mode 100644 index 0000000000..d4088208ae --- /dev/null +++ b/.changeset/little-cooks-approve.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-notifications': patch +--- + +Fixes performance issue with Notifications title counter. diff --git a/.changeset/pre.json b/.changeset/pre.json index 7a0fc7ed6b..bbf21bc6a4 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -190,33 +190,63 @@ "calm-plums-wink", "cold-seas-end", "create-app-1716302437", + "create-app-1716903719", + "cyan-jobs-visit", "cyan-paws-beg", "cyan-snails-peel", "eighty-kings-dress", + "eighty-yaks-switch", "empty-spoons-tell", + "empty-tables-ring", + "famous-monkeys-count", + "forty-adults-roll", "four-adults-mix", + "friendly-keys-fold", "gentle-baboons-peel", + "gold-teachers-wink", + "great-cougars-guess", "itchy-spoons-cry", + "large-months-decide", "late-ants-impress", "late-students-live", + "little-cooks-approve", "loud-pumpkins-bow", "lovely-hats-pay", "lucky-taxis-rule", "many-moles-sing", "mean-laws-lay", + "neat-rivers-share", "new-numbers-hug", + "nice-pants-shave", + "nine-hairs-kick", "nine-ties-type", "old-trees-check", "olive-mangos-tickle", + "perfect-bikes-invite", + "polite-otters-talk", "rude-kings-press", "seven-geese-raise", + "shaggy-jokes-promise", + "six-llamas-give", "slimy-fans-raise", "smooth-gifts-nail", + "soft-flies-live", "sour-colts-juggle", + "spicy-brooms-hang", "spicy-camels-happen", + "spotty-plants-switch", + "strong-moose-work", + "stupid-tigers-bake", + "tall-lies-fetch", + "tall-pumas-teach", + "tender-seas-listen", + "thirty-plums-shout", "tiny-pandas-return", + "warm-bees-hope", + "weak-gifts-occur", "wet-crabs-guess", "wild-doors-cheat", + "wild-ears-walk", "wise-vans-sin", "wise-wasps-look", "young-camels-return" diff --git a/.changeset/spicy-brooms-hang.md b/.changeset/spicy-brooms-hang.md new file mode 100644 index 0000000000..23f7da309b --- /dev/null +++ b/.changeset/spicy-brooms-hang.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-scaffolder-react': patch +'@backstage/plugin-scaffolder': patch +--- + +Fixing bug in `formData` type as it should be `optional` as it's possibly undefined diff --git a/.changeset/spotty-plants-switch.md b/.changeset/spotty-plants-switch.md new file mode 100644 index 0000000000..a5951de05d --- /dev/null +++ b/.changeset/spotty-plants-switch.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-ldap': minor +--- + +Migrate LDAP catalog module to the new backend system. diff --git a/.changeset/stupid-tigers-bake.md b/.changeset/stupid-tigers-bake.md new file mode 100644 index 0000000000..a4579ab05a --- /dev/null +++ b/.changeset/stupid-tigers-bake.md @@ -0,0 +1,7 @@ +--- +'@backstage/plugin-kubernetes-backend': minor +'@backstage/plugin-kubernetes-common': minor +'@backstage/plugin-kubernetes-react': minor +--- + +Update kubernetes plugins to use autoscaling/v2 diff --git a/.changeset/thirty-plums-shout.md b/.changeset/thirty-plums-shout.md new file mode 100644 index 0000000000..56ac640326 --- /dev/null +++ b/.changeset/thirty-plums-shout.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Added a regex test to check commit hash. If url is from git commit branch ignore the edit url. diff --git a/.github/workflows/api-breaking-changes.yml b/.github/workflows/api-breaking-changes.yml index 9eb8576fd0..d44e524ccb 100644 --- a/.github/workflows/api-breaking-changes.yml +++ b/.github/workflows/api-breaking-changes.yml @@ -41,18 +41,16 @@ jobs: run: | yarn backstage-repo-tools repo schema openapi diff --since origin/${{ github.base_ref }} > comment.md - - name: Upload Rendered Comment as Artifact + - name: clone artifacts to current directory + run: | + cat ${{ github.event_path }} > event.json + + - name: Upload Artifacts uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: name: preview-spec - path: comment.md - retention-days: 2 - overwrite: true - - - name: Upload PR Event as Artifact - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 - with: - name: preview-spec - path: ${{ github.event_path }} + path: | + comment.md + event.json retention-days: 2 overwrite: true diff --git a/.github/workflows/uffizzi-build.yml b/.github/workflows/uffizzi-build.yml index 6df4eeed4e..b5de0b1cf0 100644 --- a/.github/workflows/uffizzi-build.yml +++ b/.github/workflows/uffizzi-build.yml @@ -97,18 +97,19 @@ jobs: kustomize edit set image backstage=${{ needs.build-backstage.outputs.tags }} kustomize build . > manifests.rendered.yml cat manifests.rendered.yml - - name: Upload Rendered Manifests File as Artifact + + - name: clone artifacts into current directory + run: | + cat ${{ github.event_path }} > event.json + cp ./.github/uffizzi/k8s/manifests/manifests.rendered.yml manifests.rendered.yml + + - name: Upload Artifacts uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: name: preview-spec - path: ./.github/uffizzi/k8s/manifests/manifests.rendered.yml - retention-days: 2 - overwrite: true - - name: Upload PR Event as Artifact - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 - with: - name: preview-spec - path: ${{ github.event_path }} + path: | + manifests.rendered.yml + event.json retention-days: 2 overwrite: true diff --git a/docs/backend-system/architecture/03-services.md b/docs/backend-system/architecture/03-services.md index 573f6612c2..93326eb0d9 100644 --- a/docs/backend-system/architecture/03-services.md +++ b/docs/backend-system/architecture/03-services.md @@ -111,7 +111,7 @@ There are only two possible scopes for services, `'plugin'` and `'root'`. ## Root Scoped Services -If a service is defined as a root scoped service, the implementation created by the factory will be shared across all plugins and services. One other differentiating factory for root scoped services is that they are always initialized, regardless of whether any plugins depend on them or not. This makes them suitable for implementing backend-wide concerns that are not specific to any individual plugin. +If a service is defined as a root scoped service, the implementation created by the factory will be shared across all plugins and services. One other differentiating factor for root scoped services is that they are always initialized, regardless of whether any plugins depend on them or not. This makes them suitable for implementing backend-wide concerns that are not specific to any individual plugin. There is a limitation in the usage of root scoped services, which is that their implementation can only depend on other root scoped services. Plugin scoped services on the other hand can depend on both root and plugin scoped services. Because of this limitation, one of the main reasons to define a root scoped services is to make it possible for other root scoped services to depend on it. @@ -157,7 +157,7 @@ export const fooServiceFactory = createServiceFactory({ }); ``` -Whatever value is returned by the `createRootContext` function will shared and passed as the second argument to each invocation of the `factory` function. That way you can create a shared context that is used in the creation of each plugin instance. Unlike the `factory` function, the `createRootContext` function will only receive root scoped services as its dependencies, but just like the `factory` function, it can also be `async`. +Whatever value is returned by the `createRootContext` function will be shared and passed as the second argument to each invocation of the `factory` function. That way you can create a shared context that is used in the creation of each plugin instance. Unlike the `factory` function, the `createRootContext` function will only receive root scoped services as its dependencies, but just like the `factory` function, it can also be `async`. ## Default Service Factories diff --git a/docs/backend-system/building-backends/08-migrating.md b/docs/backend-system/building-backends/08-migrating.md index ae41193b11..d38acb695e 100644 --- a/docs/backend-system/building-backends/08-migrating.md +++ b/docs/backend-system/building-backends/08-migrating.md @@ -1369,7 +1369,7 @@ The vast majority of the backend plugins that currently live in the Backstage Re | @backstage/plugin-catalog-backend-module-github-org | backend-plugin-module | true | | [README](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend-module-github-org/README.md) | | @backstage/plugin-catalog-backend-module-gitlab | backend-plugin-module | true | true | [README](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend-module-gitlab/README.md) | | @backstage/plugin-catalog-backend-module-incremental-ingestion | backend-plugin-module | true | true | [README](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend-module-incremental-ingestion/README.md) | -| @backstage/plugin-catalog-backend-module-ldap | backend-plugin-module | | | [README](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend-module-ldap/README.md) | +| @backstage/plugin-catalog-backend-module-ldap | backend-plugin-module | true | | [README](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend-module-ldap/README.md) | | @backstage/plugin-catalog-backend-module-msgraph | backend-plugin-module | true | true | [README](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend-module-msgraph/README.md) | | @backstage/plugin-catalog-backend-module-openapi | backend-plugin-module | true | | [README](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend-module-openapi/README.md) | | @backstage/plugin-catalog-backend-module-puppetdb | backend-plugin-module | true | true | [README](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend-module-puppetdb/README.md) | diff --git a/docs/integrations/ldap/org--old.md b/docs/integrations/ldap/org--old.md new file mode 100644 index 0000000000..13fbcb9408 --- /dev/null +++ b/docs/integrations/ldap/org--old.md @@ -0,0 +1,417 @@ +--- +id: org--old +title: LDAP Organizational Data +sidebar_label: Org Data +# prettier-ignore +description: Setting up ingestion of organizational data from LDAP +--- + +The Backstage catalog can be set up to ingest organizational data - users and +groups - directly from an LDAP compatible service. The result is a hierarchy of +[`User`](../../features/software-catalog/descriptor-format.md#kind-user) and +[`Group`](../../features/software-catalog/descriptor-format.md#kind-group) kind +entities that mirror your org setup. + +## Supported vendors + +Backstage in general supports OpenLDAP compatible vendors, as well as Active Directory and FreeIPA. If you are using a vendor that does not seem to be supported, please [file an issue](https://github.com/backstage/backstage/issues/new?assignees=&labels=enhancement&template=feature_template.md). + +## Installation + +This guide will use the Entity Provider method. If you for some reason prefer +the Processor method (not recommended), it is described separately below. + +The provider is not installed by default, therefore you have to add a dependency +to `@backstage/plugin-catalog-backend-module-ldap` to your backend package. + +```bash +# From your Backstage root directory +yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-ldap +``` + +:::note Note + +When configuring to use a Provider instead of a Processor you do not +need to add a _location_ pointing to your LDAP server + +::: + +Update the catalog plugin initialization in your backend to add the provider and +schedule it: + +```ts title="packages/backend/src/plugins/catalog.ts" +/* highlight-add-next-line */ +import { LdapOrgEntityProvider } from '@backstage/plugin-catalog-backend-module-ldap'; + +export default async function createPlugin( + env: PluginEnvironment, +): Promise { + const builder = await CatalogBuilder.create(env); + + /* highlight-add-start */ + // The target parameter below needs to match the ldap.providers.target + // value specified in your app-config. + builder.addEntityProvider( + LdapOrgEntityProvider.fromConfig(env.config, { + id: 'our-ldap-master', + target: 'ldaps://ds.example.net', + logger: env.logger, + schedule: env.scheduler.createScheduledTaskRunner({ + frequency: { minutes: 60 }, + timeout: { minutes: 15 }, + }), + }), + ); + /* highlight-add-end */ + + // .. +} +``` + +After this, you also have to add some configuration in your app-config that +describes what you want to import for that target. + +## Configuration + +The following configuration is a small example of how a setup could look for +importing groups and users from a corporate LDAP server. + +```yaml +ldap: + providers: + - target: ldaps://ds.example.net + bind: + dn: uid=ldap-reader-user,ou=people,ou=example,dc=example,dc=net + secret: ${LDAP_SECRET} + users: + dn: ou=people,ou=example,dc=example,dc=net + options: + filter: (uid=*) + map: + description: l + set: + metadata.customField: 'hello' + groups: + dn: ou=access,ou=groups,ou=example,dc=example,dc=net + options: + filter: (&(objectClass=some-group-class)(!(groupType=email))) + map: + description: l + set: + metadata.customField: 'hello' +``` + +There may be many providers, each targeting a specific `target` which is +supposed to match the `target` of a dedicated provider instance - i.e., you will +add one entity provider class instance per target to ingest from. + +These config blocks have a lot of options in them, so we will describe each +"root" key within the block separately. + +### target + +This is the URL of the targeted server, typically on the form +`ldaps://ds.example.net` for SSL enabled servers or `ldap://ds.example.net` +without SSL. + +#### target.tls.keys + +`keys` in TLS options specifies location of a file, that contains private keys +to establish connection with your LDAP server, in PEM format. See an example +for Google Secure LDAP Service below. + +#### target.tls.certs + +`certs` in TLS options specifies location of a file, that contains certificate +chains to establish connection with your LDAP server, in PEM format. See an +example for Google Secure LDAP Service below. + +### bind + +The bind block specifies how the plugin should bind (essentially, to +authenticate) towards the server. It has the following fields. + +```yaml +dn: uid=ldap-reader-user,ou=people,ou=example,dc=example,dc=net +secret: ${LDAP_SECRET} +``` + +The `dn` is the full LDAP Distinguished Name for the user that the plugin +authenticates itself as. At this point, only regular user based authentication +is supported. + +The `secret` is the password of the same user. In this example, it is given in +the form of an environment variable `LDAP_SECRET`, that has to be set when the +backend starts. + +### users + +The `users` block defines the settings that govern the reading and +interpretation of users. Its fields are explained in separate sections below. + +#### users.dn + +The DN under which users are stored, e.g. +`ou=people,ou=example,dc=example,dc=net`. + +#### users.options + +The search options to use when sending the query to the server, when reading all +users. All the options are shown below, with their default values, but they are +all optional. + +```yaml +options: + # One of 'base', 'one', or 'sub'. + scope: one + # The filter is the one that you commonly will want to specify explicitly. It + # is a string on the standard LDAP query format. Use it to select out the set + # of users that are of actual interest to ingest. For example, you may want + # to filter out disabled users. + filter: (uid=*) + # The attribute selectors for each item, as passed to the LDAP server. + attributes: ['*', '+'] + # This field is either 'false' to disable paging when reading from the + # server, or an object on the form '{ pageSize: 100, pagePause: true }' that + # specifies the details of how the paging shall work. + paged: false +``` + +#### users.set + +This optional piece lets you specify a number of JSON paths (on a.b.c form) and +hard coded values to set on those paths. This can be useful for example if you +want to hard code a namespace or similar on the generated entities. + +```yaml +set: + # Just an example; the key and value can be anything + metadata.namespace: 'ldap' +``` + +#### users.map + +Mappings from well known entity fields, to LDAP attribute names. This is where +you are able to define how to interpret the attributes of each LDAP result item, +and to move them into the corresponding entity fields. All the options are shown +below, with their default values, but they are all optional. + +If you leave out an optional mapping, it will still be copied using that default +value. For example, even if you do not put in the field `displayName` in your +config, the provider will still copy the attribute `cn` into the entity field +`spec.profile.displayName`. + +```yaml +map: + # The name of the attribute that holds the relative + # distinguished name of each entry. + rdn: uid + # The name of the attribute that shall be used for the value of + # the metadata.name field of the entity. + name: uid + # The name of the attribute that shall be used for the value of + # the metadata.description field of the entity. + description: description + # The name of the attribute that shall be used for the value of + # the spec.profile.displayName field of the entity. + displayName: cn + # The name of the attribute that shall be used for the value of + # the spec.profile.email field of the entity. + email: mail + # The name of the attribute that shall be used for the value of + # the spec.profile.picture field of the entity. + picture: + # The name of the attribute that shall be used for the values of + # the spec.memberOf field of the entity. + memberOf: memberOf +``` + +### groups + +The `groups` block defines the settings that govern the reading and +interpretation of groups. Its fields are explained in separate sections below. + +#### groups.dn + +The DN under which groups are stored, e.g. +`ou=people,ou=example,dc=example,dc=net`. + +#### groups.options + +The search options to use when sending the query to the server, when reading all +groups. All the options are shown below, with their default values, but they are +all optional. + +```yaml +options: + # One of 'base', 'one', or 'sub'. + scope: one + # The filter is the one that you commonly will want to specify explicitly. It + # is a string on the standard LDAP query format. Use it to select out the set + # of groups that are of actual interest to ingest. For example, you may want + # to filter out disabled groups. + filter: (&(objectClass=some-group-class)(!(groupType=email))) + # The attribute selectors for each item, as passed to the LDAP server. + attributes: ['*', '+'] + # This field is either 'false' to disable paging when reading from the + # server, or an object on the form '{ pageSize: 100, pagePause: true }' that + # specifies the details of how the paging shall work. + paged: false +``` + +#### groups.set + +This optional piece lets you specify a number of JSON paths (on a.b.c form) and +hard coded values to set on those paths. This can be useful for example if you +want to hard code a namespace or similar on the generated entities. + +```yaml +set: + # Just an example; the key and value can be anything + metadata.namespace: 'ldap' +``` + +#### groups.map + +Mappings from well known entity fields, to LDAP attribute names. This is where +you are able to define how to interpret the attributes of each LDAP result item, +and to move them into the corresponding entity fields. All of the options are +shown below, with their default values, but they are all optional. + +If you leave out an optional mapping, it will still be copied using that default +value. For example, even if you do not put in the field `displayName` in your +config, the provider will still copy the attribute `cn` into the entity field +`spec.profile.displayName`. If the target field is optional, such as the display +name, the importer will accept missing attributes and just leave the target +field unset. If the target field is mandatory, such as the name of the entity, +validation will fail if the source attribute is missing. + +```yaml +map: + # The name of the attribute that holds the relative + # distinguished name of each entry. This value is copied into a + # well known annotation to be able to query by it later. + rdn: cn + # The name of the attribute that shall be used for the value of + # the metadata.name field of the entity. + name: cn + # The name of the attribute that shall be used for the value of + # the metadata.description field of the entity. + description: description + # The name of the attribute that shall be used for the value of + # the spec.type field of the entity. + type: groupType + # The name of the attribute that shall be used for the value of + # the spec.profile.displayName field of the entity. + displayName: cn + # The name of the attribute that shall be used for the value of + # the spec.profile.email field of the entity. + email: + # The name of the attribute that shall be used for the value of + # the spec.profile.picture field of the entity. + picture: + # The name of the attribute that shall be used for the values of + # the spec.parent field of the entity. + memberOf: memberOf + # The name of the attribute that shall be used for the values of + # the spec.children field of the entity. + members: member +``` + +## Customize the Provider + +In case you want to customize the ingested entities, the provider allows to pass +transformers for users and groups. Here we will show an example of overriding +the group transformer. + +1. Create a transformer: + + ```ts + export async function myGroupTransformer( + vendor: LdapVendor, + config: GroupConfig, + group: SearchEntry, + ): Promise { + // Transformations may change namespace, change entity naming pattern, fill + // profile with more or other details... + + // Create the group entity on your own, or wrap the default transformer + return await defaultGroupTransformer(vendor, config, group); + } + ``` + +2. Configure the provider with the transformer: + + ```ts + const ldapEntityProvider = LdapOrgEntityProvider.fromConfig(env.config, { + id: 'our-ldap-master', + target: 'ldaps://ds.example.net', + logger: env.logger, + groupTransformer: myGroupTransformer, + }); + ``` + +## Using a Processor instead of a Provider + +An alternative to using the Provider for ingesting LDAP entries is to use a +Processor. This is the old way that's based on registering locations with the +proper type and target, triggering the processor to run. + +The drawback of this method is that it will leave orphaned Group/User entities +whenever they are deleted on your LDAP server, and you cannot control the +frequency with which they are refreshed, separately from other processors. + +### Processor Installation + +The `LdapOrgReaderProcessor` is not registered by default, so you have to +register it in the catalog plugin: + +```typescript title="packages/backend/src/plugins/catalog.ts" +builder.addProcessor( + LdapOrgReaderProcessor.fromConfig(env.config, { + logger: env.logger, + }), +); +``` + +### Driving LDAP Org Processor Ingestion with Locations + +Locations point out the specific org(s) you want to import. The `type` of these +locations must be `ldap-org`, and the `target` must point to the exact URL +(starting with `ldap://` or `ldaps://`) of the targeted LDAP server. You can +have several such location entries if you want, but typically you will have just +one. + +```yaml +catalog: + locations: + - type: ldap-org + target: ldaps://ds.example.net + rules: + - allow: [User, Group] +``` + +### Example configurations + +#### Google Secure LDAP Service + +To sync Google Workspace/Cloud Identity organization data to users and groups in backstage, +you must [configure Secure LDAP Service](https://support.google.com/a/answer/9048516) first. + +Once Secure LDAP Service is configured, you can enable TLS options in LDAP configuration, +as mentioned below. `keys` and `certs` specify the location of files that are generated +while configuring Secure LDAP Service above. + +```yaml +ldap: + providers: + - target: ldaps://ldap.google.com:636 + tls: + rejectUnauthorized: false + keys: '/var/secrets/tls/gldap.key' + certs: '/var/secrets/tls/gldap.crt' + users: + # users configuration comes here + groups: + # groups configuration comes here +``` diff --git a/docs/integrations/ldap/org.md b/docs/integrations/ldap/org.md index a10bc3918c..f70d02afed 100644 --- a/docs/integrations/ldap/org.md +++ b/docs/integrations/ldap/org.md @@ -18,9 +18,6 @@ Backstage in general supports OpenLDAP compatible vendors, as well as Active Dir ## Installation -This guide will use the Entity Provider method. If you for some reason prefer -the Processor method (not recommended), it is described separately below. - The provider is not installed by default, therefore you have to add a dependency to `@backstage/plugin-catalog-backend-module-ldap` to your backend package. @@ -29,47 +26,30 @@ to `@backstage/plugin-catalog-backend-module-ldap` to your backend package. yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-ldap ``` -:::note Note +Next add the basic configuration to `app-config.yaml` -When configuring to use a Provider instead of a Processor you do not -need to add a _location_ pointing to your LDAP server - -::: - -Update the catalog plugin initialization in your backend to add the provider and -schedule it: - -```ts title="packages/backend/src/plugins/catalog.ts" -/* highlight-add-next-line */ -import { LdapOrgEntityProvider } from '@backstage/plugin-catalog-backend-module-ldap'; - -export default async function createPlugin( - env: PluginEnvironment, -): Promise { - const builder = await CatalogBuilder.create(env); - - /* highlight-add-start */ - // The target parameter below needs to match the ldap.providers.target - // value specified in your app-config. - builder.addEntityProvider( - LdapOrgEntityProvider.fromConfig(env.config, { - id: 'our-ldap-master', - target: 'ldaps://ds.example.net', - logger: env.logger, - schedule: env.scheduler.createScheduledTaskRunner({ - frequency: { minutes: 60 }, - timeout: { minutes: 15 }, - }), - }), - ); - /* highlight-add-end */ - - // .. -} +```yaml title="app-config.yaml" +catalog: + providers: + ldapOrg: + default: + target: ldaps://ds.example.net + bind: + dn: uid=ldap-reader-user,ou=people,ou=example,dc=example,dc=net + secret: ${LDAP_SECRET} + schedule: + frequency: PT1H + timeout: PT15M ``` -After this, you also have to add some configuration in your app-config that -describes what you want to import for that target. +Finally, updated your backend by adding the following line: + +```ts title="packages/backend/src/index.ts" +backend.add(import('@backstage/plugin-catalog-backend/alpha')); +/* highlight-add-start */ +backend.add(import('@backstage/plugin-catalog-backend-module-ldap')); +/* highlight-add-end */ +``` ## Configuration @@ -77,34 +57,32 @@ The following configuration is a small example of how a setup could look for importing groups and users from a corporate LDAP server. ```yaml -ldap: +catalog: providers: - - target: ldaps://ds.example.net - bind: - dn: uid=ldap-reader-user,ou=people,ou=example,dc=example,dc=net - secret: ${LDAP_SECRET} - users: - dn: ou=people,ou=example,dc=example,dc=net - options: - filter: (uid=*) - map: - description: l - set: - metadata.customField: 'hello' - groups: - dn: ou=access,ou=groups,ou=example,dc=example,dc=net - options: - filter: (&(objectClass=some-group-class)(!(groupType=email))) - map: - description: l - set: - metadata.customField: 'hello' + ldapOrg: + default: + target: ldaps://ds.example.net + bind: + dn: uid=ldap-reader-user,ou=people,ou=example,dc=example,dc=net + secret: ${LDAP_SECRET} + users: + dn: ou=people,ou=example,dc=example,dc=net + options: + filter: (uid=*) + map: + description: l + set: + metadata.customField: 'hello' + groups: + dn: ou=access,ou=groups,ou=example,dc=example,dc=net + options: + filter: (&(objectClass=some-group-class)(!(groupType=email))) + map: + description: l + set: + metadata.customField: 'hello' ``` -There may be many providers, each targeting a specific `target` which is -supposed to match the `target` of a dedicated provider instance - i.e., you will -add one entity provider class instance per target to ingest from. - These config blocks have a lot of options in them, so we will describe each "root" key within the block separately. @@ -321,97 +299,34 @@ map: ## Customize the Provider In case you want to customize the ingested entities, the provider allows to pass -transformers for users and groups. Here we will show an example of overriding -the group transformer. +transformers for users and groups. -1. Create a transformer: +Transformers can be configured by extending `ldapOrgEntityProviderTransformExtensionPoint`. Here is an example: - ```ts - export async function myGroupTransformer( - vendor: LdapVendor, - config: GroupConfig, - group: SearchEntry, - ): Promise { - // Transformations may change namespace, change entity naming pattern, fill - // profile with more or other details... +```ts title="packages/backend/src/index.ts" +import { createBackendModule } from '@backstage/backend-plugin-api'; +import { ldapOrgEntityProviderTransformExtensionPoint } from '@backstage/plugin-catalog-backend-module-ldap'; +import { myUserTransformer, myGroupTransformer } from './transformers'; - // Create the group entity on your own, or wrap the default transformer - return await defaultGroupTransformer(vendor, config, group); - } - ``` - -2. Configure the provider with the transformer: - - ```ts - const ldapEntityProvider = LdapOrgEntityProvider.fromConfig(env.config, { - id: 'our-ldap-master', - target: 'ldaps://ds.example.net', - logger: env.logger, - groupTransformer: myGroupTransformer, - }); - ``` - -## Using a Processor instead of a Provider - -An alternative to using the Provider for ingesting LDAP entries is to use a -Processor. This is the old way that's based on registering locations with the -proper type and target, triggering the processor to run. - -The drawback of this method is that it will leave orphaned Group/User entities -whenever they are deleted on your LDAP server, and you cannot control the -frequency with which they are refreshed, separately from other processors. - -### Processor Installation - -The `LdapOrgReaderProcessor` is not registered by default, so you have to -register it in the catalog plugin: - -```typescript title="packages/backend/src/plugins/catalog.ts" -builder.addProcessor( - LdapOrgReaderProcessor.fromConfig(env.config, { - logger: env.logger, +backend.add( + createBackendModule({ + pluginId: 'catalog', + moduleId: 'ldap-extensions', + register(env) { + env.registerInit({ + deps: { + /* highlight-add-start */ + ldapTransformers: ldapOrgEntityProviderTransformExtensionPoint, + /* highlight-add-end */ + }, + async init({ ldapTransformers }) { + /* highlight-add-start */ + ldapTransformers.setUserTransformer(myUserTransformer); + ldapTransformers.setGroupTransformer(myGroupTransformer); + /* highlight-add-end */ + }, + }); + }, }), ); ``` - -### Driving LDAP Org Processor Ingestion with Locations - -Locations point out the specific org(s) you want to import. The `type` of these -locations must be `ldap-org`, and the `target` must point to the exact URL -(starting with `ldap://` or `ldaps://`) of the targeted LDAP server. You can -have several such location entries if you want, but typically you will have just -one. - -```yaml -catalog: - locations: - - type: ldap-org - target: ldaps://ds.example.net - rules: - - allow: [User, Group] -``` - -### Example configurations - -#### Google Secure LDAP Service - -To sync Google Workspace/Cloud Identity organization data to users and groups in backstage, -you must [configure Secure LDAP Service](https://support.google.com/a/answer/9048516) first. - -Once Secure LDAP Service is configured, you can enable TLS options in LDAP configuration, -as mentioned below. `keys` and `certs` specify the location of files that are generated -while configuring Secure LDAP Service above. - -```yaml -ldap: - providers: - - target: ldaps://ldap.google.com:636 - tls: - rejectUnauthorized: false - keys: '/var/secrets/tls/gldap.key' - certs: '/var/secrets/tls/gldap.crt' - users: - # users configuration comes here - groups: - # groups configuration comes here -``` diff --git a/docs/releases/v1.28.0-next.1-changelog.md b/docs/releases/v1.28.0-next.1-changelog.md new file mode 100644 index 0000000000..cb5502738d --- /dev/null +++ b/docs/releases/v1.28.0-next.1-changelog.md @@ -0,0 +1,1014 @@ +# Release v1.28.0-next.1 + +Upgrade Helper: [https://backstage.github.io/upgrade-helper/?to=1.28.0-next.1](https://backstage.github.io/upgrade-helper/?to=1.28.0-next.1) + +## @backstage/backend-common@0.23.0-next.1 + +### Minor Changes + +- 02103be: Deprecated and moved over core services to `@backstage/backend-defaults` + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@0.7.6-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/config-loader@1.8.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + +## @backstage/backend-defaults@0.3.0-next.1 + +### Minor Changes + +- 02103be: Deprecated and moved over core services to `@backstage/backend-defaults` + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@0.7.6-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/config-loader@1.8.0 + - @backstage/plugin-events-node@0.3.5-next.0 + +## @backstage/backend-test-utils@0.4.0-next.1 + +### Minor Changes + +- 805cbe7: Added `TestCaches` that functions just like `TestDatabases` + +### Patch Changes + +- 9e63318: Made it possible to give access restrictions to `mockCredentials.service` +- Updated dependencies + - @backstage/backend-app-api@0.7.6-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + +## @backstage/plugin-catalog-backend-module-ldap@0.6.0-next.1 + +### Minor Changes + +- debcc8c: Migrate LDAP catalog module to the new backend system. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-catalog-import@0.12.0-next.1 + +### Minor Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.12.1-next.0 + +## @backstage/plugin-kubernetes-backend@0.18.0-next.1 + +### Minor Changes + +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-kubernetes-node@0.1.13-next.1 + +## @backstage/plugin-kubernetes-common@0.8.0-next.0 + +### Minor Changes + +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + +## @backstage/plugin-kubernetes-react@0.4.0-next.1 + +### Minor Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + +## @backstage/plugin-notifications-backend@0.3.0-next.1 + +### Minor Changes + +- 07a789b: adding filtering of notifications by processors + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-notifications-node@0.2.0-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + - @backstage/plugin-signals-node@0.1.5-next.1 + +## @backstage/plugin-notifications-backend-module-email@0.1.0-next.1 + +### Minor Changes + +- 07a789b: add notification filters + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-notifications-node@0.2.0-next.1 + - @backstage/backend-common@0.23.0-next.1 + +## @backstage/plugin-notifications-node@0.2.0-next.1 + +### Minor Changes + +- 07a789b: add notifications filtering by processors + +### Patch Changes + +- 1354d81: Use `node-fetch` instead of native fetch, as per +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-signals-node@0.1.5-next.1 + +## @backstage/backend-app-api@0.7.6-next.1 + +### Patch Changes + +- 398b82a: Add support for JWKS tokens in ExternalTokenHandler. +- 9e63318: Added an optional `accessRestrictions` to external access service tokens and service principals in general, such that you can limit their access to certain plugins or permissions. +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/cli-node@0.2.6-next.0 + - @backstage/config-loader@1.8.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + +## @backstage/backend-dynamic-feature-service@0.2.11-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@0.7.6-next.1 + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/cli-node@0.2.6-next.0 + - @backstage/config-loader@1.8.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-events-backend@0.3.6-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + +## @backstage/backend-plugin-api@0.6.19-next.1 + +### Patch Changes + +- 9e63318: Added an optional `accessRestrictions` to external access service tokens and service principals in general, such that you can limit their access to certain plugins or permissions. +- 0665b7e: Renamed `BackendPluginConfig`, `BackendModuleConfig`, and `ExtensionPointConfig` respectively to `CreateBackendPluginOptions`, `CreateBackendModuleOptions`, and `CreateExtensionPointOptions` to standardize frontend and backend factories signatures. +- Updated dependencies + - @backstage/plugin-auth-node@0.4.14-next.1 + +## @backstage/backend-tasks@0.5.24-next.1 + +### Patch Changes + +- ed473cd: Updated the `TaskScheduleDefinitionConfig` deprecated comment to point to `SchedulerServiceTaskScheduleDefinitionConfig` +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + +## @backstage/cli@0.26.7-next.1 + +### Patch Changes + +- 788eca7: Fix readme for new plugins created using cli +- c00f7ee: Fix issue with `esm` loaded dependencies being different from the `cjs` import for Vite dependencies +- Updated dependencies + - @backstage/cli-node@0.2.6-next.0 + - @backstage/config-loader@1.8.0 + +## @backstage/create-app@0.5.16-next.1 + +### Patch Changes + +- Bumped create-app version. + +## @backstage/repo-tools@0.9.1-next.1 + +### Patch Changes + +- 8721a02: Add `--client-additional-properties` option to `openapi generate` command +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/cli-node@0.2.6-next.0 + - @backstage/config-loader@1.8.0 + +## @techdocs/cli@1.8.12-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-techdocs-node@1.12.5-next.1 + +## @backstage/plugin-app-backend@0.3.68-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/config-loader@1.8.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + +## @backstage/plugin-auth-backend@0.22.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-auth-backend-module-cloudflare-access-provider@0.1.2-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-backend-module-atlassian-provider@0.1.11-next.0 + - @backstage/plugin-auth-backend-module-aws-alb-provider@0.1.11-next.1 + - @backstage/plugin-auth-backend-module-azure-easyauth-provider@0.1.2-next.0 + - @backstage/plugin-auth-backend-module-bitbucket-provider@0.1.2-next.0 + - @backstage/plugin-auth-backend-module-gcp-iap-provider@0.2.14-next.0 + - @backstage/plugin-auth-backend-module-github-provider@0.1.16-next.0 + - @backstage/plugin-auth-backend-module-gitlab-provider@0.1.16-next.0 + - @backstage/plugin-auth-backend-module-google-provider@0.1.16-next.0 + - @backstage/plugin-auth-backend-module-microsoft-provider@0.1.14-next.0 + - @backstage/plugin-auth-backend-module-oauth2-provider@0.1.16-next.0 + - @backstage/plugin-auth-backend-module-oauth2-proxy-provider@0.1.12-next.0 + - @backstage/plugin-auth-backend-module-oidc-provider@0.1.10-next.1 + - @backstage/plugin-auth-backend-module-okta-provider@0.0.12-next.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-auth-backend-module-aws-alb-provider@0.1.11-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-backend@0.22.6-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + +## @backstage/plugin-auth-backend-module-cloudflare-access-provider@0.1.2-next.1 + +### Patch Changes + +- 1354d81: Use `node-fetch` instead of native fetch, as per +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + +## @backstage/plugin-auth-backend-module-guest-provider@0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + +## @backstage/plugin-auth-backend-module-oidc-provider@0.1.10-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-backend@0.22.6-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + +## @backstage/plugin-auth-node@0.4.14-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + +## @backstage/plugin-catalog@1.20.1-next.1 + +### Patch Changes + +- a2d2649: Export `catalogTranslationRef` under `/alpha` + +- bcec60f: updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + - @backstage/plugin-catalog-react@1.12.1-next.0 + +## @backstage/plugin-catalog-backend@1.23.0-next.1 + +### Patch Changes + +- d779e3b: Added a regex test to check commit hash. If url is from git commit branch ignore the edit url. +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + - @backstage/plugin-search-backend-module-catalog@0.1.25-next.1 + +## @backstage/plugin-catalog-backend-module-aws@0.3.14-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-catalog-backend-module-azure@0.1.39-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-catalog-backend-module-bitbucket-cloud@0.2.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + +## @backstage/plugin-catalog-backend-module-bitbucket-server@0.1.33-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-catalog-backend-module-gcp@0.1.20-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-catalog-backend-module-gerrit@0.1.36-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-catalog-backend-module-github@0.6.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + +## @backstage/plugin-catalog-backend-module-github-org@0.1.14-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-backend-module-github@0.6.2-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + +## @backstage/plugin-catalog-backend-module-gitlab@0.3.17-next.1 + +### Patch Changes + +- 150fc77: Fixed an issue in `GitlabOrgDiscoveryEntityProvider` where a missing `orgEnabled` config key was throwing an error. +- f271164: Fixed an issue in `GitlabDiscoveryEntityProvider` where the fallback branch was taking precedence over the GitLab default branch. +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + +## @backstage/plugin-catalog-backend-module-gitlab-org@0.0.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-catalog-backend-module-gitlab@0.3.17-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + +## @backstage/plugin-catalog-backend-module-incremental-ingestion@0.4.24-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + +## @backstage/plugin-catalog-backend-module-msgraph@0.5.27-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-catalog-backend-module-openapi@0.1.37-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-catalog-backend-module-puppetdb@0.1.25-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-catalog-backend-module-unprocessed@0.4.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + +## @backstage/plugin-devtools-backend@0.3.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/config-loader@1.8.0 + +## @backstage/plugin-events-backend@0.3.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + +## @backstage/plugin-events-backend-module-aws-sqs@0.3.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + +## @backstage/plugin-kubernetes@0.11.11-next.1 + +### Patch Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- Updated dependencies + - @backstage/plugin-kubernetes-react@0.4.0-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + - @backstage/plugin-catalog-react@1.12.1-next.0 + +## @backstage/plugin-kubernetes-cluster@0.0.12-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-kubernetes-react@0.4.0-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + - @backstage/plugin-catalog-react@1.12.1-next.0 + +## @backstage/plugin-kubernetes-node@0.1.13-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + +## @backstage/plugin-notifications@0.2.2-next.1 + +### Patch Changes + +- 6d196b4: Fixes performance issue with Notifications title counter. + +## @backstage/plugin-permission-backend@0.5.43-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + +## @backstage/plugin-permission-node@0.7.30-next.1 + +### Patch Changes + +- 9e63318: Ensure that service token access restrictions, when present, are taken into account +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + +## @backstage/plugin-proxy-backend@0.5.0-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + +## @backstage/plugin-scaffolder@1.20.2-next.1 + +### Patch Changes + +- 75dcd7e: Fixing bug in `formData` type as it should be `optional` as it's possibly undefined + +- bcec60f: updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/plugin-scaffolder-react@1.8.7-next.1 + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + - @backstage/plugin-catalog-react@1.12.1-next.0 + +## @backstage/plugin-scaffolder-backend@1.22.8-next.1 + +### Patch Changes + +- bcec60f: added the following new permissions to the scaffolder backend endpoints: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/plugin-scaffolder-backend-module-gitea@0.1.9-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.4.1-next.1 + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket@0.2.9-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.1.9-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.1.9-next.0 + - @backstage/plugin-scaffolder-backend-module-gerrit@0.1.11-next.0 + - @backstage/plugin-scaffolder-backend-module-github@0.2.9-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + +## @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.20-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + +## @backstage/plugin-scaffolder-backend-module-cookiecutter@0.2.43-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + +## @backstage/plugin-scaffolder-backend-module-gitea@0.1.9-next.1 + +### Patch Changes + +- 1354d81: Use `node-fetch` instead of native fetch, as per +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + +## @backstage/plugin-scaffolder-backend-module-github@0.2.9-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + +## @backstage/plugin-scaffolder-backend-module-gitlab@0.4.1-next.1 + +### Patch Changes + +- 829e0ec: Add new `gitlab:pipeline:trigger` action to trigger GitLab pipelines. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + +## @backstage/plugin-scaffolder-backend-module-notifications@0.0.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-notifications-node@0.2.0-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + +## @backstage/plugin-scaffolder-backend-module-rails@0.4.36-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + +## @backstage/plugin-scaffolder-backend-module-sentry@0.1.27-next.1 + +### Patch Changes + +- 1354d81: Use `node-fetch` instead of native fetch, as per +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + +## @backstage/plugin-scaffolder-common@1.5.3-next.0 + +### Patch Changes + +- bcec60f: added the following new permissions to the scaffolder backend endpoints: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +## @backstage/plugin-scaffolder-node@0.4.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + +## @backstage/plugin-scaffolder-node-test-utils@0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-test-utils@0.4.0-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + +## @backstage/plugin-scaffolder-react@1.8.7-next.1 + +### Patch Changes + +- 75dcd7e: Fixing bug in `formData` type as it should be `optional` as it's possibly undefined +- 928cfa0: Fixed a typo ' + +## @backstage/plugin-search@1.4.12-next.1 + +### Patch Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- Updated dependencies + - @backstage/plugin-catalog-react@1.12.1-next.0 + +## @backstage/plugin-search-backend@1.5.10-next.1 + +### Patch Changes + +- 34dc47d: Move @backstage/repo-tools to devDependencies +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-defaults@0.3.0-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + +## @backstage/plugin-search-backend-module-catalog@0.1.25-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + +## @backstage/plugin-search-backend-module-elasticsearch@1.4.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + +## @backstage/plugin-search-backend-module-explore@0.1.25-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + +## @backstage/plugin-search-backend-module-pg@0.5.28-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@0.7.6-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + +## @backstage/plugin-search-backend-module-stack-overflow-collator@0.1.12-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + +## @backstage/plugin-search-backend-module-techdocs@0.1.24-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + - @backstage/plugin-techdocs-node@1.12.5-next.1 + +## @backstage/plugin-search-backend-node@1.2.24-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + +## @backstage/plugin-signals-backend@0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + - @backstage/plugin-signals-node@0.1.5-next.1 + +## @backstage/plugin-signals-node@0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + +## @backstage/plugin-techdocs-backend@1.10.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-module-techdocs@0.1.24-next.1 + - @backstage/plugin-techdocs-node@1.12.5-next.1 + +## @backstage/plugin-techdocs-node@1.12.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + +## @backstage/plugin-user-settings-backend@0.2.18-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + +## example-app@0.2.98-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.26.7-next.1 + - @backstage/plugin-catalog-import@0.12.0-next.1 + - @backstage/plugin-kubernetes@0.11.11-next.1 + - @backstage/plugin-search@1.4.12-next.1 + - @backstage/plugin-notifications@0.2.2-next.1 + - @backstage/plugin-scaffolder-react@1.8.7-next.1 + - @backstage/plugin-scaffolder@1.20.2-next.1 + - @backstage/plugin-catalog@1.20.1-next.1 + - @backstage/plugin-kubernetes-cluster@0.0.12-next.1 + - @backstage/plugin-catalog-react@1.12.1-next.0 + +## example-app-next@0.0.12-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.26.7-next.1 + - @backstage/plugin-catalog-import@0.12.0-next.1 + - @backstage/plugin-kubernetes@0.11.11-next.1 + - @backstage/plugin-search@1.4.12-next.1 + - @backstage/plugin-notifications@0.2.2-next.1 + - @backstage/plugin-scaffolder-react@1.8.7-next.1 + - @backstage/plugin-scaffolder@1.20.2-next.1 + - @backstage/plugin-catalog@1.20.1-next.1 + - @backstage/plugin-kubernetes-cluster@0.0.12-next.1 + - @backstage/plugin-catalog-react@1.12.1-next.0 + +## example-backend@0.0.27-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/plugin-search-backend@1.5.10-next.1 + - @backstage/backend-defaults@0.3.0-next.1 + - @backstage/plugin-kubernetes-backend@0.18.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/plugin-scaffolder-backend@1.22.8-next.1 + - @backstage/plugin-notifications-backend@0.3.0-next.1 + - @backstage/plugin-app-backend@0.3.68-next.1 + - @backstage/plugin-auth-backend@0.22.6-next.1 + - @backstage/plugin-auth-backend-module-github-provider@0.1.16-next.0 + - @backstage/plugin-auth-backend-module-guest-provider@0.1.5-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-backend-module-openapi@0.1.37-next.1 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17-next.1 + - @backstage/plugin-devtools-backend@0.3.5-next.1 + - @backstage/plugin-permission-backend@0.5.43-next.1 + - @backstage/plugin-permission-backend-module-allow-all-policy@0.1.16-next.0 + - @backstage/plugin-proxy-backend@0.5.0-next.1 + - @backstage/plugin-scaffolder-backend-module-github@0.2.9-next.1 + - @backstage/plugin-search-backend-module-catalog@0.1.25-next.1 + - @backstage/plugin-search-backend-module-explore@0.1.25-next.1 + - @backstage/plugin-search-backend-module-techdocs@0.1.24-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + - @backstage/plugin-signals-backend@0.1.5-next.1 + - @backstage/plugin-techdocs-backend@1.10.6-next.1 + - @backstage/plugin-catalog-backend-module-unprocessed@0.4.6-next.1 + +## example-backend-legacy@0.2.99-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/plugin-search-backend@1.5.10-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.4.1-next.1 + - @backstage/plugin-kubernetes-backend@0.18.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/plugin-scaffolder-backend@1.22.8-next.1 + - @backstage/plugin-app-backend@0.3.68-next.1 + - @backstage/plugin-auth-backend@0.22.6-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-devtools-backend@0.3.5-next.1 + - @backstage/plugin-events-backend@0.3.6-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + - @backstage/plugin-permission-backend@0.5.43-next.1 + - @backstage/plugin-proxy-backend@0.5.0-next.1 + - @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.20-next.1 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.36-next.1 + - @backstage/plugin-search-backend-module-catalog@0.1.25-next.1 + - @backstage/plugin-search-backend-module-elasticsearch@1.4.2-next.1 + - @backstage/plugin-search-backend-module-explore@0.1.25-next.1 + - @backstage/plugin-search-backend-module-pg@0.5.28-next.1 + - @backstage/plugin-search-backend-module-techdocs@0.1.24-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + - @backstage/plugin-signals-backend@0.1.5-next.1 + - @backstage/plugin-techdocs-backend@1.10.6-next.1 + - example-app@0.2.98-next.1 + - @backstage/plugin-catalog-backend-module-unprocessed@0.4.6-next.1 + - @backstage/plugin-signals-node@0.1.5-next.1 + +## @internal/plugin-todo-list-backend@1.0.28-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 diff --git a/docs/tutorials/using-backstage-proxy-within-plugin.md b/docs/tutorials/using-backstage-proxy-within-plugin.md index 3002eb1aff..1abfe9e5b6 100644 --- a/docs/tutorials/using-backstage-proxy-within-plugin.md +++ b/docs/tutorials/using-backstage-proxy-within-plugin.md @@ -125,7 +125,7 @@ export class MyAwesomeApiClient implements MyAwesomeApi { private async fetch(input: string, init?: RequestInit): Promise { // As configured previously for the backend proxy - const proxyUri = '${await this.discoveryApi.getBaseUrl('proxy')}/'; + const proxyUri = `${await this.discoveryApi.getBaseUrl('proxy')}/`; const resp = await fetch(`${proxyUri}${input}`, init); if (!resp.ok) throw new Error(resp); diff --git a/microsite/data/plugins/graphql-catalog.yaml b/microsite/data/plugins/graphql-catalog.yaml new file mode 100644 index 0000000000..9255f475e7 --- /dev/null +++ b/microsite/data/plugins/graphql-catalog.yaml @@ -0,0 +1,14 @@ +--- +title: GraphQL Catalog +author: Frontside Software +authorUrl: https://frontside.com/ +category: Discovery +description: Adds the GraphQL Endpoint to Backstage Catalog as a plugin. +documentation: https://github.com/thefrontside/playhouse/blob/main/plugins/graphql-backend/README.md +iconUrl: https://raw.githubusercontent.com/thefrontside/frontside.com/production/legacy/src/img/frontside-logo.png +npmPackageName: '@frontside/backstage-plugin-graphql-backend' +tags: + - graphql + - catalog + - graphql-catalog +addedDate: '2024-05-01' diff --git a/package.json b/package.json index 7b7692623a..46041abf6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "1.28.0-next.0", + "version": "1.28.0-next.1", "private": true, "repository": { "type": "git", diff --git a/packages/app-next/CHANGELOG.md b/packages/app-next/CHANGELOG.md index 1bf9501f3b..4a58195198 100644 --- a/packages/app-next/CHANGELOG.md +++ b/packages/app-next/CHANGELOG.md @@ -1,5 +1,21 @@ # example-app-next +## 0.0.12-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.26.7-next.1 + - @backstage/plugin-catalog-import@0.12.0-next.1 + - @backstage/plugin-kubernetes@0.11.11-next.1 + - @backstage/plugin-search@1.4.12-next.1 + - @backstage/plugin-notifications@0.2.2-next.1 + - @backstage/plugin-scaffolder-react@1.8.7-next.1 + - @backstage/plugin-scaffolder@1.20.2-next.1 + - @backstage/plugin-catalog@1.20.1-next.1 + - @backstage/plugin-kubernetes-cluster@0.0.12-next.1 + - @backstage/plugin-catalog-react@1.12.1-next.0 + ## 0.0.12-next.0 ### Patch Changes diff --git a/packages/app-next/package.json b/packages/app-next/package.json index 1921ebe3cb..3b1bf6a29a 100644 --- a/packages/app-next/package.json +++ b/packages/app-next/package.json @@ -1,6 +1,6 @@ { "name": "example-app-next", - "version": "0.0.12-next.0", + "version": "0.0.12-next.1", "private": true, "repository": { "type": "git", diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index 9d1606c9f4..01e12da7db 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,21 @@ # example-app +## 0.2.98-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.26.7-next.1 + - @backstage/plugin-catalog-import@0.12.0-next.1 + - @backstage/plugin-kubernetes@0.11.11-next.1 + - @backstage/plugin-search@1.4.12-next.1 + - @backstage/plugin-notifications@0.2.2-next.1 + - @backstage/plugin-scaffolder-react@1.8.7-next.1 + - @backstage/plugin-scaffolder@1.20.2-next.1 + - @backstage/plugin-catalog@1.20.1-next.1 + - @backstage/plugin-kubernetes-cluster@0.0.12-next.1 + - @backstage/plugin-catalog-react@1.12.1-next.0 + ## 0.2.98-next.0 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index 013a3f7c41..c62624c770 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "example-app", - "version": "0.2.98-next.0", + "version": "0.2.98-next.1", "backstage": { "role": "frontend" }, diff --git a/packages/backend-app-api/CHANGELOG.md b/packages/backend-app-api/CHANGELOG.md index 302c14d6f1..74d39824e0 100644 --- a/packages/backend-app-api/CHANGELOG.md +++ b/packages/backend-app-api/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/backend-app-api +## 0.7.6-next.1 + +### Patch Changes + +- 398b82a: Add support for JWKS tokens in ExternalTokenHandler. +- 9e63318: Added an optional `accessRestrictions` to external access service tokens and service principals in general, such that you can limit their access to certain plugins or permissions. +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/cli-node@0.2.6-next.0 + - @backstage/config-loader@1.8.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 0.7.6-next.0 ### Patch Changes diff --git a/packages/backend-app-api/package.json b/packages/backend-app-api/package.json index 988dfd3db9..d2f21e4998 100644 --- a/packages/backend-app-api/package.json +++ b/packages/backend-app-api/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-app-api", - "version": "0.7.6-next.0", + "version": "0.7.6-next.1", "description": "Core API used by Backstage backend apps", "backstage": { "role": "node-library" diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md index 5d5920998b..62a9108d8a 100644 --- a/packages/backend-common/CHANGELOG.md +++ b/packages/backend-common/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/backend-common +## 0.23.0-next.1 + +### Minor Changes + +- 02103be: Deprecated and moved over core services to `@backstage/backend-defaults` + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@0.7.6-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/config-loader@1.8.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 0.22.1-next.0 ### Patch Changes diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index 564d9589bf..6a72699739 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-common", - "version": "0.22.1-next.0", + "version": "0.23.0-next.1", "description": "Common functionality library for Backstage backends", "backstage": { "role": "node-library" diff --git a/packages/backend-defaults/CHANGELOG.md b/packages/backend-defaults/CHANGELOG.md index fe8952c64a..8019597e55 100644 --- a/packages/backend-defaults/CHANGELOG.md +++ b/packages/backend-defaults/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/backend-defaults +## 0.3.0-next.1 + +### Minor Changes + +- 02103be: Deprecated and moved over core services to `@backstage/backend-defaults` + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@0.7.6-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/config-loader@1.8.0 + - @backstage/plugin-events-node@0.3.5-next.0 + ## 0.2.19-next.0 ### Patch Changes diff --git a/packages/backend-defaults/package.json b/packages/backend-defaults/package.json index f1eb7e0718..2e8c8cf757 100644 --- a/packages/backend-defaults/package.json +++ b/packages/backend-defaults/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-defaults", - "version": "0.2.19-next.0", + "version": "0.3.0-next.1", "description": "Backend defaults used by Backstage backend apps", "backstage": { "role": "node-library" diff --git a/packages/backend-dynamic-feature-service/CHANGELOG.md b/packages/backend-dynamic-feature-service/CHANGELOG.md index 01b4447eb0..2f8bb9f71b 100644 --- a/packages/backend-dynamic-feature-service/CHANGELOG.md +++ b/packages/backend-dynamic-feature-service/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/backend-dynamic-feature-service +## 0.2.11-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@0.7.6-next.1 + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/cli-node@0.2.6-next.0 + - @backstage/config-loader@1.8.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-events-backend@0.3.6-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + ## 0.2.11-next.0 ### Patch Changes diff --git a/packages/backend-dynamic-feature-service/package.json b/packages/backend-dynamic-feature-service/package.json index 34567a6c20..f9e4823f21 100644 --- a/packages/backend-dynamic-feature-service/package.json +++ b/packages/backend-dynamic-feature-service/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-dynamic-feature-service", "description": "Backstage dynamic feature service", - "version": "0.2.11-next.0", + "version": "0.2.11-next.1", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-legacy/CHANGELOG.md b/packages/backend-legacy/CHANGELOG.md index 183b4a4954..0484874683 100644 --- a/packages/backend-legacy/CHANGELOG.md +++ b/packages/backend-legacy/CHANGELOG.md @@ -1,5 +1,42 @@ # example-backend-legacy +## 0.2.99-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/plugin-search-backend@1.5.10-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.4.1-next.1 + - @backstage/plugin-kubernetes-backend@0.18.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/plugin-scaffolder-backend@1.22.8-next.1 + - @backstage/plugin-app-backend@0.3.68-next.1 + - @backstage/plugin-auth-backend@0.22.6-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-devtools-backend@0.3.5-next.1 + - @backstage/plugin-events-backend@0.3.6-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + - @backstage/plugin-permission-backend@0.5.43-next.1 + - @backstage/plugin-proxy-backend@0.5.0-next.1 + - @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.20-next.1 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.36-next.1 + - @backstage/plugin-search-backend-module-catalog@0.1.25-next.1 + - @backstage/plugin-search-backend-module-elasticsearch@1.4.2-next.1 + - @backstage/plugin-search-backend-module-explore@0.1.25-next.1 + - @backstage/plugin-search-backend-module-pg@0.5.28-next.1 + - @backstage/plugin-search-backend-module-techdocs@0.1.24-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + - @backstage/plugin-signals-backend@0.1.5-next.1 + - @backstage/plugin-techdocs-backend@1.10.6-next.1 + - example-app@0.2.98-next.1 + - @backstage/plugin-catalog-backend-module-unprocessed@0.4.6-next.1 + - @backstage/plugin-signals-node@0.1.5-next.1 + ## 0.2.99-next.0 ### Patch Changes diff --git a/packages/backend-legacy/package.json b/packages/backend-legacy/package.json index cad1a50b7f..abdf3cb500 100644 --- a/packages/backend-legacy/package.json +++ b/packages/backend-legacy/package.json @@ -1,6 +1,6 @@ { "name": "example-backend-legacy", - "version": "0.2.99-next.0", + "version": "0.2.99-next.1", "backstage": { "role": "backend" }, diff --git a/packages/backend-plugin-api/CHANGELOG.md b/packages/backend-plugin-api/CHANGELOG.md index 74b0cfdab9..0676d76360 100644 --- a/packages/backend-plugin-api/CHANGELOG.md +++ b/packages/backend-plugin-api/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/backend-plugin-api +## 0.6.19-next.1 + +### Patch Changes + +- 9e63318: Added an optional `accessRestrictions` to external access service tokens and service principals in general, such that you can limit their access to certain plugins or permissions. +- 0665b7e: Renamed `BackendPluginConfig`, `BackendModuleConfig`, and `ExtensionPointConfig` respectively to `CreateBackendPluginOptions`, `CreateBackendModuleOptions`, and `CreateExtensionPointOptions` to standardize frontend and backend factories signatures. +- Updated dependencies + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 0.6.19-next.0 ### Patch Changes diff --git a/packages/backend-plugin-api/package.json b/packages/backend-plugin-api/package.json index ec84d31a45..7fbd8d8b2f 100644 --- a/packages/backend-plugin-api/package.json +++ b/packages/backend-plugin-api/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-plugin-api", - "version": "0.6.19-next.0", + "version": "0.6.19-next.1", "description": "Core API used by Backstage backend plugins", "backstage": { "role": "node-library" diff --git a/packages/backend-tasks/CHANGELOG.md b/packages/backend-tasks/CHANGELOG.md index 25290d5575..a8dd81ce25 100644 --- a/packages/backend-tasks/CHANGELOG.md +++ b/packages/backend-tasks/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/backend-tasks +## 0.5.24-next.1 + +### Patch Changes + +- ed473cd: Updated the `TaskScheduleDefinitionConfig` deprecated comment to point to `SchedulerServiceTaskScheduleDefinitionConfig` +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + ## 0.5.24-next.0 ### Patch Changes diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index c57e334185..8a4de36426 100644 --- a/packages/backend-tasks/package.json +++ b/packages/backend-tasks/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-tasks", "description": "Common distributed task management library for Backstage backends", - "version": "0.5.24-next.0", + "version": "0.5.24-next.1", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-test-utils/CHANGELOG.md b/packages/backend-test-utils/CHANGELOG.md index aaf2cf4e27..c9a93857f7 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/backend-test-utils +## 0.4.0-next.1 + +### Minor Changes + +- 805cbe7: Added `TestCaches` that functions just like `TestDatabases` + +### Patch Changes + +- 9e63318: Made it possible to give access restrictions to `mockCredentials.service` +- Updated dependencies + - @backstage/backend-app-api@0.7.6-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + ## 0.3.9-next.0 ### Patch Changes diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index c84956e58a..dfc3ea82cc 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/backend-test-utils", - "version": "0.3.9-next.0", + "version": "0.4.0-next.1", "description": "Test helpers library for Backstage backends", "backstage": { "role": "node-library" diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index 3b4104ece6..a8937ec456 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,39 @@ # example-backend +## 0.0.27-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/plugin-search-backend@1.5.10-next.1 + - @backstage/backend-defaults@0.3.0-next.1 + - @backstage/plugin-kubernetes-backend@0.18.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/plugin-scaffolder-backend@1.22.8-next.1 + - @backstage/plugin-notifications-backend@0.3.0-next.1 + - @backstage/plugin-app-backend@0.3.68-next.1 + - @backstage/plugin-auth-backend@0.22.6-next.1 + - @backstage/plugin-auth-backend-module-github-provider@0.1.16-next.0 + - @backstage/plugin-auth-backend-module-guest-provider@0.1.5-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-backend-module-openapi@0.1.37-next.1 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17-next.1 + - @backstage/plugin-devtools-backend@0.3.5-next.1 + - @backstage/plugin-permission-backend@0.5.43-next.1 + - @backstage/plugin-permission-backend-module-allow-all-policy@0.1.16-next.0 + - @backstage/plugin-proxy-backend@0.5.0-next.1 + - @backstage/plugin-scaffolder-backend-module-github@0.2.9-next.1 + - @backstage/plugin-search-backend-module-catalog@0.1.25-next.1 + - @backstage/plugin-search-backend-module-explore@0.1.25-next.1 + - @backstage/plugin-search-backend-module-techdocs@0.1.24-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + - @backstage/plugin-signals-backend@0.1.5-next.1 + - @backstage/plugin-techdocs-backend@1.10.6-next.1 + - @backstage/plugin-catalog-backend-module-unprocessed@0.4.6-next.1 + ## 0.0.27-next.0 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index 4ab3798633..999d4dcc46 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.0.27-next.0", + "version": "0.0.27-next.1", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index f3b7d52c7e..3ad3bf3fe5 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/cli +## 0.26.7-next.1 + +### Patch Changes + +- 788eca7: Fix readme for new plugins created using cli +- c00f7ee: Fix issue with `esm` loaded dependencies being different from the `cjs` import for Vite dependencies +- Updated dependencies + - @backstage/cli-node@0.2.6-next.0 + - @backstage/config-loader@1.8.0 + ## 0.26.6-next.0 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 8479ff192e..e66202b92c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/cli", - "version": "0.26.6-next.0", + "version": "0.26.7-next.1", "description": "CLI for developing Backstage plugins and apps", "backstage": { "role": "cli" diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index 6fa1ef51c8..67560bf6c3 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/create-app +## 0.5.16-next.1 + +### Patch Changes + +- Bumped create-app version. + ## 0.5.16-next.0 ### Patch Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index d8bfb337fa..5f6566e78a 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "A CLI that helps you create your own Backstage app", - "version": "0.5.16-next.0", + "version": "0.5.16-next.1", "publishConfig": { "access": "public" }, diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index 4e4707d7f5..0f44f1ca88 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/repo-tools +## 0.9.1-next.1 + +### Patch Changes + +- 8721a02: Add `--client-additional-properties` option to `openapi generate` command +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/cli-node@0.2.6-next.0 + - @backstage/config-loader@1.8.0 + ## 0.9.1-next.0 ### Patch Changes diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index dd0ba95ee7..fa6e99485a 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/repo-tools", "description": "CLI for Backstage repo tooling ", - "version": "0.9.1-next.0", + "version": "0.9.1-next.1", "publishConfig": { "access": "public" }, diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index a154513749..6f72a73b79 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,13 @@ # @techdocs/cli +## 1.8.12-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-techdocs-node@1.12.5-next.1 + ## 1.8.12-next.0 ### Patch Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index 3edd15e192..8db3eace5e 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "Utility CLI for managing TechDocs sites in Backstage.", - "version": "1.8.12-next.0", + "version": "1.8.12-next.1", "publishConfig": { "access": "public" }, diff --git a/plugins/app-backend/CHANGELOG.md b/plugins/app-backend/CHANGELOG.md index 77de6588f4..4be30962c0 100644 --- a/plugins/app-backend/CHANGELOG.md +++ b/plugins/app-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-app-backend +## 0.3.68-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/config-loader@1.8.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 0.3.68-next.0 ### Patch Changes diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index 177b91a202..0b8bf97107 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-app-backend", "description": "A Backstage backend plugin that serves the Backstage frontend app", - "version": "0.3.68-next.0", + "version": "0.3.68-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md b/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md index 1da1830fab..ba07bcf852 100644 --- a/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-aws-alb-provider/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-auth-backend-module-aws-alb-provider +## 0.1.11-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-backend@0.22.6-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 0.1.11-next.0 ### Patch Changes diff --git a/plugins/auth-backend-module-aws-alb-provider/package.json b/plugins/auth-backend-module-aws-alb-provider/package.json index 3d2f4f890b..924b7323e9 100644 --- a/plugins/auth-backend-module-aws-alb-provider/package.json +++ b/plugins/auth-backend-module-aws-alb-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-aws-alb-provider", "description": "The aws-alb provider module for the Backstage auth backend.", - "version": "0.1.11-next.0", + "version": "0.1.11-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/auth-backend-module-cloudflare-access-provider/CHANGELOG.md b/plugins/auth-backend-module-cloudflare-access-provider/CHANGELOG.md index e532415c6b..d3f83d4c6c 100644 --- a/plugins/auth-backend-module-cloudflare-access-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-cloudflare-access-provider/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-auth-backend-module-cloudflare-access-provider +## 0.1.2-next.1 + +### Patch Changes + +- 1354d81: Use `node-fetch` instead of native fetch, as per https://backstage.io/docs/architecture-decisions/adrs-adr013 +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 0.1.2-next.0 ### Patch Changes diff --git a/plugins/auth-backend-module-cloudflare-access-provider/package.json b/plugins/auth-backend-module-cloudflare-access-provider/package.json index a332207890..67b1ad284b 100644 --- a/plugins/auth-backend-module-cloudflare-access-provider/package.json +++ b/plugins/auth-backend-module-cloudflare-access-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-cloudflare-access-provider", - "version": "0.1.2-next.0", + "version": "0.1.2-next.1", "description": "The cloudflare-access-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/auth-backend-module-guest-provider/CHANGELOG.md b/plugins/auth-backend-module-guest-provider/CHANGELOG.md index ae130e0fe2..4afdc14430 100644 --- a/plugins/auth-backend-module-guest-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-guest-provider/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-auth-backend-module-guest-provider +## 0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 0.1.5-next.0 ### Patch Changes diff --git a/plugins/auth-backend-module-guest-provider/package.json b/plugins/auth-backend-module-guest-provider/package.json index 86276daea3..c29e5739f4 100644 --- a/plugins/auth-backend-module-guest-provider/package.json +++ b/plugins/auth-backend-module-guest-provider/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend-module-guest-provider", - "version": "0.1.5-next.0", + "version": "0.1.5-next.1", "description": "The guest-provider backend module for the auth plugin.", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/auth-backend-module-oidc-provider/CHANGELOG.md b/plugins/auth-backend-module-oidc-provider/CHANGELOG.md index 191f459689..50d88f11b7 100644 --- a/plugins/auth-backend-module-oidc-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-oidc-provider/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-auth-backend-module-oidc-provider +## 0.1.10-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-backend@0.22.6-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 0.1.10-next.0 ### Patch Changes diff --git a/plugins/auth-backend-module-oidc-provider/package.json b/plugins/auth-backend-module-oidc-provider/package.json index cbdffb0f02..5b7701e96c 100644 --- a/plugins/auth-backend-module-oidc-provider/package.json +++ b/plugins/auth-backend-module-oidc-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-oidc-provider", "description": "The oidc-provider backend module for the auth plugin.", - "version": "0.1.10-next.0", + "version": "0.1.10-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index fd910b9377..4f12db77b8 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/plugin-auth-backend +## 0.22.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-auth-backend-module-cloudflare-access-provider@0.1.2-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-backend-module-atlassian-provider@0.1.11-next.0 + - @backstage/plugin-auth-backend-module-aws-alb-provider@0.1.11-next.1 + - @backstage/plugin-auth-backend-module-azure-easyauth-provider@0.1.2-next.0 + - @backstage/plugin-auth-backend-module-bitbucket-provider@0.1.2-next.0 + - @backstage/plugin-auth-backend-module-gcp-iap-provider@0.2.14-next.0 + - @backstage/plugin-auth-backend-module-github-provider@0.1.16-next.0 + - @backstage/plugin-auth-backend-module-gitlab-provider@0.1.16-next.0 + - @backstage/plugin-auth-backend-module-google-provider@0.1.16-next.0 + - @backstage/plugin-auth-backend-module-microsoft-provider@0.1.14-next.0 + - @backstage/plugin-auth-backend-module-oauth2-provider@0.1.16-next.0 + - @backstage/plugin-auth-backend-module-oauth2-proxy-provider@0.1.12-next.0 + - @backstage/plugin-auth-backend-module-oidc-provider@0.1.10-next.1 + - @backstage/plugin-auth-backend-module-okta-provider@0.0.12-next.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.22.6-next.0 ### Patch Changes diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index cccb390b5b..c3606041f6 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend", - "version": "0.22.6-next.0", + "version": "0.22.6-next.1", "description": "A Backstage backend plugin that handles authentication", "backstage": { "role": "backend-plugin" diff --git a/plugins/auth-node/CHANGELOG.md b/plugins/auth-node/CHANGELOG.md index b60cf12574..5135ff8c91 100644 --- a/plugins/auth-node/CHANGELOG.md +++ b/plugins/auth-node/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-auth-node +## 0.4.14-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + ## 0.4.14-next.0 ### Patch Changes diff --git a/plugins/auth-node/package.json b/plugins/auth-node/package.json index 5fad67b237..4e6057f30e 100644 --- a/plugins/auth-node/package.json +++ b/plugins/auth-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-node", - "version": "0.4.14-next.0", + "version": "0.4.14-next.1", "backstage": { "role": "node-library" }, diff --git a/plugins/catalog-backend-module-aws/CHANGELOG.md b/plugins/catalog-backend-module-aws/CHANGELOG.md index 13280d414a..0ec8426f1c 100644 --- a/plugins/catalog-backend-module-aws/CHANGELOG.md +++ b/plugins/catalog-backend-module-aws/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-aws +## 0.3.14-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.3.14-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-aws/package.json b/plugins/catalog-backend-module-aws/package.json index 69d692a4cc..a36211ec13 100644 --- a/plugins/catalog-backend-module-aws/package.json +++ b/plugins/catalog-backend-module-aws/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-aws", - "version": "0.3.14-next.0", + "version": "0.3.14-next.1", "description": "A Backstage catalog backend module that helps integrate towards AWS", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-azure/CHANGELOG.md b/plugins/catalog-backend-module-azure/CHANGELOG.md index 205c5a2b17..8b21c42d1f 100644 --- a/plugins/catalog-backend-module-azure/CHANGELOG.md +++ b/plugins/catalog-backend-module-azure/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-azure +## 0.1.39-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.1.39-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-azure/package.json b/plugins/catalog-backend-module-azure/package.json index 221e0058eb..aa476f0ebc 100644 --- a/plugins/catalog-backend-module-azure/package.json +++ b/plugins/catalog-backend-module-azure/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-azure", - "version": "0.1.39-next.0", + "version": "0.1.39-next.1", "description": "A Backstage catalog backend module that helps integrate towards Azure", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md index c02efbc491..2acbc2edc8 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-bitbucket-cloud +## 0.2.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + ## 0.2.6-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-cloud/package.json b/plugins/catalog-backend-module-bitbucket-cloud/package.json index 667bdf4a23..37d6978721 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/package.json +++ b/plugins/catalog-backend-module-bitbucket-cloud/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-cloud", "description": "A Backstage catalog backend module that helps integrate towards Bitbucket Cloud", - "version": "0.2.6-next.0", + "version": "0.2.6-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md index 534be4549d..d719c3ed22 100644 --- a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-bitbucket-server +## 0.1.33-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.1.33-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index d9e46ebec4..6b8bddb330 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-server", - "version": "0.1.33-next.0", + "version": "0.1.33-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-gcp/CHANGELOG.md b/plugins/catalog-backend-module-gcp/CHANGELOG.md index 3903d46108..e315bb0d4c 100644 --- a/plugins/catalog-backend-module-gcp/CHANGELOG.md +++ b/plugins/catalog-backend-module-gcp/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-gcp +## 0.1.20-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.1.20-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-gcp/package.json b/plugins/catalog-backend-module-gcp/package.json index b832dfafab..2233d76705 100644 --- a/plugins/catalog-backend-module-gcp/package.json +++ b/plugins/catalog-backend-module-gcp/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gcp", - "version": "0.1.20-next.0", + "version": "0.1.20-next.1", "description": "A Backstage catalog backend module that helps integrate towards GCP", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-gerrit/CHANGELOG.md b/plugins/catalog-backend-module-gerrit/CHANGELOG.md index 206c04b47c..8db092ca63 100644 --- a/plugins/catalog-backend-module-gerrit/CHANGELOG.md +++ b/plugins/catalog-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-gerrit +## 0.1.36-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.1.36-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-gerrit/package.json b/plugins/catalog-backend-module-gerrit/package.json index 130ba40687..8a636884f2 100644 --- a/plugins/catalog-backend-module-gerrit/package.json +++ b/plugins/catalog-backend-module-gerrit/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gerrit", - "version": "0.1.36-next.0", + "version": "0.1.36-next.1", "backstage": { "role": "backend-plugin-module" }, diff --git a/plugins/catalog-backend-module-github-org/CHANGELOG.md b/plugins/catalog-backend-module-github-org/CHANGELOG.md index 6a9793f161..213e9eb3f8 100644 --- a/plugins/catalog-backend-module-github-org/CHANGELOG.md +++ b/plugins/catalog-backend-module-github-org/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-catalog-backend-module-github-org +## 0.1.14-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-backend-module-github@0.6.2-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + ## 0.1.14-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-github-org/package.json b/plugins/catalog-backend-module-github-org/package.json index a6d2f7cfcc..f1dc9303d7 100644 --- a/plugins/catalog-backend-module-github-org/package.json +++ b/plugins/catalog-backend-module-github-org/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-github-org", - "version": "0.1.14-next.0", + "version": "0.1.14-next.1", "description": "The github-org backend module for the catalog plugin.", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-github/CHANGELOG.md b/plugins/catalog-backend-module-github/CHANGELOG.md index b25241c192..3649676fef 100644 --- a/plugins/catalog-backend-module-github/CHANGELOG.md +++ b/plugins/catalog-backend-module-github/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-catalog-backend-module-github +## 0.6.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + ## 0.6.2-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-github/package.json b/plugins/catalog-backend-module-github/package.json index 4a53a7d389..1c7c110d7f 100644 --- a/plugins/catalog-backend-module-github/package.json +++ b/plugins/catalog-backend-module-github/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-github", - "version": "0.6.2-next.0", + "version": "0.6.2-next.1", "description": "A Backstage catalog backend module that helps integrate towards GitHub", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md b/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md index 58f9136ac5..8b309890eb 100644 --- a/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md +++ b/plugins/catalog-backend-module-gitlab-org/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-gitlab-org +## 0.0.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-catalog-backend-module-gitlab@0.3.17-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + ## 0.0.2-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab-org/package.json b/plugins/catalog-backend-module-gitlab-org/package.json index 91972cd3df..e763b59b64 100644 --- a/plugins/catalog-backend-module-gitlab-org/package.json +++ b/plugins/catalog-backend-module-gitlab-org/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gitlab-org", - "version": "0.0.2-next.0", + "version": "0.0.2-next.1", "description": "The gitlab-org backend module for the catalog plugin.", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-gitlab/CHANGELOG.md b/plugins/catalog-backend-module-gitlab/CHANGELOG.md index d4fc84ed2a..11556923cc 100644 --- a/plugins/catalog-backend-module-gitlab/CHANGELOG.md +++ b/plugins/catalog-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-backend-module-gitlab +## 0.3.17-next.1 + +### Patch Changes + +- 150fc77: Fixed an issue in `GitlabOrgDiscoveryEntityProvider` where a missing `orgEnabled` config key was throwing an error. +- f271164: Fixed an issue in `GitlabDiscoveryEntityProvider` where the fallback branch was taking precedence over the GitLab default branch. +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + ## 0.3.17-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab/package.json b/plugins/catalog-backend-module-gitlab/package.json index c4d4c07131..0d8379dc6c 100644 --- a/plugins/catalog-backend-module-gitlab/package.json +++ b/plugins/catalog-backend-module-gitlab/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gitlab", - "version": "0.3.17-next.0", + "version": "0.3.17-next.1", "description": "A Backstage catalog backend module that helps integrate towards GitLab", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md b/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md index 5051cf43db..a25cb9f75a 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md +++ b/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-catalog-backend-module-incremental-ingestion +## 0.4.24-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + ## 0.4.24-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-incremental-ingestion/package.json b/plugins/catalog-backend-module-incremental-ingestion/package.json index ab4bacf252..951c0d9f93 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/package.json +++ b/plugins/catalog-backend-module-incremental-ingestion/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-incremental-ingestion", - "version": "0.4.24-next.0", + "version": "0.4.24-next.1", "description": "An entity provider for streaming large asset sources into the catalog", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-ldap/CHANGELOG.md b/plugins/catalog-backend-module-ldap/CHANGELOG.md index 6410c0bde3..a7a1efa77b 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.6.0-next.1 + +### Minor Changes + +- debcc8c: Migrate LDAP catalog module to the new backend system. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.5.35-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-ldap/README.md b/plugins/catalog-backend-module-ldap/README.md index 2bc34ba949..6fd05dda3b 100644 --- a/plugins/catalog-backend-module-ldap/README.md +++ b/plugins/catalog-backend-module-ldap/README.md @@ -8,3 +8,7 @@ groups from your Active Directory or another LDAP compatible server. See [Backstage documentation](https://backstage.io/docs/integrations/ldap/org) for details on how to install and configure the plugin. + +## Legacy backend + +You can find the legacy documentation at `docs/integrations/ldap/org--old.md`. diff --git a/plugins/catalog-backend-module-ldap/api-report.md b/plugins/catalog-backend-module-ldap/api-report.md index 76276c8fad..5fcbbc3091 100644 --- a/plugins/catalog-backend-module-ldap/api-report.md +++ b/plugins/catalog-backend-module-ldap/api-report.md @@ -3,20 +3,26 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts +import { BackendFeature } from '@backstage/backend-plugin-api'; import { CatalogProcessor } from '@backstage/plugin-catalog-node'; import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node'; import { Client } from 'ldapjs'; import { Config } from '@backstage/config'; import { EntityProvider } from '@backstage/plugin-catalog-node'; import { EntityProviderConnection } from '@backstage/plugin-catalog-node'; +import { ExtensionPoint } from '@backstage/backend-plugin-api'; import { GroupEntity } from '@backstage/catalog-model'; +import { GroupTransformer as GroupTransformer_2 } from '@backstage/plugin-catalog-backend-module-ldap'; import { JsonValue } from '@backstage/types'; import { LocationSpec } from '@backstage/plugin-catalog-common'; import { LoggerService } from '@backstage/backend-plugin-api'; +import { PluginTaskScheduler } from '@backstage/backend-tasks'; import { SearchEntry } from 'ldapjs'; import { SearchOptions } from 'ldapjs'; import { TaskRunner } from '@backstage/backend-tasks'; +import { TaskScheduleDefinition } from '@backstage/backend-tasks'; import { UserEntity } from '@backstage/catalog-model'; +import { UserTransformer as UserTransformer_2 } from '@backstage/plugin-catalog-backend-module-ldap'; // @public export type BindConfig = { @@ -24,6 +30,10 @@ export type BindConfig = { secret: string; }; +// @public +const catalogModuleLdapOrgEntityProvider: () => BackendFeature; +export default catalogModuleLdapOrgEntityProvider; + // @public export function defaultGroupTransformer( vendor: LdapVendor, @@ -109,14 +119,19 @@ export class LdapOrgEntityProvider implements EntityProvider { static fromConfig( configRoot: Config, options: LdapOrgEntityProviderOptions, + ): LdapOrgEntityProvider[]; + // (undocumented) + static fromLegacyConfig( + configRoot: Config, + options: LdapOrgEntityProviderLegacyOptions, ): LdapOrgEntityProvider; // (undocumented) getProviderName(): string; read(options?: { logger?: LoggerService }): Promise; } -// @public -export interface LdapOrgEntityProviderOptions { +// @public @deprecated +export interface LdapOrgEntityProviderLegacyOptions { groupTransformer?: GroupTransformer; id: string; logger: LoggerService; @@ -125,6 +140,30 @@ export interface LdapOrgEntityProviderOptions { userTransformer?: UserTransformer; } +// @public +export type LdapOrgEntityProviderOptions = + | LdapOrgEntityProviderLegacyOptions + | { + logger: LoggerService; + schedule?: 'manual' | TaskRunner; + scheduler?: PluginTaskScheduler; + userTransformer?: UserTransformer | Record; + groupTransformer?: GroupTransformer | Record; + }; + +// @public +export interface LdapOrgEntityProviderTransformsExtensionPoint { + setGroupTransformer( + transformer: GroupTransformer_2 | Record, + ): void; + setUserTransformer( + transformer: UserTransformer_2 | Record, + ): void; +} + +// @public +export const ldapOrgEntityProviderTransformsExtensionPoint: ExtensionPoint; + // @public export class LdapOrgReaderProcessor implements CatalogProcessor { constructor(options: { @@ -154,11 +193,13 @@ export class LdapOrgReaderProcessor implements CatalogProcessor { // @public export type LdapProviderConfig = { + id: string; target: string; tls?: TLSConfig; bind?: BindConfig; users: UserConfig; groups: GroupConfig; + schedule?: TaskScheduleDefinition; }; // @public @@ -176,8 +217,8 @@ export function mapStringAttr( setter: (value: string) => void, ): void; -// @public -export function readLdapConfig(config: Config): LdapProviderConfig[]; +// @public @deprecated +export function readLdapLegacyConfig(config: Config): LdapProviderConfig[]; // @public export function readLdapOrg( @@ -194,6 +235,9 @@ export function readLdapOrg( groups: GroupEntity[]; }>; +// @public +export function readProviderConfigs(config: Config): LdapProviderConfig[]; + // @public export type TLSConfig = { rejectUnauthorized?: boolean; diff --git a/plugins/catalog-backend-module-ldap/config.d.ts b/plugins/catalog-backend-module-ldap/config.d.ts index eb9564f20d..a585471033 100644 --- a/plugins/catalog-backend-module-ldap/config.d.ts +++ b/plugins/catalog-backend-module-ldap/config.d.ts @@ -19,6 +19,8 @@ import { JsonValue } from '@backstage/types'; export interface Config { /** * LdapOrgEntityProvider / LdapOrgReaderProcessor configuration + * + * @deprecated This exists for backwards compatibility only and will be removed in the future. */ ldap?: { /** @@ -240,12 +242,237 @@ export interface Config { /** * Configuration options for the catalog plugin. - * - * TODO(freben): Deprecate this entire block */ catalog?: { + /** + * List of provider-specific options and attributes + */ + providers?: { + /** + * LdapOrg provider key + */ + ldapOrg: { + /** + * Id of the LdapOrg provider + */ + [id: string]: { + /** + * The prefix of the target that this matches on, e.g. + * "ldaps://ds.example.net", with no trailing slash. + */ + target: string; + + /** + * The settings to use for the bind command. If none are specified, + * the bind command is not issued. + */ + bind?: { + /** + * The DN of the user to auth as. + * + * E.g. "uid=ldap-robot,ou=robots,ou=example,dc=example,dc=net" + */ + dn: string; + /** + * The secret of the user to auth as (its password). + * + * @visibility secret + */ + secret: string; + }; + + /** + * TLS settings + */ + tls?: { + // Node TLS rejectUnauthorized + rejectUnauthorized?: boolean; + }; + + /** + * The settings that govern the reading and interpretation of users. + */ + users: { + /** + * The DN under which users are stored. + * + * E.g. "ou=people,ou=example,dc=example,dc=net" + */ + dn: string; + /** + * The search options to use. The default is scope "one" and + * attributes "*" and "+". + * + * It is common to want to specify a filter, to narrow down the set + * of matching items. + */ + options: { + scope?: 'base' | 'one' | 'sub'; + filter?: string; + attributes?: string | string[]; + sizeLimit?: number; + timeLimit?: number; + derefAliases?: number; + typesOnly?: boolean; + paged?: + | boolean + | { + pageSize?: number; + pagePause?: boolean; + }; + }; + /** + * JSON paths (on a.b.c form) and hard coded values to set on those + * paths. + * + * This can be useful for example if you want to hard code a + * namespace or similar on the generated entities. + */ + set?: { [key: string]: JsonValue }; + /** + * Mappings from well known entity fields, to LDAP attribute names + */ + map?: { + /** + * The name of the attribute that holds the relative + * distinguished name of each entry. Defaults to "uid". + */ + rdn?: string; + /** + * The name of the attribute that shall be used for the value of + * the metadata.name field of the entity. Defaults to "uid". + */ + name?: string; + /** + * The name of the attribute that shall be used for the value of + * the metadata.description field of the entity. + */ + description?: string; + /** + * The name of the attribute that shall be used for the value of + * the spec.profile.displayName field of the entity. Defaults to + * "cn". + */ + displayName?: string; + /** + * The name of the attribute that shall be used for the value of + * the spec.profile.email field of the entity. Defaults to + * "mail". + */ + email?: string; + /** + * The name of the attribute that shall be used for the value of + * the spec.profile.picture field of the entity. + */ + picture?: string; + /** + * The name of the attribute that shall be used for the values of + * the spec.memberOf field of the entity. Defaults to "memberOf". + */ + memberOf?: string; + }; + }; + + /** + * The settings that govern the reading and interpretation of groups. + */ + groups: { + /** + * The DN under which groups are stored. + * + * E.g. "ou=people,ou=example,dc=example,dc=net" + */ + dn: string; + /** + * The search options to use. The default is scope "one" and + * attributes "*" and "+". + * + * It is common to want to specify a filter, to narrow down the set + * of matching items. + */ + options: { + scope?: 'base' | 'one' | 'sub'; + filter?: string; + attributes?: string | string[]; + sizeLimit?: number; + timeLimit?: number; + derefAliases?: number; + typesOnly?: boolean; + paged?: + | boolean + | { + pageSize?: number; + pagePause?: boolean; + }; + }; + /** + * JSON paths (on a.b.c form) and hard coded values to set on those + * paths. + * + * This can be useful for example if you want to hard code a + * namespace or similar on the generated entities. + */ + set?: { [key: string]: JsonValue }; + /** + * Mappings from well known entity fields, to LDAP attribute names + */ + map?: { + /** + * The name of the attribute that holds the relative + * distinguished name of each entry. Defaults to "cn". + */ + rdn?: string; + /** + * The name of the attribute that shall be used for the value of + * the metadata.name field of the entity. Defaults to "cn". + */ + name?: string; + /** + * The name of the attribute that shall be used for the value of + * the metadata.description field of the entity. Defaults to + * "description". + */ + description?: string; + /** + * The name of the attribute that shall be used for the value of + * the spec.type field of the entity. Defaults to "groupType". + */ + type?: string; + /** + * The name of the attribute that shall be used for the value of + * the spec.profile.displayName field of the entity. Defaults to + * "cn". + */ + displayName?: string; + /** + * The name of the attribute that shall be used for the value of + * the spec.profile.email field of the entity. + */ + email?: string; + /** + * The name of the attribute that shall be used for the value of + * the spec.profile.picture field of the entity. + */ + picture?: string; + /** + * The name of the attribute that shall be used for the values of + * the spec.parent field of the entity. Defaults to "memberOf". + */ + memberOf?: string; + /** + * The name of the attribute that shall be used for the values of + * the spec.children field of the entity. Defaults to "member". + */ + members?: string; + }; + }; + }; + }; + }; /** * List of processor-specific options and attributes + * + * @deprecated This exists for backwards compatibility only and will be removed in the future. */ processors?: { /** diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index 8bfa0905f6..5c954561e9 100644 --- a/plugins/catalog-backend-module-ldap/package.json +++ b/plugins/catalog-backend-module-ldap/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-ldap", - "version": "0.5.35-next.0", + "version": "0.6.0-next.1", "description": "A Backstage catalog backend module that helps integrate towards LDAP", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-ldap/src/index.ts b/plugins/catalog-backend-module-ldap/src/index.ts index 243044369c..f3ffacb93a 100644 --- a/plugins/catalog-backend-module-ldap/src/index.ts +++ b/plugins/catalog-backend-module-ldap/src/index.ts @@ -22,3 +22,8 @@ export * from './processors'; export * from './ldap'; +export { + catalogModuleLdapOrgEntityProvider as default, + ldapOrgEntityProviderTransformsExtensionPoint, + type LdapOrgEntityProviderTransformsExtensionPoint, +} from './module'; diff --git a/plugins/catalog-backend-module-ldap/src/ldap/config.test.ts b/plugins/catalog-backend-module-ldap/src/ldap/config.test.ts index 722625f3ed..ddea9de03f 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/config.test.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/config.test.ts @@ -15,26 +15,31 @@ */ import { ConfigReader } from '@backstage/config'; -import { readLdapConfig } from './config'; +import { readProviderConfigs } from './config'; describe('readLdapConfig', () => { it('applies all of the defaults', () => { const config = { - providers: [ - { - target: 'target', - users: { - dn: 'udn', - }, - groups: { - dn: 'gdn', + catalog: { + providers: { + ldapOrg: { + default: { + target: 'target', + users: { + dn: 'udn', + }, + groups: { + dn: 'gdn', + }, + }, }, }, - ], + }, }; - const actual = readLdapConfig(new ConfigReader(config)); + const actual = readProviderConfigs(new ConfigReader(config)); const expected = [ { + id: 'default', target: 'target', bind: undefined, users: { @@ -76,72 +81,77 @@ describe('readLdapConfig', () => { it('reads all the values', () => { const config = { - providers: [ - { - target: 'target', - bind: { dn: 'bdn', secret: 's' }, - tls: { - rejectUnauthorized: false, - keys: '/tmp/keys.pem', - certs: '/tmp/certs.pem', - }, - users: { - dn: 'udn', - options: { - scope: 'base', - attributes: ['*'], - filter: 'f', - paged: true, - timeLimit: 42, - sizeLimit: 100, - derefAliases: 0, - typesOnly: false, - }, - set: { p: 'v' }, - map: { - rdn: 'u', - name: 'v', - description: 'd', - displayName: 'c', - email: 'm', - picture: 'p', - memberOf: 'm', - }, - }, - groups: { - dn: 'gdn', - options: { - scope: 'base', - attributes: ['*'], - filter: 'f', - paged: { - pageSize: 7, - pagePause: true, + catalog: { + providers: { + ldapOrg: { + default: { + target: 'target', + bind: { dn: 'bdn', secret: 's' }, + tls: { + rejectUnauthorized: false, + keys: '/tmp/keys.pem', + certs: '/tmp/certs.pem', + }, + users: { + dn: 'udn', + options: { + scope: 'base', + attributes: ['*'], + filter: 'f', + paged: true, + timeLimit: 42, + sizeLimit: 100, + derefAliases: 0, + typesOnly: false, + }, + set: { p: 'v' }, + map: { + rdn: 'u', + name: 'v', + description: 'd', + displayName: 'c', + email: 'm', + picture: 'p', + memberOf: 'm', + }, + }, + groups: { + dn: 'gdn', + options: { + scope: 'base', + attributes: ['*'], + filter: 'f', + paged: { + pageSize: 7, + pagePause: true, + }, + timeLimit: 42, + sizeLimit: 100, + derefAliases: 1, + typesOnly: true, + }, + set: { p: 'v' }, + map: { + rdn: 'u', + name: 'v', + description: 'd', + type: 't', + displayName: 'c', + email: 'm', + picture: 'p', + memberOf: 'm', + members: 'n', + }, }, - timeLimit: 42, - sizeLimit: 100, - derefAliases: 1, - typesOnly: true, - }, - set: { p: 'v' }, - map: { - rdn: 'u', - name: 'v', - description: 'd', - type: 't', - displayName: 'c', - email: 'm', - picture: 'p', - memberOf: 'm', - members: 'n', }, }, }, - ], + }, }; - const actual = readLdapConfig(new ConfigReader(config)); + const actual = readProviderConfigs(new ConfigReader(config)); const expected = [ { + id: 'default', target: 'target', bind: { dn: 'bdn', secret: 's' }, tls: { @@ -207,30 +217,34 @@ describe('readLdapConfig', () => { it('supports multiline ldap query filter', () => { const config = { - providers: [ - { - target: 'target', - users: { - dn: 'udn', - options: { - filter: ` - (| - (cn=foo bar) - (cn=bar) - ) - `, - }, - }, - groups: { - dn: 'gdn', - options: { - filter: 'f', + catalog: { + providers: { + ldapOrg: { + default: { + target: 'target', + users: { + dn: 'udn', + options: { + filter: ` + (| + (cn=foo bar) + (cn=bar) + ) + `, + }, + }, + groups: { + dn: 'gdn', + options: { + filter: 'f', + }, + }, }, }, }, - ], + }, }; - const actual = readLdapConfig(new ConfigReader(config)); + const actual = readProviderConfigs(new ConfigReader(config)); const expected = '(|(cn=foo bar)(cn=bar))'; expect(actual[0].users.options.filter).toEqual(expected); @@ -238,64 +252,72 @@ describe('readLdapConfig', () => { it('supports a dot nested set structure', () => { const config = { - providers: [ - { - target: 'target', - users: { - dn: 'udn', - options: { - filter: 'f', - }, - set: { - 'metadata.annotations': { - a: 'b', + catalog: { + providers: { + ldapOrg: { + default: { + target: 'target', + users: { + dn: 'udn', + options: { + filter: 'f', + }, + set: { + 'metadata.annotations': { + a: 'b', + }, + }, + }, + groups: { + dn: 'gdn', + options: { + filter: 'f', + }, + set: { + x: { a: 'b' }, + }, }, }, }, - groups: { - dn: 'gdn', - options: { - filter: 'f', - }, - set: { - x: { a: 'b' }, - }, - }, }, - ], + }, }; - const actual = readLdapConfig(new ConfigReader(config)); + const actual = readProviderConfigs(new ConfigReader(config)); expect(actual[0].users.set).toEqual({ 'metadata.annotations': { a: 'b' } }); }); it('throws on attempts to modify the set structure', () => { const config = { - providers: [ - { - target: 'target', - users: { - dn: 'udn', - options: { - filter: 'f', - }, - set: { - x: { a: 'b' }, - }, - }, - groups: { - dn: 'gdn', - options: { - filter: 'f', - }, - set: { - x: { a: 'b' }, + catalog: { + providers: { + ldapOrg: { + default: { + target: 'target', + users: { + dn: 'udn', + options: { + filter: 'f', + }, + set: { + x: { a: 'b' }, + }, + }, + groups: { + dn: 'gdn', + options: { + filter: 'f', + }, + set: { + x: { a: 'b' }, + }, + }, }, }, }, - ], + }, }; - const actual = readLdapConfig(new ConfigReader(config)); + const actual = readProviderConfigs(new ConfigReader(config)); expect(() => { (actual[0].users.set as any).y = 2; diff --git a/plugins/catalog-backend-module-ldap/src/ldap/config.ts b/plugins/catalog-backend-module-ldap/src/ldap/config.ts index 08aee5feee..2bd21fd166 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/config.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/config.ts @@ -14,6 +14,10 @@ * limitations under the License. */ +import { + readTaskScheduleDefinitionFromConfig, + TaskScheduleDefinition, +} from '@backstage/backend-tasks'; import { Config } from '@backstage/config'; import { JsonValue } from '@backstage/types'; import { SearchOptions } from 'ldapjs'; @@ -27,6 +31,8 @@ import { RecursivePartial } from './util'; * @public */ export type LdapProviderConfig = { + // The id of the + id: string; // The prefix of the target that this matches on, e.g. // "ldaps://ds.example.net", with no trailing slash. target: string; @@ -39,6 +45,8 @@ export type LdapProviderConfig = { users: UserConfig; // The settings that govern the reading and interpretation of groups groups: GroupConfig; + // Schedule configuration for refresh tasks. + schedule?: TaskScheduleDefinition; }; /** @@ -184,159 +192,160 @@ const defaultConfig = { }, }; +function freeze(data: T): T { + return JSON.parse(JSON.stringify(data), (_key, value) => { + if (typeof value === 'object' && value !== null) { + Object.freeze(value); + } + return value; + }); +} + +function readTlsConfig( + c: Config | undefined, +): LdapProviderConfig['tls'] | undefined { + if (!c) { + return undefined; + } + return { + rejectUnauthorized: c.getOptionalBoolean('rejectUnauthorized'), + keys: c.getOptionalString('keys'), + certs: c.getOptionalString('certs'), + }; +} + +function readBindConfig( + c: Config | undefined, +): LdapProviderConfig['bind'] | undefined { + if (!c) { + return undefined; + } + return { + dn: c.getString('dn'), + secret: c.getString('secret'), + }; +} + +function readOptionsConfig(c: Config | undefined): SearchOptions { + if (!c) { + return {}; + } + + const paged = readOptionsPagedConfig(c); + + return { + scope: c.getOptionalString('scope') as SearchOptions['scope'], + filter: formatFilter(c.getOptionalString('filter')), + attributes: c.getOptionalStringArray('attributes'), + sizeLimit: c.getOptionalNumber('sizeLimit'), + timeLimit: c.getOptionalNumber('timeLimit'), + derefAliases: c.getOptionalNumber('derefAliases'), + typesOnly: c.getOptionalBoolean('typesOnly'), + ...(paged !== undefined ? { paged } : undefined), + }; +} + +function readOptionsPagedConfig(c: Config): SearchOptions['paged'] { + const pagedConfig = c.getOptional('paged'); + if (pagedConfig === undefined) { + return undefined; + } + + if (pagedConfig === true || pagedConfig === false) { + return pagedConfig; + } + + const pageSize = c.getOptionalNumber('paged.pageSize'); + const pagePause = c.getOptionalBoolean('paged.pagePause'); + return { + ...(pageSize !== undefined ? { pageSize } : undefined), + ...(pagePause !== undefined ? { pagePause } : undefined), + }; +} + +function readSetConfig( + c: Config | undefined, +): { [path: string]: JsonValue } | undefined { + if (!c) { + return undefined; + } + return c.get(); +} + +function readUserMapConfig( + c: Config | undefined, +): Partial { + if (!c) { + return {}; + } + + return { + rdn: c.getOptionalString('rdn'), + name: c.getOptionalString('name'), + description: c.getOptionalString('description'), + displayName: c.getOptionalString('displayName'), + email: c.getOptionalString('email'), + picture: c.getOptionalString('picture'), + memberOf: c.getOptionalString('memberOf'), + }; +} + +function readGroupMapConfig( + c: Config | undefined, +): Partial { + if (!c) { + return {}; + } + + return { + rdn: c.getOptionalString('rdn'), + name: c.getOptionalString('name'), + description: c.getOptionalString('description'), + type: c.getOptionalString('type'), + displayName: c.getOptionalString('displayName'), + email: c.getOptionalString('email'), + picture: c.getOptionalString('picture'), + memberOf: c.getOptionalString('memberOf'), + members: c.getOptionalString('members'), + }; +} + +function readUserConfig( + c: Config, +): RecursivePartial { + return { + dn: c.getString('dn'), + options: readOptionsConfig(c.getOptionalConfig('options')), + set: readSetConfig(c.getOptionalConfig('set')), + map: readUserMapConfig(c.getOptionalConfig('map')), + }; +} + +function readGroupConfig( + c: Config, +): RecursivePartial { + return { + dn: c.getString('dn'), + options: readOptionsConfig(c.getOptionalConfig('options')), + set: readSetConfig(c.getOptionalConfig('set')), + map: readGroupMapConfig(c.getOptionalConfig('map')), + }; +} + +function formatFilter(filter?: string): string | undefined { + // Remove extra whitespace between blocks to support multiline filters from the configuration + return filter?.replace(/\s*(\(|\))/g, '$1')?.trim(); +} + /** * Parses configuration. * * @param config - The root of the LDAP config hierarchy * * @public + * @deprecated This exists for backwards compatibility only and will be removed in the future. */ -export function readLdapConfig(config: Config): LdapProviderConfig[] { - function freeze(data: T): T { - return JSON.parse(JSON.stringify(data), (_key, value) => { - if (typeof value === 'object' && value !== null) { - Object.freeze(value); - } - return value; - }); - } - - function readTlsConfig( - c: Config | undefined, - ): LdapProviderConfig['tls'] | undefined { - if (!c) { - return undefined; - } - return { - rejectUnauthorized: c.getOptionalBoolean('rejectUnauthorized'), - keys: c.getOptionalString('keys'), - certs: c.getOptionalString('certs'), - }; - } - - function readBindConfig( - c: Config | undefined, - ): LdapProviderConfig['bind'] | undefined { - if (!c) { - return undefined; - } - return { - dn: c.getString('dn'), - secret: c.getString('secret'), - }; - } - - function readOptionsConfig(c: Config | undefined): SearchOptions { - if (!c) { - return {}; - } - - const paged = readOptionsPagedConfig(c); - - return { - scope: c.getOptionalString('scope') as SearchOptions['scope'], - filter: formatFilter(c.getOptionalString('filter')), - attributes: c.getOptionalStringArray('attributes'), - sizeLimit: c.getOptionalNumber('sizeLimit'), - timeLimit: c.getOptionalNumber('timeLimit'), - derefAliases: c.getOptionalNumber('derefAliases'), - typesOnly: c.getOptionalBoolean('typesOnly'), - ...(paged !== undefined ? { paged } : undefined), - }; - } - - function readOptionsPagedConfig(c: Config): SearchOptions['paged'] { - const pagedConfig = c.getOptional('paged'); - if (pagedConfig === undefined) { - return undefined; - } - - if (pagedConfig === true || pagedConfig === false) { - return pagedConfig; - } - - const pageSize = c.getOptionalNumber('paged.pageSize'); - const pagePause = c.getOptionalBoolean('paged.pagePause'); - return { - ...(pageSize !== undefined ? { pageSize } : undefined), - ...(pagePause !== undefined ? { pagePause } : undefined), - }; - } - - function readSetConfig( - c: Config | undefined, - ): { [path: string]: JsonValue } | undefined { - if (!c) { - return undefined; - } - return c.get(); - } - - function readUserMapConfig( - c: Config | undefined, - ): Partial { - if (!c) { - return {}; - } - - return { - rdn: c.getOptionalString('rdn'), - name: c.getOptionalString('name'), - description: c.getOptionalString('description'), - displayName: c.getOptionalString('displayName'), - email: c.getOptionalString('email'), - picture: c.getOptionalString('picture'), - memberOf: c.getOptionalString('memberOf'), - }; - } - - function readGroupMapConfig( - c: Config | undefined, - ): Partial { - if (!c) { - return {}; - } - - return { - rdn: c.getOptionalString('rdn'), - name: c.getOptionalString('name'), - description: c.getOptionalString('description'), - type: c.getOptionalString('type'), - displayName: c.getOptionalString('displayName'), - email: c.getOptionalString('email'), - picture: c.getOptionalString('picture'), - memberOf: c.getOptionalString('memberOf'), - members: c.getOptionalString('members'), - }; - } - - function readUserConfig( - c: Config, - ): RecursivePartial { - return { - dn: c.getString('dn'), - options: readOptionsConfig(c.getOptionalConfig('options')), - set: readSetConfig(c.getOptionalConfig('set')), - map: readUserMapConfig(c.getOptionalConfig('map')), - }; - } - - function readGroupConfig( - c: Config, - ): RecursivePartial { - return { - dn: c.getString('dn'), - options: readOptionsConfig(c.getOptionalConfig('options')), - set: readSetConfig(c.getOptionalConfig('set')), - map: readGroupMapConfig(c.getOptionalConfig('map')), - }; - } - - function formatFilter(filter?: string): string | undefined { - // Remove extra whitespace between blocks to support multiline filters from the configuration - return filter?.replace(/\s*(\(|\))/g, '$1')?.trim(); - } - +export function readLdapLegacyConfig(config: Config): LdapProviderConfig[] { const providerConfigs = config.getOptionalConfigArray('providers') ?? []; return providerConfigs.map(c => { const newConfig = { @@ -353,3 +362,40 @@ export function readLdapConfig(config: Config): LdapProviderConfig[] { return freeze(merged) as LdapProviderConfig; }); } + +/** + * Parses all configured providers. + * + * @param config - The root of the LDAP config hierarchy + * + * @public + */ +export function readProviderConfigs(config: Config): LdapProviderConfig[] { + const providersConfig = config.getOptionalConfig('catalog.providers.ldapOrg'); + if (!providersConfig) { + return []; + } + + return providersConfig.keys().map(id => { + const c = providersConfig.getConfig(id); + + const schedule = c.has('schedule') + ? readTaskScheduleDefinitionFromConfig(c.getConfig('schedule')) + : undefined; + + const newConfig = { + id, + target: trimEnd(c.getString('target'), '/'), + tls: readTlsConfig(c.getOptionalConfig('tls')), + bind: readBindConfig(c.getOptionalConfig('bind')), + users: readUserConfig(c.getConfig('users')), + groups: readGroupConfig(c.getConfig('groups')), + schedule, + }; + const merged = mergeWith({}, defaultConfig, newConfig, (_into, from) => { + // Replace arrays instead of merging, otherwise default behavior + return Array.isArray(from) ? from : undefined; + }); + return freeze(merged) as LdapProviderConfig; + }); +} diff --git a/plugins/catalog-backend-module-ldap/src/ldap/index.ts b/plugins/catalog-backend-module-ldap/src/ldap/index.ts index 6d7800fbfd..cfab5a4444 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/index.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/index.ts @@ -16,7 +16,7 @@ export { LdapClient } from './client'; export { mapStringAttr } from './util'; -export { readLdapConfig } from './config'; +export { readProviderConfigs, readLdapLegacyConfig } from './config'; export type { LdapProviderConfig, GroupConfig, diff --git a/plugins/catalog-backend-module-ldap/src/module.ts b/plugins/catalog-backend-module-ldap/src/module.ts new file mode 100644 index 0000000000..ad76b133f1 --- /dev/null +++ b/plugins/catalog-backend-module-ldap/src/module.ts @@ -0,0 +1,114 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + coreServices, + createBackendModule, + createExtensionPoint, +} from '@backstage/backend-plugin-api'; +import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha'; +import { + GroupTransformer, + UserTransformer, +} from '@backstage/plugin-catalog-backend-module-ldap'; +import { LdapOrgEntityProvider } from './processors'; + +/** + * Interface for {@link LdapOrgEntityProviderTransformsExtensionPoint}. + * + * @public + */ +export interface LdapOrgEntityProviderTransformsExtensionPoint { + /** + * Set the function that transforms a user entry in LDAP to an entity. + * Optionally, you can pass separate transformers per provider ID. + */ + setUserTransformer( + transformer: UserTransformer | Record, + ): void; + + /** + * Set the function that transforms a group entry in LDAP to an entity. + * Optionally, you can pass separate transformers per provider ID. + */ + setGroupTransformer( + transformer: GroupTransformer | Record, + ): void; +} + +/** + * Extension point used to customize the transforms used by the module. + * + * @public + */ +export const ldapOrgEntityProviderTransformsExtensionPoint = + createExtensionPoint({ + id: 'catalog.ldapOrgEntityProvider.transforms', + }); + +/** + * Registers the LdapOrgEntityProvider with the catalog processing extension point. + * + * @public + */ +export const catalogModuleLdapOrgEntityProvider = createBackendModule({ + pluginId: 'catalog', + moduleId: 'ldapOrgEntityProvider', + register(env) { + let userTransformer: + | UserTransformer + | Record + | undefined; + let groupTransformer: + | GroupTransformer + | Record + | undefined; + + env.registerExtensionPoint(ldapOrgEntityProviderTransformsExtensionPoint, { + setUserTransformer(transformer) { + if (userTransformer) { + throw new Error('User transformer may only be set once'); + } + userTransformer = transformer; + }, + setGroupTransformer(transformer) { + if (groupTransformer) { + throw new Error('Group transformer may only be set once'); + } + groupTransformer = transformer; + }, + }); + + env.registerInit({ + deps: { + catalog: catalogProcessingExtensionPoint, + config: coreServices.rootConfig, + logger: coreServices.logger, + scheduler: coreServices.scheduler, + }, + async init({ catalog, config, logger, scheduler }) { + catalog.addEntityProvider( + LdapOrgEntityProvider.fromConfig(config, { + logger, + scheduler, + userTransformer: userTransformer, + groupTransformer: groupTransformer, + }), + ); + }, + }); + }, +}); diff --git a/plugins/catalog-backend-module-ldap/src/processors/LdapOrgEntityProvider.ts b/plugins/catalog-backend-module-ldap/src/processors/LdapOrgEntityProvider.ts index 97ea4a53b0..fb8f27d685 100644 --- a/plugins/catalog-backend-module-ldap/src/processors/LdapOrgEntityProvider.ts +++ b/plugins/catalog-backend-module-ldap/src/processors/LdapOrgEntityProvider.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { TaskRunner } from '@backstage/backend-tasks'; +import { PluginTaskScheduler, TaskRunner } from '@backstage/backend-tasks'; import { ANNOTATION_LOCATION, ANNOTATION_ORIGIN_LOCATION, @@ -32,18 +32,65 @@ import { LdapClient, LdapProviderConfig, LDAP_DN_ANNOTATION, - readLdapConfig, readLdapOrg, UserTransformer, } from '../ldap'; import { LoggerService } from '@backstage/backend-plugin-api'; +import { readLdapLegacyConfig, readProviderConfigs } from '../ldap'; /** * Options for {@link LdapOrgEntityProvider}. * * @public */ -export interface LdapOrgEntityProviderOptions { +export type LdapOrgEntityProviderOptions = + | LdapOrgEntityProviderLegacyOptions + | { + /** + * The logger to use. + */ + logger: LoggerService; + + /** + * The refresh schedule to use. + * + * @remarks + * + * If you pass in 'manual', you are responsible for calling the `read` method + * manually at some interval. + * + * But more commonly you will pass in the result of + * {@link @backstage/backend-tasks#PluginTaskScheduler.createScheduledTaskRunner} + * to enable automatic scheduling of tasks. + */ + schedule?: 'manual' | TaskRunner; + + /** + * Scheduler used to schedule refreshes based on + * the schedule config. + */ + scheduler?: PluginTaskScheduler; + + /** + * The function that transforms a user entry in msgraph to an entity. + * Optionally, you can pass separate transformers per provider ID. + */ + userTransformer?: UserTransformer | Record; + + /** + * The function that transforms a group entry in msgraph to an entity. + * Optionally, you can pass separate transformers per provider ID. + */ + groupTransformer?: GroupTransformer | Record; + }; + +/** + * Options for {@link LdapOrgEntityProvider}. + * + * @public + * @deprecated This interface exists for backwards compatibility only and will be removed in the future. + */ +export interface LdapOrgEntityProviderLegacyOptions { /** * A unique, stable identifier for this provider. * @@ -109,12 +156,68 @@ export class LdapOrgEntityProvider implements EntityProvider { static fromConfig( configRoot: Config, options: LdapOrgEntityProviderOptions, + ): LdapOrgEntityProvider[] { + if ('id' in options) { + return [LdapOrgEntityProvider.fromLegacyConfig(configRoot, options)]; + } + + if (!options.schedule && !options.scheduler) { + throw new Error('Either schedule or scheduler must be provided.'); + } + + function getTransformer( + id: string, + transformers?: T | Record, + ): T | undefined { + if (['undefined', 'function'].includes(typeof transformers)) { + return transformers as T; + } + + return (transformers as Record)[id]; + } + + return readProviderConfigs(configRoot).map(providerConfig => { + if (!options.schedule && !providerConfig.schedule) { + throw new Error( + `No schedule provided neither via code nor config for LdapOrgEntityProvider:${providerConfig.id}.`, + ); + } + + const taskRunner = + options.schedule ?? + options.scheduler!.createScheduledTaskRunner(providerConfig.schedule!); + + const provider = new LdapOrgEntityProvider({ + id: providerConfig.id, + provider: providerConfig, + logger: options.logger, + userTransformer: getTransformer( + providerConfig.id, + options.userTransformer, + ), + groupTransformer: getTransformer( + providerConfig.id, + options.groupTransformer, + ), + }); + + if (taskRunner !== 'manual') { + provider.schedule(taskRunner); + } + + return provider; + }); + } + + static fromLegacyConfig( + configRoot: Config, + options: LdapOrgEntityProviderLegacyOptions, ): LdapOrgEntityProvider { // TODO(freben): Deprecate the old catalog.processors.ldapOrg config const config = configRoot.getOptionalConfig('ldap') || configRoot.getOptionalConfig('catalog.processors.ldapOrg'); - const providers = config ? readLdapConfig(config) : []; + const providers = config ? readLdapLegacyConfig(config) : []; const provider = providers.find(p => options.target === p.target); if (!provider) { throw new TypeError( @@ -134,7 +237,9 @@ export class LdapOrgEntityProvider implements EntityProvider { logger, }); - result.schedule(options.schedule); + if (options.schedule !== 'manual') { + result.schedule(options.schedule); + } return result; } @@ -206,14 +311,10 @@ export class LdapOrgEntityProvider implements EntityProvider { markCommitComplete(); } - private schedule(schedule: LdapOrgEntityProviderOptions['schedule']) { - if (schedule === 'manual') { - return; - } - + private schedule(taskRunner: TaskRunner) { this.scheduleFn = async () => { const id = `${this.getProviderName()}:refresh`; - await schedule.run({ + await taskRunner.run({ id, fn: async () => { const logger = this.options.logger.child({ diff --git a/plugins/catalog-backend-module-ldap/src/processors/LdapOrgReaderProcessor.ts b/plugins/catalog-backend-module-ldap/src/processors/LdapOrgReaderProcessor.ts index c920968fc1..acbe128e0b 100644 --- a/plugins/catalog-backend-module-ldap/src/processors/LdapOrgReaderProcessor.ts +++ b/plugins/catalog-backend-module-ldap/src/processors/LdapOrgReaderProcessor.ts @@ -19,7 +19,7 @@ import { GroupTransformer, LdapClient, LdapProviderConfig, - readLdapConfig, + readLdapLegacyConfig, readLdapOrg, UserTransformer, } from '../ldap'; @@ -56,7 +56,7 @@ export class LdapOrgReaderProcessor implements CatalogProcessor { configRoot.getOptionalConfig('catalog.processors.ldapOrg'); return new LdapOrgReaderProcessor({ ...options, - providers: config ? readLdapConfig(config) : [], + providers: config ? readLdapLegacyConfig(config) : [], }); } diff --git a/plugins/catalog-backend-module-ldap/src/processors/index.ts b/plugins/catalog-backend-module-ldap/src/processors/index.ts index 5ed0095c3e..1a0a6a69c8 100644 --- a/plugins/catalog-backend-module-ldap/src/processors/index.ts +++ b/plugins/catalog-backend-module-ldap/src/processors/index.ts @@ -15,5 +15,8 @@ */ export { LdapOrgEntityProvider } from './LdapOrgEntityProvider'; -export type { LdapOrgEntityProviderOptions } from './LdapOrgEntityProvider'; +export type { + LdapOrgEntityProviderOptions, + LdapOrgEntityProviderLegacyOptions, +} from './LdapOrgEntityProvider'; export { LdapOrgReaderProcessor } from './LdapOrgReaderProcessor'; diff --git a/plugins/catalog-backend-module-msgraph/CHANGELOG.md b/plugins/catalog-backend-module-msgraph/CHANGELOG.md index 63b43005c7..7bbd4cf0fc 100644 --- a/plugins/catalog-backend-module-msgraph/CHANGELOG.md +++ b/plugins/catalog-backend-module-msgraph/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-msgraph +## 0.5.27-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.5.27-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index f031e85329..a2c579aaf2 100644 --- a/plugins/catalog-backend-module-msgraph/package.json +++ b/plugins/catalog-backend-module-msgraph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-msgraph", - "version": "0.5.27-next.0", + "version": "0.5.27-next.1", "description": "A Backstage catalog backend module that helps integrate towards Microsoft Graph", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-openapi/CHANGELOG.md b/plugins/catalog-backend-module-openapi/CHANGELOG.md index b02043655b..4c3fa26383 100644 --- a/plugins/catalog-backend-module-openapi/CHANGELOG.md +++ b/plugins/catalog-backend-module-openapi/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-openapi +## 0.1.37-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-backend@1.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.1.37-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-openapi/package.json b/plugins/catalog-backend-module-openapi/package.json index 7e4d72a5f1..5be17c2b69 100644 --- a/plugins/catalog-backend-module-openapi/package.json +++ b/plugins/catalog-backend-module-openapi/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-openapi", - "version": "0.1.37-next.0", + "version": "0.1.37-next.1", "description": "A Backstage catalog backend module that helps with OpenAPI specifications", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-puppetdb/CHANGELOG.md b/plugins/catalog-backend-module-puppetdb/CHANGELOG.md index 1fb2d5dc75..431d15bb64 100644 --- a/plugins/catalog-backend-module-puppetdb/CHANGELOG.md +++ b/plugins/catalog-backend-module-puppetdb/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-puppetdb +## 0.1.25-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.1.25-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-puppetdb/package.json b/plugins/catalog-backend-module-puppetdb/package.json index 43ec390541..a3eeaa5ee9 100644 --- a/plugins/catalog-backend-module-puppetdb/package.json +++ b/plugins/catalog-backend-module-puppetdb/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-puppetdb", - "version": "0.1.25-next.0", + "version": "0.1.25-next.1", "description": "A Backstage catalog backend module that helps integrate towards PuppetDB", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md b/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md index 290f7acd35..5fe8cae147 100644 --- a/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md +++ b/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-catalog-backend-module-scaffolder-entity-model +## 0.1.17-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.1.17-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-scaffolder-entity-model/package.json b/plugins/catalog-backend-module-scaffolder-entity-model/package.json index f1842779e5..7f6109c823 100644 --- a/plugins/catalog-backend-module-scaffolder-entity-model/package.json +++ b/plugins/catalog-backend-module-scaffolder-entity-model/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-scaffolder-entity-model", - "version": "0.1.17-next.0", + "version": "0.1.17-next.1", "description": "Adds support for the scaffolder specific entity model (e.g. the Template kind) to the catalog backend plugin.", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend-module-unprocessed/CHANGELOG.md b/plugins/catalog-backend-module-unprocessed/CHANGELOG.md index 61d8ab845b..4111b25411 100644 --- a/plugins/catalog-backend-module-unprocessed/CHANGELOG.md +++ b/plugins/catalog-backend-module-unprocessed/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-unprocessed +## 0.4.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + ## 0.4.6-next.0 ### Patch Changes diff --git a/plugins/catalog-backend-module-unprocessed/package.json b/plugins/catalog-backend-module-unprocessed/package.json index 5d78cde6ae..e01b636905 100644 --- a/plugins/catalog-backend-module-unprocessed/package.json +++ b/plugins/catalog-backend-module-unprocessed/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-unprocessed", - "version": "0.4.6-next.0", + "version": "0.4.6-next.1", "description": "Backstage Catalog module to view unprocessed entities", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index 22ca3b4f89..836d2282f3 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-backend +## 1.23.0-next.1 + +### Patch Changes + +- d779e3b: Added a regex test to check commit hash. If url is from git commit branch ignore the edit url. +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-events-node@0.3.5-next.0 + - @backstage/plugin-search-backend-module-catalog@0.1.25-next.1 + ## 1.23.0-next.0 ### Minor Changes diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index a924881a4d..53bc27ecd6 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend", - "version": "1.23.0-next.0", + "version": "1.23.0-next.1", "description": "The Backstage backend plugin that provides the Backstage catalog", "backstage": { "role": "backend-plugin" diff --git a/plugins/catalog-backend/src/modules/core/AnnotateLocationEntityProcessor.test.ts b/plugins/catalog-backend/src/modules/core/AnnotateLocationEntityProcessor.test.ts index 66b6300df9..2656de1c7b 100644 --- a/plugins/catalog-backend/src/modules/core/AnnotateLocationEntityProcessor.test.ts +++ b/plugins/catalog-backend/src/modules/core/AnnotateLocationEntityProcessor.test.ts @@ -166,5 +166,53 @@ describe('AnnotateLocationEntityProcessor', () => { }, }); }); + it('should not render edit button in about for invalid or git hash commit branch', async () => { + const entity: Entity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: { + name: 'my-component', + }, + }; + + const location: LocationSpec = { + type: 'url', + target: + 'https://github.com/backstage/backstage/blob/f1ba2bc6097a757c2827ff97fa301cff626de137/packages/app/catalog-info.yaml', + }; + const originLocation: LocationSpec = { + type: 'url', + target: + 'https://github.com/backstage/backstage/blob/f1ba2bc6097a757c2827ff97fa301cff626de137/catalog-info.yaml', + }; + + const integrations = ScmIntegrations.fromConfig(new ConfigReader({})); + const processor = new AnnotateLocationEntityProcessor({ integrations }); + + expect( + await processor.preProcessEntity( + entity, + location, + () => {}, + originLocation, + ), + ).toEqual({ + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: { + name: 'my-component', + annotations: { + 'backstage.io/managed-by-location': + 'url:https://github.com/backstage/backstage/blob/f1ba2bc6097a757c2827ff97fa301cff626de137/packages/app/catalog-info.yaml', + 'backstage.io/managed-by-origin-location': + 'url:https://github.com/backstage/backstage/blob/f1ba2bc6097a757c2827ff97fa301cff626de137/catalog-info.yaml', + 'backstage.io/view-url': + 'https://github.com/backstage/backstage/blob/f1ba2bc6097a757c2827ff97fa301cff626de137/packages/app/catalog-info.yaml', + 'backstage.io/source-location': + 'url:https://github.com/backstage/backstage/tree/f1ba2bc6097a757c2827ff97fa301cff626de137/packages/app/', + }, + }, + }); + }); }); }); diff --git a/plugins/catalog-backend/src/modules/core/AnnotateLocationEntityProcessor.ts b/plugins/catalog-backend/src/modules/core/AnnotateLocationEntityProcessor.ts index d3329fa86c..00864b69e7 100644 --- a/plugins/catalog-backend/src/modules/core/AnnotateLocationEntityProcessor.ts +++ b/plugins/catalog-backend/src/modules/core/AnnotateLocationEntityProcessor.ts @@ -31,6 +31,7 @@ import { CatalogProcessorEmit, } from '@backstage/plugin-catalog-node'; +const commitHashRegExp = /\b[0-9a-f]{40,}\b/; /** @public */ export class AnnotateLocationEntityProcessor implements CatalogProcessor { constructor( @@ -58,7 +59,10 @@ export class AnnotateLocationEntityProcessor implements CatalogProcessor { const scmIntegration = integrations.byUrl(location.target); viewUrl = location.target; - editUrl = scmIntegration?.resolveEditUrl(location.target); + + if (!commitHashRegExp.test(location.target)) { + editUrl = scmIntegration?.resolveEditUrl(location.target); + } const sourceUrl = scmIntegration?.resolveUrl({ url: './', diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index a72fb070da..407d437889 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-import +## 0.12.0-next.1 + +### Minor Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.12.1-next.0 + ## 0.11.1-next.0 ### Patch Changes diff --git a/plugins/catalog-import/api-report.md b/plugins/catalog-import/api-report.md index a513cfe87a..c61aa97b06 100644 --- a/plugins/catalog-import/api-report.md +++ b/plugins/catalog-import/api-report.md @@ -13,8 +13,8 @@ import { ConfigApi } from '@backstage/core-plugin-api'; import { Controller } from 'react-hook-form'; import { DiscoveryApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; +import { FetchApi } from '@backstage/core-plugin-api'; import { FieldErrors } from 'react-hook-form'; -import { IdentityApi } from '@backstage/core-plugin-api'; import { InfoCardVariants } from '@backstage/core-components'; import { JSX as JSX_2 } from 'react'; import { default as React_2 } from 'react'; @@ -102,7 +102,7 @@ export class CatalogImportClient implements CatalogImportApi { constructor(options: { discoveryApi: DiscoveryApi; scmAuthApi: ScmAuthApi; - identityApi: IdentityApi; + fetchApi: FetchApi; scmIntegrationsApi: ScmIntegrationRegistry; catalogApi: CatalogApi; configApi: ConfigApi; diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 1aec15f541..8d6410bf76 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-import", - "version": "0.11.1-next.0", + "version": "0.12.0-next.1", "description": "A Backstage plugin the helps you import entities into your catalog", "backstage": { "role": "frontend-plugin" diff --git a/plugins/catalog-import/src/alpha.tsx b/plugins/catalog-import/src/alpha.tsx index 304ee3f272..795e697874 100644 --- a/plugins/catalog-import/src/alpha.tsx +++ b/plugins/catalog-import/src/alpha.tsx @@ -18,7 +18,7 @@ import { configApiRef, createApiFactory, discoveryApiRef, - identityApiRef, + fetchApiRef, } from '@backstage/core-plugin-api'; import { compatWrapper, @@ -55,7 +55,7 @@ const catalogImportApi = createApiExtension({ deps: { discoveryApi: discoveryApiRef, scmAuthApi: scmAuthApiRef, - identityApi: identityApiRef, + fetchApi: fetchApiRef, scmIntegrationsApi: scmIntegrationsApiRef, catalogApi: catalogApiRef, configApi: configApiRef, @@ -63,7 +63,7 @@ const catalogImportApi = createApiExtension({ factory: ({ discoveryApi, scmAuthApi, - identityApi, + fetchApi, scmIntegrationsApi, catalogApi, configApi, @@ -72,7 +72,7 @@ const catalogImportApi = createApiExtension({ discoveryApi, scmAuthApi, scmIntegrationsApi, - identityApi, + fetchApi, catalogApi, configApi, }), diff --git a/plugins/catalog-import/src/api/CatalogImportClient.test.ts b/plugins/catalog-import/src/api/CatalogImportClient.test.ts index df44ec94c4..98cf972446 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.test.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.test.ts @@ -50,7 +50,7 @@ import { ConfigReader, UrlPatternDiscovery } from '@backstage/core-app-api'; import { ScmIntegrations } from '@backstage/integration'; import { ScmAuthApi } from '@backstage/integration-react'; import { CatalogApi } from '@backstage/plugin-catalog-react'; -import { setupRequestMockHandlers } from '@backstage/test-utils'; +import { MockFetchApi, setupRequestMockHandlers } from '@backstage/test-utils'; import { Octokit } from '@octokit/rest'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; @@ -66,14 +66,7 @@ describe('CatalogImportClient', () => { const scmAuthApi: jest.Mocked = { getCredentials: jest.fn().mockResolvedValue({ token: 'token' }), }; - const identityApi = { - signOut: () => { - return Promise.resolve(); - }, - getProfileInfo: jest.fn(), - getBackstageIdentity: jest.fn(), - getCredentials: jest.fn().mockResolvedValue({ token: 'token' }), - }; + const fetchApi = new MockFetchApi(); const scmIntegrationsApi = ScmIntegrations.fromConfig( new ConfigReader({ @@ -110,7 +103,7 @@ describe('CatalogImportClient', () => { discoveryApi, scmAuthApi, scmIntegrationsApi, - identityApi, + fetchApi, catalogApi: catalogApi as Partial as CatalogApi, configApi: new ConfigReader({ app: { @@ -456,7 +449,7 @@ describe('CatalogImportClient', () => { discoveryApi, scmAuthApi, scmIntegrationsApi, - identityApi, + fetchApi, catalogApi: catalogApi as Partial as CatalogApi, configApi: new ConfigReader({ catalog: { @@ -659,7 +652,7 @@ describe('CatalogImportClient', () => { discoveryApi, scmAuthApi, scmIntegrationsApi, - identityApi, + fetchApi, catalogApi: catalogApi as Partial as CatalogApi, configApi: new ConfigReader({ catalog: { @@ -745,7 +738,7 @@ describe('CatalogImportClient', () => { discoveryApi, scmAuthApi, scmIntegrationsApi, - identityApi, + fetchApi, catalogApi: catalogApi as Partial as CatalogApi, configApi: new ConfigReader({ catalog: { diff --git a/plugins/catalog-import/src/api/CatalogImportClient.ts b/plugins/catalog-import/src/api/CatalogImportClient.ts index cecb85f9a3..ec5950ec51 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.ts @@ -15,11 +15,7 @@ */ import { CatalogApi } from '@backstage/catalog-client'; -import { - ConfigApi, - DiscoveryApi, - IdentityApi, -} from '@backstage/core-plugin-api'; +import { ConfigApi, DiscoveryApi, FetchApi } from '@backstage/core-plugin-api'; import { GithubIntegrationConfig, ScmIntegrationRegistry, @@ -41,7 +37,7 @@ import { CompoundEntityRef } from '@backstage/catalog-model'; */ export class CatalogImportClient implements CatalogImportApi { private readonly discoveryApi: DiscoveryApi; - private readonly identityApi: IdentityApi; + private readonly fetchApi: FetchApi; private readonly scmAuthApi: ScmAuthApi; private readonly scmIntegrationsApi: ScmIntegrationRegistry; private readonly catalogApi: CatalogApi; @@ -50,14 +46,14 @@ export class CatalogImportClient implements CatalogImportApi { constructor(options: { discoveryApi: DiscoveryApi; scmAuthApi: ScmAuthApi; - identityApi: IdentityApi; + fetchApi: FetchApi; scmIntegrationsApi: ScmIntegrationRegistry; catalogApi: CatalogApi; configApi: ConfigApi; }) { this.discoveryApi = options.discoveryApi; this.scmAuthApi = options.scmAuthApi; - this.identityApi = options.identityApi; + this.fetchApi = options.fetchApi; this.scmIntegrationsApi = options.scmIntegrationsApi; this.catalogApi = options.catalogApi; this.configApi = options.configApi; @@ -206,29 +202,29 @@ the component will become available.\n\nFor more information, read an \ private async analyzeLocation(options: { repo: string; }): Promise { - const { token } = await this.identityApi.getCredentials(); - const response = await fetch( - `${await this.discoveryApi.getBaseUrl('catalog')}/analyze-location`, - { - headers: { - 'Content-Type': 'application/json', - ...(token && { Authorization: `Bearer ${token}` }), - }, - method: 'POST', - body: JSON.stringify({ - location: { type: 'url', target: options.repo }, - ...(this.configApi.getOptionalString( - 'catalog.import.entityFilename', - ) && { - catalogFilename: this.configApi.getOptionalString( + const response = await this.fetchApi + .fetch( + `${await this.discoveryApi.getBaseUrl('catalog')}/analyze-location`, + { + headers: { + 'Content-Type': 'application/json', + }, + method: 'POST', + body: JSON.stringify({ + location: { type: 'url', target: options.repo }, + ...(this.configApi.getOptionalString( 'catalog.import.entityFilename', - ), + ) && { + catalogFilename: this.configApi.getOptionalString( + 'catalog.import.entityFilename', + ), + }), }), - }), - }, - ).catch(e => { - throw new Error(`Failed to generate entity definitions, ${e.message}`); - }); + }, + ) + .catch(e => { + throw new Error(`Failed to generate entity definitions, ${e.message}`); + }); if (!response.ok) { throw new Error( `Failed to generate entity definitions. Received http response ${response.status}: ${response.statusText}`, diff --git a/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.test.tsx b/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.test.tsx index a231563484..929594f22a 100644 --- a/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.test.tsx +++ b/plugins/catalog-import/src/components/DefaultImportPage/DefaultImportPage.test.tsx @@ -25,22 +25,8 @@ import { catalogImportApiRef, CatalogImportClient } from '../../api'; import { DefaultImportPage } from './DefaultImportPage'; describe('', () => { - const identityApi = { - getUserId: () => { - return 'user'; - }, - getProfile: () => { - return {}; - }, - getIdToken: () => { - return Promise.resolve('token'); - }, - signOut: () => { - return Promise.resolve(); - }, - getProfileInfo: jest.fn(), - getBackstageIdentity: jest.fn(), - getCredentials: jest.fn(), + const fetchApi = { + fetch: jest.fn(), }; let apis: TestApiRegistry; @@ -56,7 +42,7 @@ describe('', () => { scmAuthApi: { getCredentials: async () => ({ token: 'token', headers: {} }), }, - identityApi, + fetchApi, scmIntegrationsApi: {} as any, catalogApi: {} as any, configApi: {} as any, diff --git a/plugins/catalog-import/src/components/ImportPage/ImportPage.test.tsx b/plugins/catalog-import/src/components/ImportPage/ImportPage.test.tsx index 1b0ddcfc04..e1c4edb896 100644 --- a/plugins/catalog-import/src/components/ImportPage/ImportPage.test.tsx +++ b/plugins/catalog-import/src/components/ImportPage/ImportPage.test.tsx @@ -16,7 +16,7 @@ import { CatalogClient } from '@backstage/catalog-client'; import { ApiProvider, ConfigReader } from '@backstage/core-app-api'; -import { configApiRef } from '@backstage/core-plugin-api'; +import { FetchApi, configApiRef } from '@backstage/core-plugin-api'; import { catalogApiRef } from '@backstage/plugin-catalog-react'; import { renderInTestApp, TestApiRegistry } from '@backstage/test-utils'; import { screen } from '@testing-library/react'; @@ -31,22 +31,8 @@ jest.mock('react-router-dom', () => ({ })); describe('', () => { - const identityApi = { - getUserId: () => { - return 'user'; - }, - getProfile: () => { - return {}; - }, - getIdToken: () => { - return Promise.resolve('token'); - }, - signOut: () => { - return Promise.resolve(); - }, - getProfileInfo: jest.fn(), - getBackstageIdentity: jest.fn(), - getCredentials: jest.fn(), + const fetchApi: FetchApi = { + fetch: jest.fn(), }; let apis: TestApiRegistry; @@ -59,7 +45,7 @@ describe('', () => { catalogImportApiRef, new CatalogImportClient({ discoveryApi: {} as any, - identityApi, + fetchApi, scmAuthApi: {} as any, scmIntegrationsApi: {} as any, catalogApi: {} as any, diff --git a/plugins/catalog-import/src/plugin.ts b/plugins/catalog-import/src/plugin.ts index d9dd226792..62741c27c0 100644 --- a/plugins/catalog-import/src/plugin.ts +++ b/plugins/catalog-import/src/plugin.ts @@ -21,7 +21,7 @@ import { createRoutableExtension, createRouteRef, discoveryApiRef, - identityApiRef, + fetchApiRef, } from '@backstage/core-plugin-api'; import { scmAuthApiRef, @@ -48,7 +48,7 @@ export const catalogImportPlugin = createPlugin({ deps: { discoveryApi: discoveryApiRef, scmAuthApi: scmAuthApiRef, - identityApi: identityApiRef, + fetchApi: fetchApiRef, scmIntegrationsApi: scmIntegrationsApiRef, catalogApi: catalogApiRef, configApi: configApiRef, @@ -56,7 +56,7 @@ export const catalogImportPlugin = createPlugin({ factory: ({ discoveryApi, scmAuthApi, - identityApi, + fetchApi, scmIntegrationsApi, catalogApi, configApi, @@ -65,7 +65,7 @@ export const catalogImportPlugin = createPlugin({ discoveryApi, scmAuthApi, scmIntegrationsApi, - identityApi, + fetchApi, catalogApi, configApi, }), diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index 23d7fee635..c3623b8182 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog +## 1.20.1-next.1 + +### Patch Changes + +- a2d2649: Export `catalogTranslationRef` under `/alpha` +- bcec60f: updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + - @backstage/plugin-catalog-react@1.12.1-next.0 + ## 1.20.1-next.0 ### Patch Changes diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 488bc05b4b..eefdcdf706 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog", - "version": "1.20.1-next.0", + "version": "1.20.1-next.1", "description": "The Backstage plugin for browsing the Backstage catalog", "backstage": { "role": "frontend-plugin" diff --git a/plugins/devtools-backend/CHANGELOG.md b/plugins/devtools-backend/CHANGELOG.md index d0c2f7d6fc..fd3e6d21bf 100644 --- a/plugins/devtools-backend/CHANGELOG.md +++ b/plugins/devtools-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-devtools-backend +## 0.3.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/config-loader@1.8.0 + ## 0.3.5-next.0 ### Patch Changes diff --git a/plugins/devtools-backend/package.json b/plugins/devtools-backend/package.json index 3b6ee4af31..bccd406ae0 100644 --- a/plugins/devtools-backend/package.json +++ b/plugins/devtools-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-devtools-backend", - "version": "0.3.5-next.0", + "version": "0.3.5-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/events-backend-module-aws-sqs/CHANGELOG.md b/plugins/events-backend-module-aws-sqs/CHANGELOG.md index 42ce92265e..47e43c4265 100644 --- a/plugins/events-backend-module-aws-sqs/CHANGELOG.md +++ b/plugins/events-backend-module-aws-sqs/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-events-backend-module-aws-sqs +## 0.3.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + ## 0.3.5-next.0 ### Patch Changes diff --git a/plugins/events-backend-module-aws-sqs/package.json b/plugins/events-backend-module-aws-sqs/package.json index 1a4951ae2f..3c1a796d5f 100644 --- a/plugins/events-backend-module-aws-sqs/package.json +++ b/plugins/events-backend-module-aws-sqs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend-module-aws-sqs", - "version": "0.3.5-next.0", + "version": "0.3.5-next.1", "backstage": { "role": "backend-plugin-module" }, diff --git a/plugins/events-backend/CHANGELOG.md b/plugins/events-backend/CHANGELOG.md index 84337dec34..0dff94a986 100644 --- a/plugins/events-backend/CHANGELOG.md +++ b/plugins/events-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-events-backend +## 0.3.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + ## 0.3.6-next.0 ### Patch Changes diff --git a/plugins/events-backend/package.json b/plugins/events-backend/package.json index 5bbcd48919..ae19b98d6e 100644 --- a/plugins/events-backend/package.json +++ b/plugins/events-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-events-backend", - "version": "0.3.6-next.0", + "version": "0.3.6-next.1", "backstage": { "role": "backend-plugin" }, diff --git a/plugins/example-todo-list-backend/CHANGELOG.md b/plugins/example-todo-list-backend/CHANGELOG.md index 1350ca84c5..a380b2f707 100644 --- a/plugins/example-todo-list-backend/CHANGELOG.md +++ b/plugins/example-todo-list-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @internal/plugin-todo-list-backend +## 1.0.28-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 1.0.28-next.0 ### Patch Changes diff --git a/plugins/example-todo-list-backend/package.json b/plugins/example-todo-list-backend/package.json index 60aa287efb..1c70aef305 100644 --- a/plugins/example-todo-list-backend/package.json +++ b/plugins/example-todo-list-backend/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list-backend", - "version": "1.0.28-next.0", + "version": "1.0.28-next.1", "backstage": { "role": "backend-plugin" }, diff --git a/plugins/kubernetes-backend/CHANGELOG.md b/plugins/kubernetes-backend/CHANGELOG.md index 6b742d4f4d..98e3f983f3 100644 --- a/plugins/kubernetes-backend/CHANGELOG.md +++ b/plugins/kubernetes-backend/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-kubernetes-backend +## 0.18.0-next.1 + +### Minor Changes + +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-kubernetes-node@0.1.13-next.1 + ## 0.17.2-next.0 ### Patch Changes diff --git a/plugins/kubernetes-backend/examples/dice-roller/dice-roller-manifests.yaml b/plugins/kubernetes-backend/examples/dice-roller/dice-roller-manifests.yaml index 8f225e666a..4d564b7552 100644 --- a/plugins/kubernetes-backend/examples/dice-roller/dice-roller-manifests.yaml +++ b/plugins/kubernetes-backend/examples/dice-roller/dice-roller-manifests.yaml @@ -221,7 +221,7 @@ spec: - containerPort: 80 --- -apiVersion: autoscaling/v1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: dice-roller diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 678e68816f..e3bf25bad2 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-backend", "description": "A Backstage backend plugin that integrates towards Kubernetes", - "version": "0.17.2-next.0", + "version": "0.18.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kubernetes-backend/src/service/KubernetesFanOutHandler.ts b/plugins/kubernetes-backend/src/service/KubernetesFanOutHandler.ts index 53b5070e61..54a038fffd 100644 --- a/plugins/kubernetes-backend/src/service/KubernetesFanOutHandler.ts +++ b/plugins/kubernetes-backend/src/service/KubernetesFanOutHandler.ts @@ -103,7 +103,7 @@ export const DEFAULT_OBJECTS: ObjectToFetch[] = [ }, { group: 'autoscaling', - apiVersion: 'v1', + apiVersion: 'v2', plural: 'horizontalpodautoscalers', objectType: 'horizontalpodautoscalers', }, diff --git a/plugins/kubernetes-cluster/CHANGELOG.md b/plugins/kubernetes-cluster/CHANGELOG.md index fe667ca054..1ed061ecb0 100644 --- a/plugins/kubernetes-cluster/CHANGELOG.md +++ b/plugins/kubernetes-cluster/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-kubernetes-cluster +## 0.0.12-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-kubernetes-react@0.4.0-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + - @backstage/plugin-catalog-react@1.12.1-next.0 + ## 0.0.12-next.0 ### Patch Changes diff --git a/plugins/kubernetes-cluster/package.json b/plugins/kubernetes-cluster/package.json index 67527562a6..b1547ed24d 100644 --- a/plugins/kubernetes-cluster/package.json +++ b/plugins/kubernetes-cluster/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-cluster", - "version": "0.0.12-next.0", + "version": "0.0.12-next.1", "description": "A Backstage plugin that shows details of Kubernetes clusters", "backstage": { "role": "frontend-plugin" diff --git a/plugins/kubernetes-common/CHANGELOG.md b/plugins/kubernetes-common/CHANGELOG.md index 778364af1b..7bf7741f3f 100644 --- a/plugins/kubernetes-common/CHANGELOG.md +++ b/plugins/kubernetes-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-kubernetes-common +## 0.8.0-next.0 + +### Minor Changes + +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + ## 0.7.6 ### Patch Changes diff --git a/plugins/kubernetes-common/api-report.md b/plugins/kubernetes-common/api-report.md index 2f46ef90e5..81e9ca28e7 100644 --- a/plugins/kubernetes-common/api-report.md +++ b/plugins/kubernetes-common/api-report.md @@ -14,7 +14,6 @@ import { V1ConfigMap } from '@kubernetes/client-node'; import { V1CronJob } from '@kubernetes/client-node'; import { V1DaemonSet } from '@kubernetes/client-node'; import { V1Deployment } from '@kubernetes/client-node'; -import { V1HorizontalPodAutoscaler } from '@kubernetes/client-node'; import { V1Ingress } from '@kubernetes/client-node'; import { V1Job } from '@kubernetes/client-node'; import { V1LimitRange } from '@kubernetes/client-node'; @@ -23,6 +22,7 @@ import { V1ReplicaSet } from '@kubernetes/client-node'; import { V1ResourceQuota } from '@kubernetes/client-node'; import { V1Service } from '@kubernetes/client-node'; import { V1StatefulSet } from '@kubernetes/client-node'; +import { V2HorizontalPodAutoscaler } from '@kubernetes/client-node'; // @public export const ANNOTATION_KUBERNETES_API_SERVER = 'kubernetes.io/api-server'; @@ -192,7 +192,7 @@ export interface DeploymentResources { // (undocumented) deployments: V1Deployment[]; // (undocumented) - horizontalPodAutoscalers: V1HorizontalPodAutoscaler[]; + horizontalPodAutoscalers: V2HorizontalPodAutoscaler[]; // (undocumented) pods: V1Pod[]; // (undocumented) @@ -294,7 +294,7 @@ export const groupResponses: ( // @public (undocumented) export interface HorizontalPodAutoscalersFetchResponse { // (undocumented) - resources: Array; + resources: Array; // (undocumented) type: 'horizontalpodautoscalers'; } diff --git a/plugins/kubernetes-common/package.json b/plugins/kubernetes-common/package.json index f3bba8b855..64807dd61f 100644 --- a/plugins/kubernetes-common/package.json +++ b/plugins/kubernetes-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-common", - "version": "0.7.6", + "version": "0.8.0-next.0", "description": "Common functionalities for kubernetes, to be shared between kubernetes and kubernetes-backend plugin", "backstage": { "role": "common-library" diff --git a/plugins/kubernetes-common/src/error-detection/__fixtures__/hpa-healthy.json b/plugins/kubernetes-common/src/error-detection/__fixtures__/hpa-healthy.json index 23edee5a07..2fc73a5ee3 100644 --- a/plugins/kubernetes-common/src/error-detection/__fixtures__/hpa-healthy.json +++ b/plugins/kubernetes-common/src/error-detection/__fixtures__/hpa-healthy.json @@ -1,32 +1,77 @@ { + "apiVersion": "autoscaling/v2", + "kind": "HorizontalPodAutoscaler", "metadata": { - "annotations": { - "autoscaling.alpha.kubernetes.io/conditions": "[{\"type\":\"AbleToScale\",\"status\":\"True\",\"lastTransitionTime\":\"2020-09-28T13:28:15Z\",\"reason\":\"SucceededGetScale\",\"message\":\"the HPA controller was able to get the target's current scale\"},{\"type\":\"ScalingActive\",\"status\":\"False\",\"lastTransitionTime\":\"2020-09-28T13:28:15Z\",\"reason\":\"FailedGetResourceMetric\",\"message\":\"the HPA was unable to compute the replica count: unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: the server could not find the requested resource (get pods.metrics.k8s.io)\"}]", - "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"autoscaling/v1\",\"kind\":\"HorizontalPodAutoscaler\",\"metadata\":{\"annotations\":{},\"labels\":{\"backstage.io/kubernetes-id\":\"dice-roller\"},\"name\":\"dice-roller\",\"namespace\":\"default\"},\"spec\":{\"maxReplicas\":15,\"minReplicas\":10,\"scaleTargetRef\":{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"name\":\"dice-roller\"},\"targetCPUUtilizationPercentage\":50}}\n" - }, - "creationTimestamp": "2020-09-28T13:28:00.000Z", + "annotations": {}, + "creationTimestamp": "2024-02-13T20:13:52Z", "labels": { "backstage.io/kubernetes-id": "dice-roller" }, "name": "dice-roller", "namespace": "default", - "resourceVersion": "698957", - "selfLink": "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/dice-roller", - "uid": "a70c8a90-5605-4d7d-adea-05cfb8d9d446" + "resourceVersion": "6717s736", + "uid": "a34c90e1-8e8f-407f-b4c5-b4543bd56c1b" }, "spec": { - "maxReplicas": 15, - "minReplicas": 10, + "maxReplicas": 10, + "metrics": [ + { + "resource": { + "name": "cpu", + "target": { + "averageUtilization": 50, + "type": "Utilization" + } + }, + "type": "Resource" + } + ], + "minReplicas": 1, "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "dice-roller" - }, - "targetCPUUtilizationPercentage": 50 + } }, "status": { - "currentReplicas": 13, - "desiredReplicas": 14, - "currentCPUUtilizationPercentage": 30 + "conditions": [ + { + "lastTransitionTime": "2024-05-17T19:50:35Z", + "message": "recent recommendations were higher than current one, applying the highest recent recommendation", + "reason": "ScaleDownStabilized", + "status": "True", + "type": "AbleToScale" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)", + "reason": "ValidMetricFound", + "status": "True", + "type": "ScalingActive" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the desired replica count is more than the maximum replica count", + "reason": "TooManyReplicas", + "status": "True", + "type": "ScalingLimited" + } + ], + "currentMetrics": [ + { + "resource": { + "current": { + "averageUtilization": 100, + "averageValue": "50m", + "value": "100m" + }, + "name": "cpu" + }, + "type": "Resource" + } + ], + "currentReplicas": 2, + "desiredReplicas": 2, + "lastScaleTime": "2024-02-13T20:14:23Z" } } diff --git a/plugins/kubernetes-common/src/error-detection/__fixtures__/hpa-maxed-out.json b/plugins/kubernetes-common/src/error-detection/__fixtures__/hpa-maxed-out.json index 4466e7b4b1..2360e14ca0 100644 --- a/plugins/kubernetes-common/src/error-detection/__fixtures__/hpa-maxed-out.json +++ b/plugins/kubernetes-common/src/error-detection/__fixtures__/hpa-maxed-out.json @@ -1,32 +1,77 @@ { + "apiVersion": "autoscaling/v2", + "kind": "HorizontalPodAutoscaler", "metadata": { - "annotations": { - "autoscaling.alpha.kubernetes.io/conditions": "[{\"type\":\"AbleToScale\",\"status\":\"True\",\"lastTransitionTime\":\"2020-09-28T13:28:15Z\",\"reason\":\"SucceededGetScale\",\"message\":\"the HPA controller was able to get the target's current scale\"},{\"type\":\"ScalingActive\",\"status\":\"False\",\"lastTransitionTime\":\"2020-09-28T13:28:15Z\",\"reason\":\"FailedGetResourceMetric\",\"message\":\"the HPA was unable to compute the replica count: unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: the server could not find the requested resource (get pods.metrics.k8s.io)\"}]", - "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"autoscaling/v1\",\"kind\":\"HorizontalPodAutoscaler\",\"metadata\":{\"annotations\":{},\"labels\":{\"backstage.io/kubernetes-id\":\"dice-roller\"},\"name\":\"dice-roller\",\"namespace\":\"default\"},\"spec\":{\"maxReplicas\":15,\"minReplicas\":10,\"scaleTargetRef\":{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"name\":\"dice-roller\"},\"targetCPUUtilizationPercentage\":50}}\n" - }, - "creationTimestamp": "2020-09-28T13:28:00.000Z", + "annotations": {}, + "creationTimestamp": "2024-02-13T20:13:52Z", "labels": { "backstage.io/kubernetes-id": "dice-roller" }, "name": "dice-roller", "namespace": "default", - "resourceVersion": "698957", - "selfLink": "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/dice-roller", - "uid": "a70c8a90-5605-4d7d-adea-05cfb8d9d446" + "resourceVersion": "6717s736", + "uid": "a34c90e1-8e8f-407f-b4c5-b4543bd56c1b" }, "spec": { "maxReplicas": 10, - "minReplicas": 5, + "metrics": [ + { + "resource": { + "name": "cpu", + "target": { + "averageUtilization": 50, + "type": "Utilization" + } + }, + "type": "Resource" + } + ], + "minReplicas": 1, "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "dice-roller" - }, - "targetCPUUtilizationPercentage": 70 + } }, "status": { + "conditions": [ + { + "lastTransitionTime": "2024-05-17T19:50:35Z", + "message": "recent recommendations were higher than current one, applying the highest recent recommendation", + "reason": "ScaleDownStabilized", + "status": "True", + "type": "AbleToScale" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)", + "reason": "ValidMetricFound", + "status": "True", + "type": "ScalingActive" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the desired replica count is more than the maximum replica count", + "reason": "TooManyReplicas", + "status": "True", + "type": "ScalingLimited" + } + ], + "currentMetrics": [ + { + "resource": { + "current": { + "averageUtilization": 100, + "averageValue": "50m", + "value": "100m" + }, + "name": "cpu" + }, + "type": "Resource" + } + ], "currentReplicas": 10, "desiredReplicas": 10, - "currentCPUUtilizationPercentage": 100 + "lastScaleTime": "2024-02-13T20:14:23Z" } } diff --git a/plugins/kubernetes-common/src/error-detection/error-detection.test.ts b/plugins/kubernetes-common/src/error-detection/error-detection.test.ts index ae4605c3c5..f57226a01c 100644 --- a/plugins/kubernetes-common/src/error-detection/error-detection.test.ts +++ b/plugins/kubernetes-common/src/error-detection/error-detection.test.ts @@ -17,7 +17,7 @@ import { V1Pod, V1Deployment, - V1HorizontalPodAutoscaler, + V2HorizontalPodAutoscaler, } from '@kubernetes/client-node'; import { detectErrors } from './error-detection'; import * as healthyPod from './__fixtures__/pod.json'; @@ -61,7 +61,7 @@ const oneDeployment = (deployment: V1Deployment): ObjectsByEntityResponse => { }); }; -const oneHpa = (hpa: V1HorizontalPodAutoscaler): ObjectsByEntityResponse => { +const oneHpa = (hpa: V2HorizontalPodAutoscaler): ObjectsByEntityResponse => { return oneItem({ type: 'horizontalpodautoscalers', resources: [hpa], @@ -328,7 +328,7 @@ describe('detectErrors', () => { expect(err1).toStrictEqual({ sourceRef: { - apiGroup: 'autoscaling/v1', + apiGroup: 'autoscaling/v2', kind: 'HorizontalPodAutoscaler', name: 'dice-roller', namespace: 'default', diff --git a/plugins/kubernetes-common/src/error-detection/error-detection.ts b/plugins/kubernetes-common/src/error-detection/error-detection.ts index a3a4d58d9e..6fa9211db4 100644 --- a/plugins/kubernetes-common/src/error-detection/error-detection.ts +++ b/plugins/kubernetes-common/src/error-detection/error-detection.ts @@ -21,7 +21,7 @@ import { detectErrorsInPods } from './pods'; import { detectErrorsInDeployments } from './deployments'; import { detectErrorsInHpa } from './hpas'; import { Deployment } from 'kubernetes-models/apps/v1'; -import { HorizontalPodAutoscaler } from 'kubernetes-models/autoscaling/v1'; +import { HorizontalPodAutoscaler } from 'kubernetes-models/autoscaling/v2'; import { Pod } from 'kubernetes-models/v1'; /** diff --git a/plugins/kubernetes-common/src/error-detection/hpas.ts b/plugins/kubernetes-common/src/error-detection/hpas.ts index 6f15c119b6..785e6b0e9b 100644 --- a/plugins/kubernetes-common/src/error-detection/hpas.ts +++ b/plugins/kubernetes-common/src/error-detection/hpas.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { HorizontalPodAutoscaler } from 'kubernetes-models/autoscaling/v1'; +import { HorizontalPodAutoscaler } from 'kubernetes-models/autoscaling/v2'; import { DetectedError, ErrorMapper } from './types'; import { detectErrorsInObjects } from './common'; @@ -35,7 +35,7 @@ const hpaErrorMappers: ErrorMapper[] = [ name: hpa.metadata?.name ?? 'unknown hpa', namespace: hpa.metadata?.namespace ?? 'unknown namespace', kind: 'HorizontalPodAutoscaler', - apiGroup: 'autoscaling/v1', + apiGroup: 'autoscaling/v2', }, occurrenceCount: 1, }, diff --git a/plugins/kubernetes-common/src/types.ts b/plugins/kubernetes-common/src/types.ts index c4bb5fd32f..a63c157948 100644 --- a/plugins/kubernetes-common/src/types.ts +++ b/plugins/kubernetes-common/src/types.ts @@ -21,7 +21,7 @@ import { V1CronJob, V1DaemonSet, V1Deployment, - V1HorizontalPodAutoscaler, + V2HorizontalPodAutoscaler, V1Ingress, V1Job, V1LimitRange, @@ -186,7 +186,7 @@ export interface ResourceQuotaFetchResponse { /** @public */ export interface HorizontalPodAutoscalersFetchResponse { type: 'horizontalpodautoscalers'; - resources: Array; + resources: Array; } /** @public */ @@ -282,7 +282,7 @@ export interface DeploymentResources { pods: V1Pod[]; replicaSets: V1ReplicaSet[]; deployments: V1Deployment[]; - horizontalPodAutoscalers: V1HorizontalPodAutoscaler[]; + horizontalPodAutoscalers: V2HorizontalPodAutoscaler[]; } /** @public */ diff --git a/plugins/kubernetes-node/CHANGELOG.md b/plugins/kubernetes-node/CHANGELOG.md index fd1481b0a1..d01ce7dc43 100644 --- a/plugins/kubernetes-node/CHANGELOG.md +++ b/plugins/kubernetes-node/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-kubernetes-node +## 0.1.13-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + ## 0.1.13-next.0 ### Patch Changes diff --git a/plugins/kubernetes-node/package.json b/plugins/kubernetes-node/package.json index fbc187750a..701106dfd0 100644 --- a/plugins/kubernetes-node/package.json +++ b/plugins/kubernetes-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-node", - "version": "0.1.13-next.0", + "version": "0.1.13-next.1", "description": "Node.js library for the kubernetes plugin", "backstage": { "role": "node-library" diff --git a/plugins/kubernetes-react/CHANGELOG.md b/plugins/kubernetes-react/CHANGELOG.md index 7d94edb692..ae1879f2b1 100644 --- a/plugins/kubernetes-react/CHANGELOG.md +++ b/plugins/kubernetes-react/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-kubernetes-react +## 0.4.0-next.1 + +### Minor Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- 0177f75: Update kubernetes plugins to use autoscaling/v2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + ## 0.3.6-next.0 ### Patch Changes diff --git a/plugins/kubernetes-react/api-report.md b/plugins/kubernetes-react/api-report.md index ccc2e1643d..adb75a7d60 100644 --- a/plugins/kubernetes-react/api-report.md +++ b/plugins/kubernetes-react/api-report.md @@ -16,10 +16,10 @@ import { DetectedErrorsByCluster } from '@backstage/plugin-kubernetes-common'; import { DiscoveryApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { Event as Event_2 } from 'kubernetes-models/v1'; +import { FetchApi } from '@backstage/core-plugin-api'; import { GroupedResponses } from '@backstage/plugin-kubernetes-common'; import { IContainer } from 'kubernetes-models/v1'; import { IContainerStatus } from 'kubernetes-models/v1'; -import { IdentityApi } from '@backstage/core-plugin-api'; import { IIoK8sApimachineryPkgApisMetaV1ObjectMeta } from '@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta'; import { IObjectMeta } from '@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta'; import { JsonObject } from '@backstage/types'; @@ -33,10 +33,10 @@ import { ProfileInfoApi } from '@backstage/core-plugin-api'; import { default as React_2 } from 'react'; import * as React_3 from 'react'; import { TypeMeta } from '@kubernetes-models/base'; -import { V1HorizontalPodAutoscaler } from '@kubernetes/client-node'; import { V1Job } from '@kubernetes/client-node'; import { V1ObjectMeta } from '@kubernetes/client-node'; import { V1Pod } from '@kubernetes/client-node'; +import { V2HorizontalPodAutoscaler } from '@kubernetes/client-node'; import { WorkloadsByEntityRequest } from '@backstage/plugin-kubernetes-common'; // @public (undocumented) @@ -285,7 +285,7 @@ export const GroupedResponsesContext: React_2.Context; // @public (undocumented) export const HorizontalPodAutoscalerDrawer: (props: { - hpa: V1HorizontalPodAutoscaler; + hpa: V2HorizontalPodAutoscaler; expanded?: boolean; children?: React_2.ReactNode; }) => React_2.JSX.Element; @@ -402,7 +402,7 @@ export const kubernetesAuthProvidersApiRef: ApiRef; export class KubernetesBackendClient implements KubernetesApi { constructor(options: { discoveryApi: DiscoveryApi; - identityApi: IdentityApi; + fetchApi: FetchApi; kubernetesAuthProvidersApi: KubernetesAuthProvidersApi; }); // (undocumented) diff --git a/plugins/kubernetes-react/package.json b/plugins/kubernetes-react/package.json index 47f6cd0c25..71e5213d62 100644 --- a/plugins/kubernetes-react/package.json +++ b/plugins/kubernetes-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-react", "description": "Web library for the kubernetes-react plugin", - "version": "0.3.6-next.0", + "version": "0.4.0-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kubernetes-react/src/__fixtures__/1-deployments.json b/plugins/kubernetes-react/src/__fixtures__/1-deployments.json index 5ad847dc49..3a9da2a33a 100644 --- a/plugins/kubernetes-react/src/__fixtures__/1-deployments.json +++ b/plugins/kubernetes-react/src/__fixtures__/1-deployments.json @@ -2826,85 +2826,80 @@ ], "horizontalPodAutoscalers": [ { - "apiVersion": "autoscaling/v1", + "apiVersion": "autoscaling/v2", "kind": "HorizontalPodAutoscaler", "metadata": { - "annotations": { - "autoscaling.alpha.kubernetes.io/conditions": "[{\"type\":\"AbleToScale\",\"status\":\"True\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"SucceededGetScale\",\"message\":\"the HPA controller was able to get the target's current scale\"},{\"type\":\"ScalingActive\",\"status\":\"False\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"FailedGetResourceMetric\",\"message\":\"the HPA was unable to compute the replica count: unable to get metrics for resource cpu: no metrics returned from resource metrics API\"}]", - "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"autoscaling/v1\",\"kind\":\"HorizontalPodAutoscaler\",\"metadata\":{\"annotations\":{},\"labels\":{\"backstage.io/kubernetes-id\":\"dice-roller\"},\"name\":\"dice-roller\",\"namespace\":\"default\"},\"spec\":{\"maxReplicas\":15,\"minReplicas\":10,\"scaleTargetRef\":{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"name\":\"dice-roller\"},\"targetCPUUtilizationPercentage\":50}}\n" - }, - "creationTimestamp": "2021-01-05T10:25:48Z", + "annotations": {}, + "creationTimestamp": "2024-02-13T20:13:52Z", "labels": { "backstage.io/kubernetes-id": "dice-roller" }, - "managedFields": [ - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:kubectl.kubernetes.io/last-applied-configuration": {} - }, - "f:labels": { - ".": {}, - "f:backstage.io/kubernetes-id": {} - } - }, - "f:spec": { - "f:maxReplicas": {}, - "f:minReplicas": {}, - "f:scaleTargetRef": { - "f:apiVersion": {}, - "f:kind": {}, - "f:name": {} - }, - "f:targetCPUUtilizationPercentage": {} - } - }, - "manager": "kubectl-client-side-apply", - "operation": "Update", - "time": "2021-01-05T10:25:48Z" - }, - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:autoscaling.alpha.kubernetes.io/conditions": {} - } - }, - "f:status": { - "f:currentReplicas": {} - } - }, - "manager": "kube-controller-manager", - "operation": "Update", - "time": "2021-01-05T10:26:04Z" - } - ], "name": "dice-roller", "namespace": "default", - "resourceVersion": "598", - "selfLink": "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/dice-roller", - "uid": "dd7c5329-567c-43c2-b159-756808d90a8e" + "resourceVersion": "6717s736", + "uid": "a34c90e1-8e8f-407f-b4c5-b4543bd56c1b" }, "spec": { - "maxReplicas": 15, - "minReplicas": 10, + "maxReplicas": 2, + "metrics": [ + { + "resource": { + "name": "cpu", + "target": { + "averageUtilization": 50, + "type": "Utilization" + } + }, + "type": "Resource" + } + ], + "minReplicas": 1, "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "dice-roller" - }, - "targetCPUUtilizationPercentage": 50 + } }, "status": { - "currentReplicas": 10, - "desiredReplicas": 0, - "currentCPUUtilizationPercentage": 30 + "conditions": [ + { + "lastTransitionTime": "2024-05-17T19:50:35Z", + "message": "recent recommendations were higher than current one, applying the highest recent recommendation", + "reason": "ScaleDownStabilized", + "status": "True", + "type": "AbleToScale" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)", + "reason": "ValidMetricFound", + "status": "True", + "type": "ScalingActive" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the desired replica count is more than the maximum replica count", + "reason": "TooManyReplicas", + "status": "True", + "type": "ScalingLimited" + } + ], + "currentMetrics": [ + { + "resource": { + "current": { + "averageUtilization": 100, + "averageValue": "50m", + "value": "100m" + }, + "name": "cpu" + }, + "type": "Resource" + } + ], + "currentReplicas": 2, + "desiredReplicas": 2, + "lastScaleTime": "2024-02-13T20:14:23Z" } } ] diff --git a/plugins/kubernetes-react/src/__fixtures__/1-statefulsets.json b/plugins/kubernetes-react/src/__fixtures__/1-statefulsets.json index 6c04774ff1..5d9b56300a 100644 --- a/plugins/kubernetes-react/src/__fixtures__/1-statefulsets.json +++ b/plugins/kubernetes-react/src/__fixtures__/1-statefulsets.json @@ -2827,85 +2827,80 @@ ], "horizontalPodAutoscalers": [ { - "apiVersion": "autoscaling/v1", + "apiVersion": "autoscaling/v2", "kind": "HorizontalPodAutoscaler", "metadata": { - "annotations": { - "autoscaling.alpha.kubernetes.io/conditions": "[{\"type\":\"AbleToScale\",\"status\":\"True\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"SucceededGetScale\",\"message\":\"the HPA controller was able to get the target's current scale\"},{\"type\":\"ScalingActive\",\"status\":\"False\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"FailedGetResourceMetric\",\"message\":\"the HPA was unable to compute the replica count: unable to get metrics for resource cpu: no metrics returned from resource metrics API\"}]", - "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"autoscaling/v1\",\"kind\":\"HorizontalPodAutoscaler\",\"metadata\":{\"annotations\":{},\"labels\":{\"backstage.io/kubernetes-id\":\"dice-roller\"},\"name\":\"dice-roller\",\"namespace\":\"default\"},\"spec\":{\"maxReplicas\":15,\"minReplicas\":10,\"scaleTargetRef\":{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"name\":\"dice-roller\"},\"targetCPUUtilizationPercentage\":50}}\n" - }, - "creationTimestamp": "2021-01-05T10:25:48Z", + "annotations": {}, + "creationTimestamp": "2024-02-13T20:13:52Z", "labels": { "backstage.io/kubernetes-id": "dice-roller" }, - "managedFields": [ - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:kubectl.kubernetes.io/last-applied-configuration": {} - }, - "f:labels": { - ".": {}, - "f:backstage.io/kubernetes-id": {} - } - }, - "f:spec": { - "f:maxReplicas": {}, - "f:minReplicas": {}, - "f:scaleTargetRef": { - "f:apiVersion": {}, - "f:kind": {}, - "f:name": {} - }, - "f:targetCPUUtilizationPercentage": {} - } - }, - "manager": "kubectl-client-side-apply", - "operation": "Update", - "time": "2021-01-05T10:25:48Z" - }, - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:autoscaling.alpha.kubernetes.io/conditions": {} - } - }, - "f:status": { - "f:currentReplicas": {} - } - }, - "manager": "kube-controller-manager", - "operation": "Update", - "time": "2021-01-05T10:26:04Z" - } - ], "name": "dice-roller", "namespace": "default", - "resourceVersion": "598", - "selfLink": "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/dice-roller", - "uid": "dd7c5329-567c-43c2-b159-756808d90a8e" + "resourceVersion": "6717s736", + "uid": "a34c90e1-8e8f-407f-b4c5-b4543bd56c1b" }, "spec": { - "maxReplicas": 15, - "minReplicas": 10, + "maxReplicas": 2, + "metrics": [ + { + "resource": { + "name": "cpu", + "target": { + "averageUtilization": 50, + "type": "Utilization" + } + }, + "type": "Resource" + } + ], + "minReplicas": 1, "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "dice-roller" - }, - "targetCPUUtilizationPercentage": 50 + } }, "status": { - "currentReplicas": 10, - "desiredReplicas": 0, - "currentCPUUtilizationPercentage": 30 + "conditions": [ + { + "lastTransitionTime": "2024-05-17T19:50:35Z", + "message": "recent recommendations were higher than current one, applying the highest recent recommendation", + "reason": "ScaleDownStabilized", + "status": "True", + "type": "AbleToScale" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)", + "reason": "ValidMetricFound", + "status": "True", + "type": "ScalingActive" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the desired replica count is more than the maximum replica count", + "reason": "TooManyReplicas", + "status": "True", + "type": "ScalingLimited" + } + ], + "currentMetrics": [ + { + "resource": { + "current": { + "averageUtilization": 100, + "averageValue": "50m", + "value": "100m" + }, + "name": "cpu" + }, + "type": "Resource" + } + ], + "currentReplicas": 2, + "desiredReplicas": 2, + "lastScaleTime": "2024-02-13T20:14:23Z" } } ] diff --git a/plugins/kubernetes-react/src/__fixtures__/2-deployments.json b/plugins/kubernetes-react/src/__fixtures__/2-deployments.json index f5efdbf1cb..829636b6f3 100644 --- a/plugins/kubernetes-react/src/__fixtures__/2-deployments.json +++ b/plugins/kubernetes-react/src/__fixtures__/2-deployments.json @@ -4434,85 +4434,80 @@ ], "horizontalPodAutoscalers": [ { - "apiVersion": "autoscaling/v1", + "apiVersion": "autoscaling/v2", "kind": "HorizontalPodAutoscaler", "metadata": { - "annotations": { - "autoscaling.alpha.kubernetes.io/conditions": "[{\"type\":\"AbleToScale\",\"status\":\"True\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"SucceededGetScale\",\"message\":\"the HPA controller was able to get the target's current scale\"},{\"type\":\"ScalingActive\",\"status\":\"False\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"FailedGetResourceMetric\",\"message\":\"the HPA was unable to compute the replica count: unable to get metrics for resource cpu: no metrics returned from resource metrics API\"}]", - "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"autoscaling/v1\",\"kind\":\"HorizontalPodAutoscaler\",\"metadata\":{\"annotations\":{},\"labels\":{\"backstage.io/kubernetes-id\":\"dice-roller\"},\"name\":\"dice-roller\",\"namespace\":\"default\"},\"spec\":{\"maxReplicas\":15,\"minReplicas\":10,\"scaleTargetRef\":{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"name\":\"dice-roller\"},\"targetCPUUtilizationPercentage\":50}}\n" - }, - "creationTimestamp": "2021-01-05T10:25:48Z", + "annotations": {}, + "creationTimestamp": "2024-02-13T20:13:52Z", "labels": { "backstage.io/kubernetes-id": "dice-roller" }, - "managedFields": [ - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:kubectl.kubernetes.io/last-applied-configuration": {} - }, - "f:labels": { - ".": {}, - "f:backstage.io/kubernetes-id": {} - } - }, - "f:spec": { - "f:maxReplicas": {}, - "f:minReplicas": {}, - "f:scaleTargetRef": { - "f:apiVersion": {}, - "f:kind": {}, - "f:name": {} - }, - "f:targetCPUUtilizationPercentage": {} - } - }, - "manager": "kubectl-client-side-apply", - "operation": "Update", - "time": "2021-01-05T10:25:48Z" - }, - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:autoscaling.alpha.kubernetes.io/conditions": {} - } - }, - "f:status": { - "f:currentReplicas": {} - } - }, - "manager": "kube-controller-manager", - "operation": "Update", - "time": "2021-01-05T10:26:04Z" - } - ], "name": "dice-roller", "namespace": "default", - "resourceVersion": "598", - "selfLink": "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/dice-roller", - "uid": "dd7c5329-567c-43c2-b159-756808d90a8e" + "resourceVersion": "6717s736", + "uid": "a34c90e1-8e8f-407f-b4c5-b4543bd56c1b" }, "spec": { "maxReplicas": 15, + "metrics": [ + { + "resource": { + "name": "cpu", + "target": { + "averageUtilization": 50, + "type": "Utilization" + } + }, + "type": "Resource" + } + ], "minReplicas": 10, "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "dice-roller" - }, - "targetCPUUtilizationPercentage": 50 + } }, "status": { - "currentReplicas": 10, - "desiredReplicas": 0, - "currentCPUUtilizationPercentage": 30 + "conditions": [ + { + "lastTransitionTime": "2024-05-17T19:50:35Z", + "message": "recent recommendations were higher than current one, applying the highest recent recommendation", + "reason": "ScaleDownStabilized", + "status": "True", + "type": "AbleToScale" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)", + "reason": "ValidMetricFound", + "status": "True", + "type": "ScalingActive" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the desired replica count is more than the maximum replica count", + "reason": "TooManyReplicas", + "status": "True", + "type": "ScalingLimited" + } + ], + "currentMetrics": [ + { + "resource": { + "current": { + "averageUtilization": 30, + "averageValue": "50m", + "value": "100m" + }, + "name": "cpu" + }, + "type": "Resource" + } + ], + "currentReplicas": 2, + "desiredReplicas": 2, + "lastScaleTime": "2024-02-13T20:14:23Z" } } ] diff --git a/plugins/kubernetes-react/src/__fixtures__/2-statefulsets.json b/plugins/kubernetes-react/src/__fixtures__/2-statefulsets.json index 0a8c26c198..c45b1070d6 100644 --- a/plugins/kubernetes-react/src/__fixtures__/2-statefulsets.json +++ b/plugins/kubernetes-react/src/__fixtures__/2-statefulsets.json @@ -4436,85 +4436,80 @@ ], "horizontalPodAutoscalers": [ { - "apiVersion": "autoscaling/v1", + "apiVersion": "autoscaling/v2", "kind": "HorizontalPodAutoscaler", "metadata": { - "annotations": { - "autoscaling.alpha.kubernetes.io/conditions": "[{\"type\":\"AbleToScale\",\"status\":\"True\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"SucceededGetScale\",\"message\":\"the HPA controller was able to get the target's current scale\"},{\"type\":\"ScalingActive\",\"status\":\"False\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"FailedGetResourceMetric\",\"message\":\"the HPA was unable to compute the replica count: unable to get metrics for resource cpu: no metrics returned from resource metrics API\"}]", - "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"autoscaling/v1\",\"kind\":\"HorizontalPodAutoscaler\",\"metadata\":{\"annotations\":{},\"labels\":{\"backstage.io/kubernetes-id\":\"dice-roller\"},\"name\":\"dice-roller\",\"namespace\":\"default\"},\"spec\":{\"maxReplicas\":15,\"minReplicas\":10,\"scaleTargetRef\":{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"name\":\"dice-roller\"},\"targetCPUUtilizationPercentage\":50}}\n" - }, - "creationTimestamp": "2021-01-05T10:25:48Z", + "annotations": {}, + "creationTimestamp": "2024-02-13T20:13:52Z", "labels": { "backstage.io/kubernetes-id": "dice-roller" }, - "managedFields": [ - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:kubectl.kubernetes.io/last-applied-configuration": {} - }, - "f:labels": { - ".": {}, - "f:backstage.io/kubernetes-id": {} - } - }, - "f:spec": { - "f:maxReplicas": {}, - "f:minReplicas": {}, - "f:scaleTargetRef": { - "f:apiVersion": {}, - "f:kind": {}, - "f:name": {} - }, - "f:targetCPUUtilizationPercentage": {} - } - }, - "manager": "kubectl-client-side-apply", - "operation": "Update", - "time": "2021-01-05T10:25:48Z" - }, - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:autoscaling.alpha.kubernetes.io/conditions": {} - } - }, - "f:status": { - "f:currentReplicas": {} - } - }, - "manager": "kube-controller-manager", - "operation": "Update", - "time": "2021-01-05T10:26:04Z" - } - ], "name": "dice-roller", "namespace": "default", - "resourceVersion": "598", - "selfLink": "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/dice-roller", - "uid": "dd7c5329-567c-43c2-b159-756808d90a8e" + "resourceVersion": "6717s736", + "uid": "a34c90e1-8e8f-407f-b4c5-b4543bd56c1b" }, "spec": { - "maxReplicas": 15, - "minReplicas": 10, + "maxReplicas": 2, + "metrics": [ + { + "resource": { + "name": "cpu", + "target": { + "averageUtilization": 50, + "type": "Utilization" + } + }, + "type": "Resource" + } + ], + "minReplicas": 1, "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "dice-roller" - }, - "targetCPUUtilizationPercentage": 50 + } }, "status": { - "currentReplicas": 10, - "desiredReplicas": 0, - "currentCPUUtilizationPercentage": 30 + "conditions": [ + { + "lastTransitionTime": "2024-05-17T19:50:35Z", + "message": "recent recommendations were higher than current one, applying the highest recent recommendation", + "reason": "ScaleDownStabilized", + "status": "True", + "type": "AbleToScale" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)", + "reason": "ValidMetricFound", + "status": "True", + "type": "ScalingActive" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the desired replica count is more than the maximum replica count", + "reason": "TooManyReplicas", + "status": "True", + "type": "ScalingLimited" + } + ], + "currentMetrics": [ + { + "resource": { + "current": { + "averageUtilization": 100, + "averageValue": "50m", + "value": "100m" + }, + "name": "cpu" + }, + "type": "Resource" + } + ], + "currentReplicas": 2, + "desiredReplicas": 2, + "lastScaleTime": "2024-02-13T20:14:23Z" } } ] diff --git a/plugins/kubernetes-react/src/api/KubernetesBackendClient.test.ts b/plugins/kubernetes-react/src/api/KubernetesBackendClient.test.ts index 0535e404f6..82ac7c84e2 100644 --- a/plugins/kubernetes-react/src/api/KubernetesBackendClient.test.ts +++ b/plugins/kubernetes-react/src/api/KubernetesBackendClient.test.ts @@ -19,7 +19,7 @@ import { KubernetesBackendClient } from './KubernetesBackendClient'; import { rest } from 'msw'; import { UrlPatternDiscovery } from '@backstage/core-app-api'; import { setupServer } from 'msw/node'; -import { setupRequestMockHandlers } from '@backstage/test-utils'; +import { MockFetchApi, setupRequestMockHandlers } from '@backstage/test-utils'; import { CustomObjectsByEntityRequest, KubernetesRequestBody, @@ -44,6 +44,7 @@ describe('KubernetesBackendClient', () => { getBackstageIdentity: jest.fn(), signOut: jest.fn(), }; + const fetchApi = new MockFetchApi({ injectIdentityAuth: { identityApi } }); beforeEach(() => { jest.resetAllMocks(); @@ -51,7 +52,7 @@ describe('KubernetesBackendClient', () => { discoveryApi: UrlPatternDiscovery.compile( 'http://localhost:1234/api/{{ pluginId }}', ), - identityApi, + fetchApi, kubernetesAuthProvidersApi, }); mockResponse = { @@ -454,6 +455,7 @@ describe('KubernetesBackendClient', () => { }); it('hits the /proxy API with serviceAccount as auth provider', async () => { + identityApi.getCredentials.mockResolvedValue({ token: 'idToken' }); worker.use( rest.get( 'http://localhost:1234/api/kubernetes/clusters', diff --git a/plugins/kubernetes-react/src/api/KubernetesBackendClient.ts b/plugins/kubernetes-react/src/api/KubernetesBackendClient.ts index 461b1d1ffe..f0bd0fb945 100644 --- a/plugins/kubernetes-react/src/api/KubernetesBackendClient.ts +++ b/plugins/kubernetes-react/src/api/KubernetesBackendClient.ts @@ -21,7 +21,7 @@ import { WorkloadsByEntityRequest, CustomObjectsByEntityRequest, } from '@backstage/plugin-kubernetes-common'; -import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; +import { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api'; import { stringifyEntityRef } from '@backstage/catalog-model'; import { KubernetesAuthProvidersApi } from '../kubernetes-auth-provider'; import { NotFoundError } from '@backstage/errors'; @@ -29,16 +29,16 @@ import { NotFoundError } from '@backstage/errors'; /** @public */ export class KubernetesBackendClient implements KubernetesApi { private readonly discoveryApi: DiscoveryApi; - private readonly identityApi: IdentityApi; + private readonly fetchApi: FetchApi; private readonly kubernetesAuthProvidersApi: KubernetesAuthProvidersApi; constructor(options: { discoveryApi: DiscoveryApi; - identityApi: IdentityApi; + fetchApi: FetchApi; kubernetesAuthProvidersApi: KubernetesAuthProvidersApi; }) { this.discoveryApi = options.discoveryApi; - this.identityApi = options.identityApi; + this.fetchApi = options.fetchApi; this.kubernetesAuthProvidersApi = options.kubernetesAuthProvidersApi; } @@ -62,12 +62,10 @@ export class KubernetesBackendClient implements KubernetesApi { private async postRequired(path: string, requestBody: any): Promise { const url = `${await this.discoveryApi.getBaseUrl('kubernetes')}${path}`; - const { token: idToken } = await this.identityApi.getCredentials(); - const response = await fetch(url, { + const response = await this.fetchApi.fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json', - ...(idToken && { Authorization: `Bearer ${idToken}` }), }, body: JSON.stringify(requestBody), }); @@ -130,14 +128,8 @@ export class KubernetesBackendClient implements KubernetesApi { } async getClusters(): Promise<{ name: string; authProvider: string }[]> { - const { token: idToken } = await this.identityApi.getCredentials(); const url = `${await this.discoveryApi.getBaseUrl('kubernetes')}/clusters`; - const response = await fetch(url, { - method: 'GET', - headers: { - ...(idToken && { Authorization: `Bearer ${idToken}` }), - }, - }); + const response = await this.fetchApi.fetch(url); return (await this.handleResponse(response)).items; } @@ -157,15 +149,13 @@ export class KubernetesBackendClient implements KubernetesApi { const url = `${await this.discoveryApi.getBaseUrl('kubernetes')}/proxy${ options.path }`; - const identityResponse = await this.identityApi.getCredentials(); const headers = KubernetesBackendClient.getKubernetesHeaders( options, kubernetesCredentials?.token, - identityResponse, authProvider, oidcTokenProvider, ); - return await fetch(url, { ...options.init, headers }); + return await this.fetchApi.fetch(url, { ...options.init, headers }); } private static getKubernetesHeaders( @@ -175,7 +165,6 @@ export class KubernetesBackendClient implements KubernetesApi { init?: RequestInit; }, k8sToken: string | undefined, - identityResponse: { token?: string }, authProvider: string, oidcTokenProvider: string | undefined, ) { @@ -190,9 +179,6 @@ export class KubernetesBackendClient implements KubernetesApi { ...(k8sToken && { [kubernetesAuthHeader]: k8sToken, }), - ...(identityResponse.token && { - Authorization: `Bearer ${identityResponse.token}`, - }), }; } diff --git a/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx b/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx index 65749c2ea2..8e62b2606f 100644 --- a/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx +++ b/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx @@ -21,7 +21,7 @@ import AccordionSummary from '@material-ui/core/AccordionSummary'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import { V1Pod, V1HorizontalPodAutoscaler } from '@kubernetes/client-node'; +import { V1Pod, V2HorizontalPodAutoscaler } from '@kubernetes/client-node'; import { PodsTable } from '../../Pods'; import { HorizontalPodAutoscalerDrawer } from '../../HorizontalPodAutoscalers'; import { RolloutDrawer } from './RolloutDrawer'; @@ -50,7 +50,7 @@ type RolloutAccordionProps = { rollout: any; ownedPods: V1Pod[]; defaultExpanded?: boolean; - matchingHpa?: V1HorizontalPodAutoscaler; + matchingHpa?: V2HorizontalPodAutoscaler; children?: React.ReactNode; }; @@ -58,7 +58,7 @@ type RolloutSummaryProps = { rollout: any; numberOfCurrentPods: number; numberOfPodsWithErrors: number; - hpa?: V1HorizontalPodAutoscaler; + hpa?: V2HorizontalPodAutoscaler; children?: React.ReactNode; }; @@ -93,6 +93,13 @@ const RolloutSummary = ({ (p: any) => p.reason === 'CanaryPauseStep', )?.startTime; const abortedMessage = findAbortedMessage(rollout); + const specCpuUtil = hpa?.spec?.metrics?.find( + metric => metric.type === 'Resource' && metric.resource?.name === 'cpu', + )?.resource?.target.averageUtilization; + + const cpuUtil = hpa?.status?.currentMetrics?.find( + metric => metric.type === 'Resource' && metric.resource?.name === 'cpu', + )?.resource?.current.averageUtilization; return ( - current CPU usage:{' '} - {hpa.status?.currentCPUUtilizationPercentage ?? '?'}% + current CPU usage: {cpuUtil ?? '?'}% - target CPU usage:{' '} - {hpa.spec?.targetCPUUtilizationPercentage ?? '?'}% + target CPU usage: {specCpuUtil ?? '?'}% diff --git a/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx b/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx index 3d048f22df..8cfc79a8ae 100644 --- a/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx +++ b/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx @@ -24,7 +24,7 @@ import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { V1Deployment, V1Pod, - V1HorizontalPodAutoscaler, + V2HorizontalPodAutoscaler, } from '@kubernetes/client-node'; import { PodsTable } from '../Pods'; import { DeploymentDrawer } from './DeploymentDrawer'; @@ -47,7 +47,7 @@ type DeploymentsAccordionsProps = { type DeploymentAccordionProps = { deployment: V1Deployment; ownedPods: V1Pod[]; - matchingHpa?: V1HorizontalPodAutoscaler; + matchingHpa?: V2HorizontalPodAutoscaler; children?: React.ReactNode; }; @@ -55,7 +55,7 @@ type DeploymentSummaryProps = { deployment: V1Deployment; numberOfCurrentPods: number; numberOfPodsWithErrors: number; - hpa?: V1HorizontalPodAutoscaler; + hpa?: V2HorizontalPodAutoscaler; children?: React.ReactNode; }; @@ -65,6 +65,14 @@ const DeploymentSummary = ({ numberOfPodsWithErrors, hpa, }: DeploymentSummaryProps) => { + const specCpuUtil = hpa?.spec?.metrics?.find( + metric => metric.type === 'Resource' && metric.resource?.name === 'cpu', + )?.resource?.target.averageUtilization; + + const cpuUtil = hpa?.status?.currentMetrics?.find( + metric => metric.type === 'Resource' && metric.resource?.name === 'cpu', + )?.resource?.current.averageUtilization; + return ( - current CPU usage:{' '} - {hpa.status?.currentCPUUtilizationPercentage ?? '?'}% + current CPU usage: {cpuUtil ?? '?'}% - target CPU usage:{' '} - {hpa.spec?.targetCPUUtilizationPercentage ?? '?'}% + target CPU usage: {specCpuUtil ?? '?'}% diff --git a/plugins/kubernetes-react/src/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.tsx b/plugins/kubernetes-react/src/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.tsx index dba942155c..0194bfca2a 100644 --- a/plugins/kubernetes-react/src/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.tsx +++ b/plugins/kubernetes-react/src/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.tsx @@ -15,32 +15,39 @@ */ import React from 'react'; -import { V1HorizontalPodAutoscaler } from '@kubernetes/client-node'; +import { V2HorizontalPodAutoscaler } from '@kubernetes/client-node'; import { KubernetesStructuredMetadataTableDrawer } from '../KubernetesDrawer'; /** @public */ export const HorizontalPodAutoscalerDrawer = (props: { - hpa: V1HorizontalPodAutoscaler; + hpa: V2HorizontalPodAutoscaler; expanded?: boolean; children?: React.ReactNode; }) => { const { hpa, expanded, children } = props; + const specCpuUtil = hpa?.spec?.metrics?.find( + metric => metric.type === 'Resource' && metric.resource?.name === 'cpu', + )?.resource?.target.averageUtilization; + + const cpuUtil = hpa?.status?.currentMetrics?.find( + metric => metric.type === 'Resource' && metric.resource?.name === 'cpu', + )?.resource?.current.averageUtilization; + return ( { + renderObject={(hpaObject: V2HorizontalPodAutoscaler) => { return { - targetCPUUtilizationPercentage: - hpaObject.spec?.targetCPUUtilizationPercentage, - currentCPUUtilizationPercentage: - hpaObject.status?.currentCPUUtilizationPercentage, + targetCPUUtilizationPercentage: specCpuUtil, + currentCPUUtilizationPercentage: cpuUtil, minReplicas: hpaObject.spec?.minReplicas, maxReplicas: hpaObject.spec?.maxReplicas, currentReplicas: hpaObject.status?.currentReplicas, desiredReplicas: hpaObject.status?.desiredReplicas, + lastScaleTime: hpa?.status?.lastScaleTime, }; }} > diff --git a/plugins/kubernetes-react/src/components/HorizontalPodAutoscalers/__fixtures__/horizontalpodautoscalers.json b/plugins/kubernetes-react/src/components/HorizontalPodAutoscalers/__fixtures__/horizontalpodautoscalers.json index 6afdda48ed..94cc8a840d 100644 --- a/plugins/kubernetes-react/src/components/HorizontalPodAutoscalers/__fixtures__/horizontalpodautoscalers.json +++ b/plugins/kubernetes-react/src/components/HorizontalPodAutoscalers/__fixtures__/horizontalpodautoscalers.json @@ -1,82 +1,79 @@ [ { + "apiVersion": "autoscaling/v2", + "kind": "HorizontalPodAutoscaler", "metadata": { - "annotations": { - "autoscaling.alpha.kubernetes.io/conditions": "[{\"type\":\"AbleToScale\",\"status\":\"True\",\"lastTransitionTime\":\"2020-09-28T13:28:15Z\",\"reason\":\"SucceededGetScale\",\"message\":\"the HPA controller was able to get the target's current scale\"},{\"type\":\"ScalingActive\",\"status\":\"False\",\"lastTransitionTime\":\"2020-09-28T13:28:15Z\",\"reason\":\"FailedGetResourceMetric\",\"message\":\"the HPA was unable to compute the replica count: unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: the server could not find the requested resource (get pods.metrics.k8s.io)\"}]", - "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"autoscaling/v1\",\"kind\":\"HorizontalPodAutoscaler\",\"metadata\":{\"annotations\":{},\"labels\":{\"backstage.io/kubernetes-id\":\"dice-roller\"},\"name\":\"dice-roller\",\"namespace\":\"default\"},\"spec\":{\"maxReplicas\":15,\"minReplicas\":10,\"scaleTargetRef\":{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"name\":\"dice-roller\"},\"targetCPUUtilizationPercentage\":50}}\n" - }, - "creationTimestamp": "2020-09-28T13:28:00.000Z", + "annotations": {}, + "creationTimestamp": "2024-02-13T20:13:52Z", "labels": { "backstage.io/kubernetes-id": "dice-roller" }, - "managedFields": [ - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:autoscaling.alpha.kubernetes.io/conditions": {} - } - }, - "f:status": { - "f:currentReplicas": {} - } - }, - "manager": "kube-controller-manager", - "operation": "Update", - "time": "2020-09-28T13:28:15.000Z" - }, - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:kubectl.kubernetes.io/last-applied-configuration": {} - }, - "f:labels": { - ".": {}, - "f:backstage.io/kubernetes-id": {} - } - }, - "f:spec": { - "f:maxReplicas": {}, - "f:minReplicas": {}, - "f:scaleTargetRef": { - "f:apiVersion": {}, - "f:kind": {}, - "f:name": {} - }, - "f:targetCPUUtilizationPercentage": {} - } - }, - "manager": "kubectl", - "operation": "Update", - "time": "2020-09-28T13:28:21.000Z" - } - ], "name": "dice-roller", "namespace": "default", - "resourceVersion": "698957", - "selfLink": "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/dice-roller", - "uid": "a70c8a90-5605-4d7d-adea-05cfb8d9d446" + "resourceVersion": "6717s736", + "uid": "a34c90e1-8e8f-407f-b4c5-b4543bd56c1b" }, "spec": { "maxReplicas": 15, + "metrics": [ + { + "resource": { + "name": "cpu", + "target": { + "averageUtilization": 30, + "type": "Utilization" + } + }, + "type": "Resource" + } + ], "minReplicas": 10, "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "dice-roller" - }, - "targetCPUUtilizationPercentage": 50 + } }, "status": { + "conditions": [ + { + "lastTransitionTime": "2024-05-17T19:50:35Z", + "message": "recent recommendations were higher than current one, applying the highest recent recommendation", + "reason": "ScaleDownStabilized", + "status": "True", + "type": "AbleToScale" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)", + "reason": "ValidMetricFound", + "status": "True", + "type": "ScalingActive" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the desired replica count is more than the maximum replica count", + "reason": "TooManyReplicas", + "status": "True", + "type": "ScalingLimited" + } + ], + "currentMetrics": [ + { + "resource": { + "current": { + "averageUtilization": 50, + "averageValue": "50m", + "value": "100m" + }, + "name": "cpu" + }, + "type": "Resource" + } + ], "currentReplicas": 13, "desiredReplicas": 14, - "currentCPUUtilizationPercentage": 30 + "lastScaleTime": "2024-02-13T20:14:23Z" } } ] diff --git a/plugins/kubernetes-react/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx b/plugins/kubernetes-react/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx index 00f08c3c98..80fff510e7 100644 --- a/plugins/kubernetes-react/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx +++ b/plugins/kubernetes-react/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx @@ -23,7 +23,7 @@ import Typography from '@material-ui/core/Typography'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { V1Pod, - V1HorizontalPodAutoscaler, + V2HorizontalPodAutoscaler, V1StatefulSet, } from '@kubernetes/client-node'; import { PodsTable } from '../Pods'; @@ -44,7 +44,7 @@ type StatefulSetsAccordionsProps = { type StatefulSetAccordionProps = { statefulset: V1StatefulSet; ownedPods: V1Pod[]; - matchingHpa?: V1HorizontalPodAutoscaler; + matchingHpa?: V2HorizontalPodAutoscaler; children?: React.ReactNode; }; @@ -52,7 +52,7 @@ type StatefulSetSummaryProps = { statefulset: V1StatefulSet; numberOfCurrentPods: number; numberOfPodsWithErrors: number; - hpa?: V1HorizontalPodAutoscaler; + hpa?: V2HorizontalPodAutoscaler; children?: React.ReactNode; }; @@ -62,6 +62,14 @@ const StatefulSetSummary = ({ numberOfPodsWithErrors, hpa, }: StatefulSetSummaryProps) => { + const specCpuUtil = hpa?.spec?.metrics?.find( + metric => metric.type === 'Resource' && metric.resource?.name === 'cpu', + )?.resource?.target.averageUtilization; + + const cpuUtil = hpa?.status?.currentMetrics?.find( + metric => metric.type === 'Resource' && metric.resource?.name === 'cpu', + )?.resource?.current.averageUtilization; + return ( - current CPU usage:{' '} - {hpa.status?.currentCPUUtilizationPercentage ?? '?'}% + current CPU usage: {cpuUtil ?? '?'}% - target CPU usage:{' '} - {hpa.spec?.targetCPUUtilizationPercentage ?? '?'}% + target CPU usage: {specCpuUtil ?? '?'}% diff --git a/plugins/kubernetes-react/src/utils/owner.ts b/plugins/kubernetes-react/src/utils/owner.ts index 1c1d8089a3..bd0cd39677 100644 --- a/plugins/kubernetes-react/src/utils/owner.ts +++ b/plugins/kubernetes-react/src/utils/owner.ts @@ -16,7 +16,7 @@ import { V1ObjectMeta } from '@kubernetes/client-node/dist/gen/model/v1ObjectMeta'; import { - V1HorizontalPodAutoscaler, + V2HorizontalPodAutoscaler, V1Pod, V1ReplicaSet, } from '@kubernetes/client-node'; @@ -62,8 +62,8 @@ interface ResourceRef { export const getMatchingHpa = ( owner: ResourceRef, - hpas: V1HorizontalPodAutoscaler[], -): V1HorizontalPodAutoscaler | undefined => { + hpas: V2HorizontalPodAutoscaler[], +): V2HorizontalPodAutoscaler | undefined => { return hpas.find(hpa => { return ( (hpa.spec?.scaleTargetRef?.kind ?? '').toLocaleLowerCase('en-US') === diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md index fcfbfdb6d2..77c059aa4f 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-kubernetes +## 0.11.11-next.1 + +### Patch Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- Updated dependencies + - @backstage/plugin-kubernetes-react@0.4.0-next.1 + - @backstage/plugin-kubernetes-common@0.8.0-next.0 + - @backstage/plugin-catalog-react@1.12.1-next.0 + ## 0.11.11-next.0 ### Patch Changes diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index bd47686e63..75ee785bf9 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes", "description": "A Backstage plugin that integrates towards Kubernetes", - "version": "0.11.11-next.0", + "version": "0.11.11-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kubernetes/src/__fixtures__/1-deployments.json b/plugins/kubernetes/src/__fixtures__/1-deployments.json index 5ad847dc49..3a9da2a33a 100644 --- a/plugins/kubernetes/src/__fixtures__/1-deployments.json +++ b/plugins/kubernetes/src/__fixtures__/1-deployments.json @@ -2826,85 +2826,80 @@ ], "horizontalPodAutoscalers": [ { - "apiVersion": "autoscaling/v1", + "apiVersion": "autoscaling/v2", "kind": "HorizontalPodAutoscaler", "metadata": { - "annotations": { - "autoscaling.alpha.kubernetes.io/conditions": "[{\"type\":\"AbleToScale\",\"status\":\"True\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"SucceededGetScale\",\"message\":\"the HPA controller was able to get the target's current scale\"},{\"type\":\"ScalingActive\",\"status\":\"False\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"FailedGetResourceMetric\",\"message\":\"the HPA was unable to compute the replica count: unable to get metrics for resource cpu: no metrics returned from resource metrics API\"}]", - "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"autoscaling/v1\",\"kind\":\"HorizontalPodAutoscaler\",\"metadata\":{\"annotations\":{},\"labels\":{\"backstage.io/kubernetes-id\":\"dice-roller\"},\"name\":\"dice-roller\",\"namespace\":\"default\"},\"spec\":{\"maxReplicas\":15,\"minReplicas\":10,\"scaleTargetRef\":{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"name\":\"dice-roller\"},\"targetCPUUtilizationPercentage\":50}}\n" - }, - "creationTimestamp": "2021-01-05T10:25:48Z", + "annotations": {}, + "creationTimestamp": "2024-02-13T20:13:52Z", "labels": { "backstage.io/kubernetes-id": "dice-roller" }, - "managedFields": [ - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:kubectl.kubernetes.io/last-applied-configuration": {} - }, - "f:labels": { - ".": {}, - "f:backstage.io/kubernetes-id": {} - } - }, - "f:spec": { - "f:maxReplicas": {}, - "f:minReplicas": {}, - "f:scaleTargetRef": { - "f:apiVersion": {}, - "f:kind": {}, - "f:name": {} - }, - "f:targetCPUUtilizationPercentage": {} - } - }, - "manager": "kubectl-client-side-apply", - "operation": "Update", - "time": "2021-01-05T10:25:48Z" - }, - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:autoscaling.alpha.kubernetes.io/conditions": {} - } - }, - "f:status": { - "f:currentReplicas": {} - } - }, - "manager": "kube-controller-manager", - "operation": "Update", - "time": "2021-01-05T10:26:04Z" - } - ], "name": "dice-roller", "namespace": "default", - "resourceVersion": "598", - "selfLink": "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/dice-roller", - "uid": "dd7c5329-567c-43c2-b159-756808d90a8e" + "resourceVersion": "6717s736", + "uid": "a34c90e1-8e8f-407f-b4c5-b4543bd56c1b" }, "spec": { - "maxReplicas": 15, - "minReplicas": 10, + "maxReplicas": 2, + "metrics": [ + { + "resource": { + "name": "cpu", + "target": { + "averageUtilization": 50, + "type": "Utilization" + } + }, + "type": "Resource" + } + ], + "minReplicas": 1, "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "dice-roller" - }, - "targetCPUUtilizationPercentage": 50 + } }, "status": { - "currentReplicas": 10, - "desiredReplicas": 0, - "currentCPUUtilizationPercentage": 30 + "conditions": [ + { + "lastTransitionTime": "2024-05-17T19:50:35Z", + "message": "recent recommendations were higher than current one, applying the highest recent recommendation", + "reason": "ScaleDownStabilized", + "status": "True", + "type": "AbleToScale" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)", + "reason": "ValidMetricFound", + "status": "True", + "type": "ScalingActive" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the desired replica count is more than the maximum replica count", + "reason": "TooManyReplicas", + "status": "True", + "type": "ScalingLimited" + } + ], + "currentMetrics": [ + { + "resource": { + "current": { + "averageUtilization": 100, + "averageValue": "50m", + "value": "100m" + }, + "name": "cpu" + }, + "type": "Resource" + } + ], + "currentReplicas": 2, + "desiredReplicas": 2, + "lastScaleTime": "2024-02-13T20:14:23Z" } } ] diff --git a/plugins/kubernetes/src/__fixtures__/1-statefulsets.json b/plugins/kubernetes/src/__fixtures__/1-statefulsets.json index 6c04774ff1..5d9b56300a 100644 --- a/plugins/kubernetes/src/__fixtures__/1-statefulsets.json +++ b/plugins/kubernetes/src/__fixtures__/1-statefulsets.json @@ -2827,85 +2827,80 @@ ], "horizontalPodAutoscalers": [ { - "apiVersion": "autoscaling/v1", + "apiVersion": "autoscaling/v2", "kind": "HorizontalPodAutoscaler", "metadata": { - "annotations": { - "autoscaling.alpha.kubernetes.io/conditions": "[{\"type\":\"AbleToScale\",\"status\":\"True\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"SucceededGetScale\",\"message\":\"the HPA controller was able to get the target's current scale\"},{\"type\":\"ScalingActive\",\"status\":\"False\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"FailedGetResourceMetric\",\"message\":\"the HPA was unable to compute the replica count: unable to get metrics for resource cpu: no metrics returned from resource metrics API\"}]", - "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"autoscaling/v1\",\"kind\":\"HorizontalPodAutoscaler\",\"metadata\":{\"annotations\":{},\"labels\":{\"backstage.io/kubernetes-id\":\"dice-roller\"},\"name\":\"dice-roller\",\"namespace\":\"default\"},\"spec\":{\"maxReplicas\":15,\"minReplicas\":10,\"scaleTargetRef\":{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"name\":\"dice-roller\"},\"targetCPUUtilizationPercentage\":50}}\n" - }, - "creationTimestamp": "2021-01-05T10:25:48Z", + "annotations": {}, + "creationTimestamp": "2024-02-13T20:13:52Z", "labels": { "backstage.io/kubernetes-id": "dice-roller" }, - "managedFields": [ - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:kubectl.kubernetes.io/last-applied-configuration": {} - }, - "f:labels": { - ".": {}, - "f:backstage.io/kubernetes-id": {} - } - }, - "f:spec": { - "f:maxReplicas": {}, - "f:minReplicas": {}, - "f:scaleTargetRef": { - "f:apiVersion": {}, - "f:kind": {}, - "f:name": {} - }, - "f:targetCPUUtilizationPercentage": {} - } - }, - "manager": "kubectl-client-side-apply", - "operation": "Update", - "time": "2021-01-05T10:25:48Z" - }, - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:autoscaling.alpha.kubernetes.io/conditions": {} - } - }, - "f:status": { - "f:currentReplicas": {} - } - }, - "manager": "kube-controller-manager", - "operation": "Update", - "time": "2021-01-05T10:26:04Z" - } - ], "name": "dice-roller", "namespace": "default", - "resourceVersion": "598", - "selfLink": "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/dice-roller", - "uid": "dd7c5329-567c-43c2-b159-756808d90a8e" + "resourceVersion": "6717s736", + "uid": "a34c90e1-8e8f-407f-b4c5-b4543bd56c1b" }, "spec": { - "maxReplicas": 15, - "minReplicas": 10, + "maxReplicas": 2, + "metrics": [ + { + "resource": { + "name": "cpu", + "target": { + "averageUtilization": 50, + "type": "Utilization" + } + }, + "type": "Resource" + } + ], + "minReplicas": 1, "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "dice-roller" - }, - "targetCPUUtilizationPercentage": 50 + } }, "status": { - "currentReplicas": 10, - "desiredReplicas": 0, - "currentCPUUtilizationPercentage": 30 + "conditions": [ + { + "lastTransitionTime": "2024-05-17T19:50:35Z", + "message": "recent recommendations were higher than current one, applying the highest recent recommendation", + "reason": "ScaleDownStabilized", + "status": "True", + "type": "AbleToScale" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)", + "reason": "ValidMetricFound", + "status": "True", + "type": "ScalingActive" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the desired replica count is more than the maximum replica count", + "reason": "TooManyReplicas", + "status": "True", + "type": "ScalingLimited" + } + ], + "currentMetrics": [ + { + "resource": { + "current": { + "averageUtilization": 100, + "averageValue": "50m", + "value": "100m" + }, + "name": "cpu" + }, + "type": "Resource" + } + ], + "currentReplicas": 2, + "desiredReplicas": 2, + "lastScaleTime": "2024-02-13T20:14:23Z" } } ] diff --git a/plugins/kubernetes/src/__fixtures__/2-deployments.json b/plugins/kubernetes/src/__fixtures__/2-deployments.json index f5efdbf1cb..c8209e9f0a 100644 --- a/plugins/kubernetes/src/__fixtures__/2-deployments.json +++ b/plugins/kubernetes/src/__fixtures__/2-deployments.json @@ -4434,85 +4434,80 @@ ], "horizontalPodAutoscalers": [ { - "apiVersion": "autoscaling/v1", + "apiVersion": "autoscaling/v2", "kind": "HorizontalPodAutoscaler", "metadata": { - "annotations": { - "autoscaling.alpha.kubernetes.io/conditions": "[{\"type\":\"AbleToScale\",\"status\":\"True\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"SucceededGetScale\",\"message\":\"the HPA controller was able to get the target's current scale\"},{\"type\":\"ScalingActive\",\"status\":\"False\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"FailedGetResourceMetric\",\"message\":\"the HPA was unable to compute the replica count: unable to get metrics for resource cpu: no metrics returned from resource metrics API\"}]", - "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"autoscaling/v1\",\"kind\":\"HorizontalPodAutoscaler\",\"metadata\":{\"annotations\":{},\"labels\":{\"backstage.io/kubernetes-id\":\"dice-roller\"},\"name\":\"dice-roller\",\"namespace\":\"default\"},\"spec\":{\"maxReplicas\":15,\"minReplicas\":10,\"scaleTargetRef\":{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"name\":\"dice-roller\"},\"targetCPUUtilizationPercentage\":50}}\n" - }, - "creationTimestamp": "2021-01-05T10:25:48Z", + "annotations": {}, + "creationTimestamp": "2024-02-13T20:13:52Z", "labels": { "backstage.io/kubernetes-id": "dice-roller" }, - "managedFields": [ - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:kubectl.kubernetes.io/last-applied-configuration": {} - }, - "f:labels": { - ".": {}, - "f:backstage.io/kubernetes-id": {} - } - }, - "f:spec": { - "f:maxReplicas": {}, - "f:minReplicas": {}, - "f:scaleTargetRef": { - "f:apiVersion": {}, - "f:kind": {}, - "f:name": {} - }, - "f:targetCPUUtilizationPercentage": {} - } - }, - "manager": "kubectl-client-side-apply", - "operation": "Update", - "time": "2021-01-05T10:25:48Z" - }, - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:autoscaling.alpha.kubernetes.io/conditions": {} - } - }, - "f:status": { - "f:currentReplicas": {} - } - }, - "manager": "kube-controller-manager", - "operation": "Update", - "time": "2021-01-05T10:26:04Z" - } - ], "name": "dice-roller", "namespace": "default", - "resourceVersion": "598", - "selfLink": "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/dice-roller", - "uid": "dd7c5329-567c-43c2-b159-756808d90a8e" + "resourceVersion": "6717s736", + "uid": "a34c90e1-8e8f-407f-b4c5-b4543bd56c1b" }, "spec": { - "maxReplicas": 15, - "minReplicas": 10, + "maxReplicas": 2, + "metrics": [ + { + "resource": { + "name": "cpu", + "target": { + "averageUtilization": 50, + "type": "Utilization" + } + }, + "type": "Resource" + } + ], + "minReplicas": 1, "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "dice-roller" - }, - "targetCPUUtilizationPercentage": 50 + } }, "status": { - "currentReplicas": 10, - "desiredReplicas": 0, - "currentCPUUtilizationPercentage": 30 + "conditions": [ + { + "lastTransitionTime": "2024-05-17T19:50:35Z", + "message": "recent recommendations were higher than current one, applying the highest recent recommendation", + "reason": "ScaleDownStabilized", + "status": "True", + "type": "AbleToScale" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)", + "reason": "ValidMetricFound", + "status": "True", + "type": "ScalingActive" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the desired replica count is more than the maximum replica count", + "reason": "TooManyReplicas", + "status": "True", + "type": "ScalingLimited" + } + ], + "currentMetrics": [ + { + "resource": { + "current": { + "averageUtilization": 100, + "averageValue": "50m", + "value": "100m" + }, + "name": "cpu" + }, + "type": "Resource" + } + ], + "currentReplicas": 2, + "desiredReplicas": 2, + "lastScaleTime": "2024-02-13T20:14:23Z" } } ] diff --git a/plugins/kubernetes/src/__fixtures__/2-statefulsets.json b/plugins/kubernetes/src/__fixtures__/2-statefulsets.json index 0a8c26c198..c45b1070d6 100644 --- a/plugins/kubernetes/src/__fixtures__/2-statefulsets.json +++ b/plugins/kubernetes/src/__fixtures__/2-statefulsets.json @@ -4436,85 +4436,80 @@ ], "horizontalPodAutoscalers": [ { - "apiVersion": "autoscaling/v1", + "apiVersion": "autoscaling/v2", "kind": "HorizontalPodAutoscaler", "metadata": { - "annotations": { - "autoscaling.alpha.kubernetes.io/conditions": "[{\"type\":\"AbleToScale\",\"status\":\"True\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"SucceededGetScale\",\"message\":\"the HPA controller was able to get the target's current scale\"},{\"type\":\"ScalingActive\",\"status\":\"False\",\"lastTransitionTime\":\"2021-01-05T10:26:04Z\",\"reason\":\"FailedGetResourceMetric\",\"message\":\"the HPA was unable to compute the replica count: unable to get metrics for resource cpu: no metrics returned from resource metrics API\"}]", - "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"autoscaling/v1\",\"kind\":\"HorizontalPodAutoscaler\",\"metadata\":{\"annotations\":{},\"labels\":{\"backstage.io/kubernetes-id\":\"dice-roller\"},\"name\":\"dice-roller\",\"namespace\":\"default\"},\"spec\":{\"maxReplicas\":15,\"minReplicas\":10,\"scaleTargetRef\":{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"name\":\"dice-roller\"},\"targetCPUUtilizationPercentage\":50}}\n" - }, - "creationTimestamp": "2021-01-05T10:25:48Z", + "annotations": {}, + "creationTimestamp": "2024-02-13T20:13:52Z", "labels": { "backstage.io/kubernetes-id": "dice-roller" }, - "managedFields": [ - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - ".": {}, - "f:kubectl.kubernetes.io/last-applied-configuration": {} - }, - "f:labels": { - ".": {}, - "f:backstage.io/kubernetes-id": {} - } - }, - "f:spec": { - "f:maxReplicas": {}, - "f:minReplicas": {}, - "f:scaleTargetRef": { - "f:apiVersion": {}, - "f:kind": {}, - "f:name": {} - }, - "f:targetCPUUtilizationPercentage": {} - } - }, - "manager": "kubectl-client-side-apply", - "operation": "Update", - "time": "2021-01-05T10:25:48Z" - }, - { - "apiVersion": "autoscaling/v1", - "fieldsType": "FieldsV1", - "fieldsV1": { - "f:metadata": { - "f:annotations": { - "f:autoscaling.alpha.kubernetes.io/conditions": {} - } - }, - "f:status": { - "f:currentReplicas": {} - } - }, - "manager": "kube-controller-manager", - "operation": "Update", - "time": "2021-01-05T10:26:04Z" - } - ], "name": "dice-roller", "namespace": "default", - "resourceVersion": "598", - "selfLink": "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/dice-roller", - "uid": "dd7c5329-567c-43c2-b159-756808d90a8e" + "resourceVersion": "6717s736", + "uid": "a34c90e1-8e8f-407f-b4c5-b4543bd56c1b" }, "spec": { - "maxReplicas": 15, - "minReplicas": 10, + "maxReplicas": 2, + "metrics": [ + { + "resource": { + "name": "cpu", + "target": { + "averageUtilization": 50, + "type": "Utilization" + } + }, + "type": "Resource" + } + ], + "minReplicas": 1, "scaleTargetRef": { "apiVersion": "apps/v1", "kind": "Deployment", "name": "dice-roller" - }, - "targetCPUUtilizationPercentage": 50 + } }, "status": { - "currentReplicas": 10, - "desiredReplicas": 0, - "currentCPUUtilizationPercentage": 30 + "conditions": [ + { + "lastTransitionTime": "2024-05-17T19:50:35Z", + "message": "recent recommendations were higher than current one, applying the highest recent recommendation", + "reason": "ScaleDownStabilized", + "status": "True", + "type": "AbleToScale" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)", + "reason": "ValidMetricFound", + "status": "True", + "type": "ScalingActive" + }, + { + "lastTransitionTime": "2024-05-16T06:21:01Z", + "message": "the desired replica count is more than the maximum replica count", + "reason": "TooManyReplicas", + "status": "True", + "type": "ScalingLimited" + } + ], + "currentMetrics": [ + { + "resource": { + "current": { + "averageUtilization": 100, + "averageValue": "50m", + "value": "100m" + }, + "name": "cpu" + }, + "type": "Resource" + } + ], + "currentReplicas": 2, + "desiredReplicas": 2, + "lastScaleTime": "2024-02-13T20:14:23Z" } } ] diff --git a/plugins/kubernetes/src/plugin.ts b/plugins/kubernetes/src/plugin.ts index afe2287633..eaa714dbea 100644 --- a/plugins/kubernetes/src/plugin.ts +++ b/plugins/kubernetes/src/plugin.ts @@ -30,13 +30,13 @@ import { createPlugin, createRouteRef, discoveryApiRef, - identityApiRef, gitlabAuthApiRef, googleAuthApiRef, microsoftAuthApiRef, oktaAuthApiRef, oneloginAuthApiRef, createRoutableExtension, + fetchApiRef, } from '@backstage/core-plugin-api'; export const rootCatalogKubernetesRouteRef = createRouteRef({ @@ -50,13 +50,13 @@ export const kubernetesPlugin = createPlugin({ api: kubernetesApiRef, deps: { discoveryApi: discoveryApiRef, - identityApi: identityApiRef, + fetchApi: fetchApiRef, kubernetesAuthProvidersApi: kubernetesAuthProvidersApiRef, }, - factory: ({ discoveryApi, identityApi, kubernetesAuthProvidersApi }) => + factory: ({ discoveryApi, fetchApi, kubernetesAuthProvidersApi }) => new KubernetesBackendClient({ discoveryApi, - identityApi, + fetchApi, kubernetesAuthProvidersApi, }), }), diff --git a/plugins/notifications-backend-module-email/CHANGELOG.md b/plugins/notifications-backend-module-email/CHANGELOG.md index e2b1e0cea4..dc4b0238e5 100644 --- a/plugins/notifications-backend-module-email/CHANGELOG.md +++ b/plugins/notifications-backend-module-email/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-notifications-backend-module-email +## 0.1.0-next.1 + +### Minor Changes + +- 07a789b: add notification filters + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-notifications-node@0.2.0-next.1 + - @backstage/backend-common@0.23.0-next.1 + ## 0.0.2-next.0 ### Patch Changes diff --git a/plugins/notifications-backend-module-email/package.json b/plugins/notifications-backend-module-email/package.json index d94048978e..21b47d9de4 100644 --- a/plugins/notifications-backend-module-email/package.json +++ b/plugins/notifications-backend-module-email/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-notifications-backend-module-email", - "version": "0.0.2-next.0", + "version": "0.1.0-next.1", "description": "The email backend module for the notifications plugin.", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/notifications-backend/CHANGELOG.md b/plugins/notifications-backend/CHANGELOG.md index 923696afce..28929c9334 100644 --- a/plugins/notifications-backend/CHANGELOG.md +++ b/plugins/notifications-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-notifications-backend +## 0.3.0-next.1 + +### Minor Changes + +- 07a789b: adding filtering of notifications by processors + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-notifications-node@0.2.0-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + - @backstage/plugin-signals-node@0.1.5-next.1 + ## 0.2.2-next.0 ### Patch Changes diff --git a/plugins/notifications-backend/package.json b/plugins/notifications-backend/package.json index 3d809ba11b..03e7214d85 100644 --- a/plugins/notifications-backend/package.json +++ b/plugins/notifications-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-notifications-backend", - "version": "0.2.2-next.0", + "version": "0.3.0-next.1", "backstage": { "role": "backend-plugin" }, diff --git a/plugins/notifications-node/CHANGELOG.md b/plugins/notifications-node/CHANGELOG.md index eca0358484..846b305f5e 100644 --- a/plugins/notifications-node/CHANGELOG.md +++ b/plugins/notifications-node/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-notifications-node +## 0.2.0-next.1 + +### Minor Changes + +- 07a789b: add notifications filtering by processors + +### Patch Changes + +- 1354d81: Use `node-fetch` instead of native fetch, as per https://backstage.io/docs/architecture-decisions/adrs-adr013 +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-signals-node@0.1.5-next.1 + ## 0.1.5-next.0 ### Patch Changes diff --git a/plugins/notifications-node/package.json b/plugins/notifications-node/package.json index 2500026f3b..b566da41f5 100644 --- a/plugins/notifications-node/package.json +++ b/plugins/notifications-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-notifications-node", - "version": "0.1.5-next.0", + "version": "0.2.0-next.1", "description": "Node.js library for the notifications plugin", "backstage": { "role": "node-library" diff --git a/plugins/notifications/CHANGELOG.md b/plugins/notifications/CHANGELOG.md index 08affa74d9..66a02ee34a 100644 --- a/plugins/notifications/CHANGELOG.md +++ b/plugins/notifications/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-notifications +## 0.2.2-next.1 + +### Patch Changes + +- 6d196b4: Fixes performance issue with Notifications title counter. + ## 0.2.2-next.0 ### Patch Changes diff --git a/plugins/notifications/package.json b/plugins/notifications/package.json index 6c975c8557..0e54a64f86 100644 --- a/plugins/notifications/package.json +++ b/plugins/notifications/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-notifications", - "version": "0.2.2-next.0", + "version": "0.2.2-next.1", "backstage": { "role": "frontend-plugin" }, diff --git a/plugins/notifications/src/hooks/useTitleCounter.ts b/plugins/notifications/src/hooks/useTitleCounter.ts index d794678ea6..0793cd58d6 100644 --- a/plugins/notifications/src/hooks/useTitleCounter.ts +++ b/plugins/notifications/src/hooks/useTitleCounter.ts @@ -13,38 +13,33 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { useCallback, useEffect, useRef, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; +import throttle from 'lodash/throttle'; + +const getPrefix = (value: number) => (value === 0 ? '' : `(${value}) `); + +const cleanTitle = (currentTitle: string) => + currentTitle.replace(/^\(\d+\)\s/, ''); + +const throttledSetTitle = throttle((shownTitle: string) => { + document.title = shownTitle; +}, 100); /** @public */ export function useTitleCounter() { const [title, setTitle] = useState(document.title); const [count, setCount] = useState(0); - const titleTimer = useRef(undefined); - - const getPrefix = (value: number) => { - return value === 0 ? '' : `(${value}) `; - }; - - const cleanTitle = (currentTitle: string) => { - return currentTitle.replace(/^\(\d+\)\s/, ''); - }; useEffect(() => { const baseTitle = cleanTitle(title); const shownTitle = `${getPrefix(count)}${baseTitle}`; if (document.title !== shownTitle) { - window.clearTimeout(titleTimer.current); - document.title = shownTitle; - // Need to do this in timeout as the React Helmet overrides the title after this effect - titleTimer.current = window.setTimeout(() => { - document.title = shownTitle; - }, 50); + throttledSetTitle(shownTitle); } return () => { - window.clearTimeout(titleTimer.current); document.title = cleanTitle(title); }; - }, [title, count]); + }, [count, title]); useEffect(() => { const titleElement = document.querySelector('title'); diff --git a/plugins/permission-backend/CHANGELOG.md b/plugins/permission-backend/CHANGELOG.md index 46c70631c1..58db983a93 100644 --- a/plugins/permission-backend/CHANGELOG.md +++ b/plugins/permission-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-permission-backend +## 0.5.43-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 0.5.43-next.0 ### Patch Changes diff --git a/plugins/permission-backend/package.json b/plugins/permission-backend/package.json index c09007b817..33c95f7997 100644 --- a/plugins/permission-backend/package.json +++ b/plugins/permission-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-backend", - "version": "0.5.43-next.0", + "version": "0.5.43-next.1", "backstage": { "role": "backend-plugin" }, diff --git a/plugins/permission-node/CHANGELOG.md b/plugins/permission-node/CHANGELOG.md index 756b93a37c..6a394c781d 100644 --- a/plugins/permission-node/CHANGELOG.md +++ b/plugins/permission-node/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-permission-node +## 0.7.30-next.1 + +### Patch Changes + +- 9e63318: Ensure that service token access restrictions, when present, are taken into account +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 0.7.30-next.0 ### Patch Changes diff --git a/plugins/permission-node/package.json b/plugins/permission-node/package.json index 254ef17d00..1878e4db08 100644 --- a/plugins/permission-node/package.json +++ b/plugins/permission-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-node", "description": "Common permission and authorization utilities for backend plugins", - "version": "0.7.30-next.0", + "version": "0.7.30-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/proxy-backend/CHANGELOG.md b/plugins/proxy-backend/CHANGELOG.md index 2db699508f..dac4e39607 100644 --- a/plugins/proxy-backend/CHANGELOG.md +++ b/plugins/proxy-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-proxy-backend +## 0.5.0-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + ## 0.5.0-next.0 ### Minor Changes diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index af0d9d584e..59d9fb522d 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-proxy-backend", - "version": "0.5.0-next.0", + "version": "0.5.0-next.1", "description": "A Backstage backend plugin that helps you set up proxy endpoints in the backend", "backstage": { "role": "backend-plugin" diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md b/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md index e152ffeba6..ba99c297e7 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-backend-module-confluence-to-markdown +## 0.2.20-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + ## 0.2.20-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/package.json b/plugins/scaffolder-backend-module-confluence-to-markdown/package.json index 67b85ef18e..7839fa0dc0 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/package.json +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-confluence-to-markdown", - "version": "0.2.20-next.0", + "version": "0.2.20-next.1", "description": "The confluence-to-markdown module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index c3e2893dc6..291f711152 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.2.43-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + ## 0.2.43-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index 2d750a1086..6a1ab577aa 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", - "version": "0.2.43-next.0", + "version": "0.2.43-next.1", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/scaffolder-backend-module-gitea/CHANGELOG.md b/plugins/scaffolder-backend-module-gitea/CHANGELOG.md index 373b06a638..099862e4b5 100644 --- a/plugins/scaffolder-backend-module-gitea/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-gitea/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-backend-module-gitea +## 0.1.9-next.1 + +### Patch Changes + +- 1354d81: Use `node-fetch` instead of native fetch, as per https://backstage.io/docs/architecture-decisions/adrs-adr013 +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + ## 0.1.9-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-gitea/package.json b/plugins/scaffolder-backend-module-gitea/package.json index 0d6baeaaa0..1f89cdc366 100644 --- a/plugins/scaffolder-backend-module-gitea/package.json +++ b/plugins/scaffolder-backend-module-gitea/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-gitea", - "version": "0.1.9-next.0", + "version": "0.1.9-next.1", "description": "The gitea module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/scaffolder-backend-module-github/CHANGELOG.md b/plugins/scaffolder-backend-module-github/CHANGELOG.md index a375e2202b..53091b92cb 100644 --- a/plugins/scaffolder-backend-module-github/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-github/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-backend-module-github +## 0.2.9-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + ## 0.2.9-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-github/package.json b/plugins/scaffolder-backend-module-github/package.json index 6338947116..88eeb2860e 100644 --- a/plugins/scaffolder-backend-module-github/package.json +++ b/plugins/scaffolder-backend-module-github/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-github", - "version": "0.2.9-next.0", + "version": "0.2.9-next.1", "description": "The github module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md b/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md index f7d18d703a..3464ff436a 100644 --- a/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-scaffolder-backend-module-gitlab +## 0.4.1-next.1 + +### Patch Changes + +- 829e0ec: Add new `gitlab:pipeline:trigger` action to trigger GitLab pipelines. +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + ## 0.4.1-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-gitlab/package.json b/plugins/scaffolder-backend-module-gitlab/package.json index b91b36bd55..bb7be8363b 100644 --- a/plugins/scaffolder-backend-module-gitlab/package.json +++ b/plugins/scaffolder-backend-module-gitlab/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-gitlab", - "version": "0.4.1-next.0", + "version": "0.4.1-next.1", "backstage": { "role": "backend-plugin-module" }, diff --git a/plugins/scaffolder-backend-module-notifications/CHANGELOG.md b/plugins/scaffolder-backend-module-notifications/CHANGELOG.md index 8e5994dd23..6c004bee97 100644 --- a/plugins/scaffolder-backend-module-notifications/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-notifications/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-scaffolder-backend-module-notifications +## 0.0.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-notifications-node@0.2.0-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + ## 0.0.2-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-notifications/package.json b/plugins/scaffolder-backend-module-notifications/package.json index fcebc0c511..c98eea2b8f 100644 --- a/plugins/scaffolder-backend-module-notifications/package.json +++ b/plugins/scaffolder-backend-module-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-notifications", - "version": "0.0.2-next.0", + "version": "0.0.2-next.1", "description": "The notifications backend module for the scaffolder plugin.", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index 1c174579bb..4afe60a1fe 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.4.36-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + ## 0.4.36-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index 62ba9ff77c..08b45f598c 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", - "version": "0.4.36-next.0", + "version": "0.4.36-next.1", "description": "A module for the scaffolder backend that lets you template projects using Rails", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/scaffolder-backend-module-sentry/CHANGELOG.md b/plugins/scaffolder-backend-module-sentry/CHANGELOG.md index 6f5d470dab..ca4532e8ce 100644 --- a/plugins/scaffolder-backend-module-sentry/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-sentry/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-backend-module-sentry +## 0.1.27-next.1 + +### Patch Changes + +- 1354d81: Use `node-fetch` instead of native fetch, as per https://backstage.io/docs/architecture-decisions/adrs-adr013 +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + ## 0.1.27-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-sentry/package.json b/plugins/scaffolder-backend-module-sentry/package.json index 861e78b565..c5930717c6 100644 --- a/plugins/scaffolder-backend-module-sentry/package.json +++ b/plugins/scaffolder-backend-module-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-sentry", - "version": "0.1.27-next.0", + "version": "0.1.27-next.1", "backstage": { "role": "backend-plugin-module" }, diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index 477470b8c9..9e087788a6 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,33 @@ # @backstage/plugin-scaffolder-backend +## 1.22.8-next.1 + +### Patch Changes + +- bcec60f: added the following new permissions to the scaffolder backend endpoints: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/plugin-scaffolder-backend-module-gitea@0.1.9-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.4.1-next.1 + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.17-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket@0.2.9-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.1.9-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.1.9-next.0 + - @backstage/plugin-scaffolder-backend-module-gerrit@0.1.11-next.0 + - @backstage/plugin-scaffolder-backend-module-github@0.2.9-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + ## 1.22.8-next.0 ### Patch Changes diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index 0caa20c410..b1901e4fcd 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend", - "version": "1.22.8-next.0", + "version": "1.22.8-next.1", "description": "The Backstage backend plugin that helps you create new things", "backstage": { "role": "backend-plugin" diff --git a/plugins/scaffolder-common/CHANGELOG.md b/plugins/scaffolder-common/CHANGELOG.md index 8b5c2d7c99..cbd9579ce9 100644 --- a/plugins/scaffolder-common/CHANGELOG.md +++ b/plugins/scaffolder-common/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-scaffolder-common +## 1.5.3-next.0 + +### Patch Changes + +- bcec60f: added the following new permissions to the scaffolder backend endpoints: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + ## 1.5.2 ### Patch Changes diff --git a/plugins/scaffolder-common/package.json b/plugins/scaffolder-common/package.json index a0060b1427..04f3375520 100644 --- a/plugins/scaffolder-common/package.json +++ b/plugins/scaffolder-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-common", - "version": "1.5.2", + "version": "1.5.3-next.0", "description": "Common functionalities for the scaffolder, to be shared between scaffolder and scaffolder-backend plugin", "backstage": { "role": "common-library" diff --git a/plugins/scaffolder-node-test-utils/CHANGELOG.md b/plugins/scaffolder-node-test-utils/CHANGELOG.md index 770f78ef77..574d08d934 100644 --- a/plugins/scaffolder-node-test-utils/CHANGELOG.md +++ b/plugins/scaffolder-node-test-utils/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-node-test-utils +## 0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-test-utils@0.4.0-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-node@0.4.5-next.1 + ## 0.1.5-next.0 ### Patch Changes diff --git a/plugins/scaffolder-node-test-utils/package.json b/plugins/scaffolder-node-test-utils/package.json index cd0cac649d..48f3ea22a7 100644 --- a/plugins/scaffolder-node-test-utils/package.json +++ b/plugins/scaffolder-node-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-node-test-utils", - "version": "0.1.5-next.0", + "version": "0.1.5-next.1", "backstage": { "role": "node-library" }, diff --git a/plugins/scaffolder-node/CHANGELOG.md b/plugins/scaffolder-node/CHANGELOG.md index 0dc1ffeec8..579ded0816 100644 --- a/plugins/scaffolder-node/CHANGELOG.md +++ b/plugins/scaffolder-node/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-node +## 0.4.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + ## 0.4.5-next.0 ### Patch Changes diff --git a/plugins/scaffolder-node/package.json b/plugins/scaffolder-node/package.json index 5f2834320f..900bf25b06 100644 --- a/plugins/scaffolder-node/package.json +++ b/plugins/scaffolder-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-node", - "version": "0.4.5-next.0", + "version": "0.4.5-next.1", "description": "The plugin-scaffolder-node module for @backstage/plugin-scaffolder-backend", "backstage": { "role": "node-library" diff --git a/plugins/scaffolder-react/CHANGELOG.md b/plugins/scaffolder-react/CHANGELOG.md index 84c442c040..c5327627bd 100644 --- a/plugins/scaffolder-react/CHANGELOG.md +++ b/plugins/scaffolder-react/CHANGELOG.md @@ -1,5 +1,1418 @@ # @backstage/plugin-scaffolder-react +## 1.8.7-next.1 + +### Patch Changes + +- 75dcd7e: Fixing bug in `formData` type as it should be `optional` as it's possibly undefined +- 928cfa0: Fixed a typo ' + +## 1.8.6-next.0 + +### Patch Changes + +- 86dc29d: Links that are rendered in the markdown in the `ScaffolderField` component are now opened in new tabs. +- Updated dependencies + - @backstage/theme@0.5.6-next.0 + - @backstage/core-components@0.14.8-next.0 + - @backstage/catalog-client@1.6.5 + - @backstage/catalog-model@1.5.0 + - @backstage/core-plugin-api@1.9.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + - @backstage/plugin-catalog-react@1.12.1-next.0 + - @backstage/plugin-scaffolder-common@1.5.2 + +## 1.8.5 + +### Patch Changes + +- 9156654: Capturing more event clicks for scaffolder +- 0040ec2: Updated dependency `@rjsf/utils` to `5.18.2`. + Updated dependency `@rjsf/core` to `5.18.2`. + Updated dependency `@rjsf/material-ui` to `5.18.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.2`. +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.2 + - @backstage/core-components@0.14.7 + - @backstage/catalog-model@1.5.0 + - @backstage/plugin-catalog-react@1.12.0 + - @backstage/theme@0.5.4 + - @backstage/catalog-client@1.6.5 + +## 1.8.5-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.12.0-next.2 + - @backstage/core-components@0.14.7-next.2 + +## 1.8.5-next.1 + +### Patch Changes + +- 9156654: Capturing more event clicks for scaffolder +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.2-next.1 + - @backstage/core-components@0.14.6-next.1 + - @backstage/plugin-catalog-react@1.11.4-next.1 + +## 1.8.5-next.0 + +### Patch Changes + +- 0040ec2: Updated dependency `@rjsf/utils` to `5.18.2`. + Updated dependency `@rjsf/core` to `5.18.2`. + Updated dependency `@rjsf/material-ui` to `5.18.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.18.2`. +- Updated dependencies + - @backstage/catalog-model@1.5.0-next.0 + - @backstage/theme@0.5.4-next.0 + - @backstage/core-components@0.14.5-next.0 + - @backstage/catalog-client@1.6.5-next.0 + - @backstage/plugin-catalog-react@1.11.4-next.0 + - @backstage/plugin-scaffolder-common@1.5.2-next.0 + - @backstage/core-plugin-api@1.9.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.8 + +## 1.8.4 + +### Patch Changes + +- abfbcfc: Updated dependency `@testing-library/react` to `^15.0.0`. +- 87d2eb8: Updated dependency `json-schema-library` to `^9.0.0`. +- cb1e3b0: Updated dependency `@testing-library/dom` to `^10.0.0`. +- 0e692cf: Added ESLint rule `no-top-level-material-ui-4-imports` to migrate the Material UI imports. +- df99f62: The `value` sent on the `create` analytics event (fired when a Scaffolder template is executed) is now set to the number of minutes saved by executing the template. This value is derived from the `backstage.io/time-saved` annotation on the template entity, if available. + + Note: the `create` event is now captured in the `` component. If you are directly making use of the alpha-exported `` component, an analytics `create` event will no longer be captured on your behalf. + +- Updated dependencies + - @backstage/plugin-catalog-react@1.11.3 + - @backstage/core-components@0.14.4 + - @backstage/core-plugin-api@1.9.2 + - @backstage/theme@0.5.3 + - @backstage/version-bridge@1.0.8 + - @backstage/catalog-client@1.6.4 + - @backstage/catalog-model@1.4.5 + - @backstage/types@1.1.1 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.4-next.1 + +### Patch Changes + +- 87d2eb8: Updated dependency `json-schema-library` to `^9.0.0`. +- df99f62: The `value` sent on the `create` analytics event (fired when a Scaffolder template is executed) is now set to the number of minutes saved by executing the template. This value is derived from the `backstage.io/time-saved` annotation on the template entity, if available. + + Note: the `create` event is now captured in the `` component. If you are directly making use of the alpha-exported `` component, an analytics `create` event will no longer be captured on your behalf. + +- Updated dependencies + - @backstage/catalog-client@1.6.4-next.0 + - @backstage/catalog-model@1.4.5 + - @backstage/core-components@0.14.4-next.0 + - @backstage/core-plugin-api@1.9.1 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-catalog-react@1.11.3-next.1 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.4-next.0 + - @backstage/catalog-client@1.6.3 + - @backstage/catalog-model@1.4.5 + - @backstage/core-plugin-api@1.9.1 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-catalog-react@1.11.3-next.0 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.3 + +### Patch Changes + +- e8f026a: Use ESM exports of react-use library +- Updated dependencies + - @backstage/catalog-client@1.6.3 + - @backstage/core-components@0.14.3 + - @backstage/plugin-catalog-react@1.11.2 + - @backstage/core-plugin-api@1.9.1 + - @backstage/catalog-model@1.4.5 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.2 + +### Patch Changes + +- e8f026a: Use ESM exports of react-use library +- Updated dependencies + - @backstage/catalog-client@1.6.2 + - @backstage/core-components@0.14.2 + - @backstage/plugin-catalog-react@1.11.1 + - @backstage/core-plugin-api@1.9.1 + - @backstage/catalog-model@1.4.5 + - @backstage/theme@0.5.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.1 + +### Patch Changes + +- 930b5c1: Added 'root' and 'label' class key to TemplateCategoryPicker +- 6d649d2: Updated dependency `flatted` to `3.3.1`. +- 0cecb09: Updated dependency `@rjsf/utils` to `5.17.1`. + Updated dependency `@rjsf/core` to `5.17.1`. + Updated dependency `@rjsf/material-ui` to `5.17.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.1`. +- Updated dependencies + - @backstage/core-components@0.14.1 + - @backstage/theme@0.5.2 + - @backstage/plugin-catalog-react@1.11.0 + - @backstage/catalog-client@1.6.1 + - @backstage/catalog-model@1.4.5 + - @backstage/core-plugin-api@1.9.1 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1 + +## 1.8.1-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.1-next.2 + - @backstage/plugin-catalog-react@1.11.0-next.2 + - @backstage/catalog-client@1.6.1-next.1 + - @backstage/catalog-model@1.4.5-next.0 + - @backstage/core-plugin-api@1.9.1-next.1 + - @backstage/theme@0.5.2-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1-next.1 + +## 1.8.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.14.1-next.1 + - @backstage/plugin-catalog-react@1.10.1-next.1 + - @backstage/core-plugin-api@1.9.1-next.1 + - @backstage/catalog-client@1.6.1-next.0 + - @backstage/catalog-model@1.4.5-next.0 + - @backstage/theme@0.5.2-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1-next.1 + +## 1.8.1-next.0 + +### Patch Changes + +- 930b5c1: Added 'root' and 'label' class key to TemplateCategoryPicker +- 6d649d2: Updated dependency `flatted` to `3.3.1`. +- 0cecb09: Updated dependency `@rjsf/utils` to `5.17.1`. + Updated dependency `@rjsf/core` to `5.17.1`. + Updated dependency `@rjsf/material-ui` to `5.17.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.1`. +- Updated dependencies + - @backstage/theme@0.5.2-next.0 + - @backstage/core-components@0.14.1-next.0 + - @backstage/plugin-catalog-react@1.10.1-next.0 + - @backstage/catalog-client@1.6.1-next.0 + - @backstage/catalog-model@1.4.5-next.0 + - @backstage/core-plugin-api@1.9.1-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.1-next.0 + +## 1.8.0 + +### Minor Changes + +- c56f1a2: Remove the old legacy exports from `/alpha` +- 11b9a08: Introduced the first version of recoverable tasks. +- b07ec70: Use more distinguishable icons for link (`Link`) and text output (`Description`). + +### Patch Changes + +- 3f60ad5: fix for: converting circular structure to JSON error +- 0b0c6b6: Allow defining default output text to be shown +- 8fe56a8: Widen `@types/react` dependency range to include version 18. +- 31f0a0a: Added `ScaffolderPageContextMenu` to `ActionsPage`, `ListTaskPage`, and `TemplateEditorPage` so that you can more easily navigate between these pages +- 09cedb9: Updated dependency `@react-hookz/web` to `^24.0.0`. +- e6f0831: Updated dependency `@rjsf/utils` to `5.17.0`. + Updated dependency `@rjsf/core` to `5.17.0`. + Updated dependency `@rjsf/material-ui` to `5.17.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.0`. +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- 3dff4b0: Remove unused deps +- 82affc7: Fix issue where `ui:schema` was replaced with an empty object if `dependencies` is defined +- 2985186: Fix bug that erroneously caused a separator or a 0 to render in the TemplateCard for Templates with empty links +- Updated dependencies + - @backstage/plugin-catalog-react@1.10.0 + - @backstage/core-components@0.14.0 + - @backstage/catalog-model@1.4.4 + - @backstage/theme@0.5.1 + - @backstage/core-plugin-api@1.9.0 + - @backstage/catalog-client@1.6.0 + - @backstage/plugin-scaffolder-common@1.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## 1.8.0-next.3 + +### Patch Changes + +- 09cedb9: Updated dependency `@react-hookz/web` to `^24.0.0`. +- e6f0831: Updated dependency `@rjsf/utils` to `5.17.0`. + Updated dependency `@rjsf/core` to `5.17.0`. + Updated dependency `@rjsf/material-ui` to `5.17.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.17.0`. +- Updated dependencies + - @backstage/theme@0.5.1-next.1 + - @backstage/core-components@0.14.0-next.2 + - @backstage/plugin-catalog-react@1.10.0-next.3 + - @backstage/catalog-client@1.6.0-next.1 + - @backstage/catalog-model@1.4.4-next.0 + - @backstage/core-plugin-api@1.9.0-next.1 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.0-next.1 + +## 1.8.0-next.2 + +### Patch Changes + +- 8fe56a8: Widen `@types/react` dependency range to include version 18. +- 2985186: Fix bug that erroneously caused a separator or a 0 to render in the TemplateCard for Templates with empty links +- Updated dependencies + - @backstage/core-components@0.14.0-next.1 + - @backstage/core-plugin-api@1.9.0-next.1 + - @backstage/plugin-catalog-react@1.10.0-next.2 + - @backstage/theme@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.1 + - @backstage/catalog-model@1.4.4-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.0-next.1 + +## 1.8.0-next.1 + +### Minor Changes + +- b07ec70: Use more distinguishable icons for link (`Link`) and text output (`Description`). + +### Patch Changes + +- 3f60ad5: fix for: converting circular structure to JSON error +- 31f0a0a: Added `ScaffolderPageContextMenu` to `ActionsPage`, `ListTaskPage`, and `TemplateEditorPage` so that you can more easily navigate between these pages +- 82affc7: Fix issue where `ui:schema` was replaced with an empty object if `dependencies` is defined +- Updated dependencies + - @backstage/core-components@0.14.0-next.0 + - @backstage/catalog-model@1.4.4-next.0 + - @backstage/catalog-client@1.6.0-next.1 + - @backstage/core-plugin-api@1.8.3-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.1 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.5.0-next.1 + +## 1.8.0-next.0 + +### Minor Changes + +- c56f1a2: Remove the old legacy exports from `/alpha` +- 11b9a08: Introduced the first version of recoverable tasks. + +### Patch Changes + +- 0b0c6b6: Allow defining default output text to be shown +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## 1.7.1 + +### Patch Changes + +- c28f281: Scaffolder form now shows a list of errors at the top of the form. +- 0b9ce2b: Fix for a step with no properties +- 98ac5ab: Updated dependency `@rjsf/utils` to `5.15.1`. + Updated dependency `@rjsf/core` to `5.15.1`. + Updated dependency `@rjsf/material-ui` to `5.15.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.1`. +- 4016f21: Remove some unused dependencies +- d16f85f: Show first scaffolder output text by default +- Updated dependencies + - @backstage/core-components@0.13.10 + - @backstage/plugin-scaffolder-common@1.4.5 + - @backstage/core-plugin-api@1.8.2 + - @backstage/catalog-client@1.5.2 + - @backstage/plugin-catalog-react@1.9.3 + - @backstage/catalog-model@1.4.3 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## 1.7.1-next.2 + +### Patch Changes + +- 98ac5ab: Updated dependency `@rjsf/utils` to `5.15.1`. + Updated dependency `@rjsf/core` to `5.15.1`. + Updated dependency `@rjsf/material-ui` to `5.15.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.1`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.3-next.2 + +## 1.7.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.8.2-next.0 + - @backstage/core-components@0.13.10-next.1 + - @backstage/plugin-catalog-react@1.9.3-next.1 + - @backstage/catalog-client@1.5.2-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.4 + +## 1.7.1-next.0 + +### Patch Changes + +- c28f281: Scaffolder form now shows a list of errors at the top of the form. +- 4016f21: Remove some unused dependencies +- Updated dependencies + - @backstage/core-components@0.13.10-next.0 + - @backstage/catalog-client@1.5.2-next.0 + - @backstage/plugin-catalog-react@1.9.3-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.1 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.4 + +## 1.7.0 + +### Minor Changes + +- 33edf50: Added support for dealing with user provided secrets using a new field extension `ui:field: Secret` + +### Patch Changes + +- 670c7cc: Fix bug where `properties` is set to empty object when it should be empty for schema dependencies +- fa66d1b: Fixed bug in `ReviewState` where `enum` value was displayed in step review instead of the corresponding label when using `enumNames` +- e516bf4: Step titles in the Stepper are now clickable and redirect the user to the corresponding step, as an alternative to using the back buttons. +- aaa6fb3: Minor updates for TypeScript 5.2.2+ compatibility +- 2aee53b: Add horizontal slider if stepper overflows +- 2b72591: Updated dependency `@rjsf/utils` to `5.14.3`. + Updated dependency `@rjsf/core` to `5.14.3`. + Updated dependency `@rjsf/material-ui` to `5.14.3`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.3`. +- 6cd12f2: Updated dependency `@rjsf/utils` to `5.14.1`. + Updated dependency `@rjsf/core` to `5.14.1`. + Updated dependency `@rjsf/material-ui` to `5.14.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.1`. +- a518c5a: Updated dependency `@react-hookz/web` to `^23.0.0`. +- 64301d3: Updated dependency `@rjsf/utils` to `5.15.0`. + Updated dependency `@rjsf/core` to `5.15.0`. + Updated dependency `@rjsf/material-ui` to `5.15.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.0`. +- 63c494e: Updated dependency `@rjsf/utils` to `5.14.2`. + Updated dependency `@rjsf/core` to `5.14.2`. + Updated dependency `@rjsf/material-ui` to `5.14.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.2`. +- c8908d4: Use new option from RJSF 5.15 +- 0cbb03b: Fixing regular expression ReDoS with zod packages. Upgrading to latest. ref: https://security.snyk.io/vuln/SNYK-JS-ZOD-5925617 +- 5bb5240: Fixed issue for showing undefined for hidden form items +- Updated dependencies + - @backstage/core-plugin-api@1.8.1 + - @backstage/plugin-catalog-react@1.9.2 + - @backstage/core-components@0.13.9 + - @backstage/theme@0.5.0 + - @backstage/catalog-client@1.5.0 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.4 + +## 1.6.2-next.3 + +### Patch Changes + +- 64301d3: Updated dependency `@rjsf/utils` to `5.15.0`. + Updated dependency `@rjsf/core` to `5.15.0`. + Updated dependency `@rjsf/material-ui` to `5.15.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.15.0`. +- c8908d4: Use new option from RJSF 5.15 +- Updated dependencies + - @backstage/core-components@0.13.9-next.3 + - @backstage/catalog-client@1.5.0-next.1 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.1-next.1 + - @backstage/errors@1.2.3 + - @backstage/theme@0.5.0-next.1 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-catalog-react@1.9.2-next.3 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.2-next.2 + +### Patch Changes + +- 5bb5240: Fixed issue for showing undefined for hidden form items +- Updated dependencies + - @backstage/theme@0.5.0-next.1 + - @backstage/plugin-catalog-react@1.9.2-next.2 + - @backstage/catalog-client@1.5.0-next.1 + - @backstage/catalog-model@1.4.3 + - @backstage/core-components@0.13.9-next.2 + - @backstage/core-plugin-api@1.8.1-next.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.2-next.1 + +### Patch Changes + +- fa66d1b5b3: Fixed bug in `ReviewState` where `enum` value was displayed in step review instead of the corresponding label when using `enumNames` +- 2aee53bbeb: Add horizontal slider if stepper overflows +- 2b725913c1: Updated dependency `@rjsf/utils` to `5.14.3`. + Updated dependency `@rjsf/core` to `5.14.3`. + Updated dependency `@rjsf/material-ui` to `5.14.3`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.3`. +- a518c5a25b: Updated dependency `@react-hookz/web` to `^23.0.0`. +- Updated dependencies + - @backstage/core-components@0.13.9-next.1 + - @backstage/core-plugin-api@1.8.1-next.1 + - @backstage/plugin-catalog-react@1.9.2-next.1 + - @backstage/catalog-client@1.5.0-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/theme@0.5.0-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.2-next.0 + +### Patch Changes + +- e516bf4da8: Step titles in the Stepper are now clickable and redirect the user to the corresponding step, as an alternative to using the back buttons. +- aaa6fb3bc9: Minor updates for TypeScript 5.2.2+ compatibility +- 6cd12f277b: Updated dependency `@rjsf/utils` to `5.14.1`. + Updated dependency `@rjsf/core` to `5.14.1`. + Updated dependency `@rjsf/material-ui` to `5.14.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.1`. +- 63c494ef22: Updated dependency `@rjsf/utils` to `5.14.2`. + Updated dependency `@rjsf/core` to `5.14.2`. + Updated dependency `@rjsf/material-ui` to `5.14.2`. + Updated dependency `@rjsf/validator-ajv8` to `5.14.2`. +- Updated dependencies + - @backstage/core-plugin-api@1.8.1-next.0 + - @backstage/plugin-catalog-react@1.9.2-next.0 + - @backstage/core-components@0.13.9-next.0 + - @backstage/theme@0.5.0-next.0 + - @backstage/catalog-client@1.4.6 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-scaffolder-common@1.4.3 + +## 1.6.0 + +### Minor Changes + +- 3fdffbb699: Release design improvements for the `Scaffolder` plugin and support v5 of `@rjsf/*` libraries. + + This change should be non-breaking. If you're seeing typescript issues after migrating please [open an issue](https://github.com/backstage/backstage/issues/new/choose) + + The `next` versions like `createNextFieldExtension` and `NextScaffolderPage` have been promoted to the public interface under `createScaffolderFieldExtension` and `ScaffolderPage`, so any older imports which are no longer found will need updating from `@backstage/plugin-scaffolder/alpha` or `@backstage/plugin-scaffolder-react/alpha` will need to be imported from `@backstage/plugin-scaffolder` and `@backstage/plugin-scaffolder-react` respectively. + + The legacy versions are now available in `/alpha` under `createLegacyFieldExtension` and `LegacyScaffolderPage` if you're running into issues, but be aware that these will be removed in a next mainline release. + +### Patch Changes + +- 6c2b872153: Add official support for React 18. +- 171a99816b: Fixed `backstage:featureFlag` in `scaffolder/next` by sorting out `manifest.steps`. +- c838da0edd: Updated dependency `@rjsf/utils` to `5.13.6`. + Updated dependency `@rjsf/core` to `5.13.6`. + Updated dependency `@rjsf/material-ui` to `5.13.6`. + Updated dependency `@rjsf/validator-ajv8` to `5.13.6`. +- 69c14904b6: Use `EntityRefLinks` with `hideIcons` property to avoid double icons +- 62b5922916: Internal theme type updates +- dda56ae265: Preserve step's time execution for a non-running task. +- 76d07da66a: Make it possible to define control buttons text (Back, Create, Review) per template +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.0 + - @backstage/core-components@0.13.8 + - @backstage/plugin-scaffolder-common@1.4.3 + - @backstage/core-plugin-api@1.8.0 + - @backstage/version-bridge@1.0.7 + - @backstage/theme@0.4.4 + - @backstage/catalog-client@1.4.6 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## 1.6.0-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.8-next.2 + - @backstage/plugin-catalog-react@1.9.0-next.2 + +## 1.6.0-next.1 + +### Patch Changes + +- 62b5922916: Internal theme type updates +- 76d07da66a: Make it possible to define control buttons text (Back, Create, Review) per template +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.0-next.1 + - @backstage/plugin-scaffolder-common@1.4.3-next.1 + - @backstage/core-components@0.13.8-next.1 + - @backstage/catalog-client@1.4.5 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.0-next.0 + - @backstage/errors@1.2.3 + - @backstage/theme@0.4.4-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7-next.0 + +## 1.6.0-next.0 + +### Minor Changes + +- 3fdffbb699: Release design improvements for the `Scaffolder` plugin and support v5 of `@rjsf/*` libraries. + + This change should be non-breaking. If you're seeing typescript issues after migrating please [open an issue](https://github.com/backstage/backstage/issues/new/choose) + + The `next` versions like `createNextFieldExtension` and `NextScaffolderPage` have been promoted to the public interface under `createScaffolderFieldExtension` and `ScaffolderPage`, so any older imports which are no longer found will need updating from `@backstage/plugin-scaffolder/alpha` or `@backstage/plugin-scaffolder-react/alpha` will need to be imported from `@backstage/plugin-scaffolder` and `@backstage/plugin-scaffolder-react` respectively. + + The legacy versions are now available in `/alpha` under `createLegacyFieldExtension` and `LegacyScaffolderPage` if you're running into issues, but be aware that these will be removed in a next mainline release. + +### Patch Changes + +- 6c2b872153: Add official support for React 18. +- Updated dependencies + - @backstage/core-components@0.13.7-next.0 + - @backstage/plugin-scaffolder-common@1.4.3-next.0 + - @backstage/plugin-catalog-react@1.9.0-next.0 + - @backstage/core-plugin-api@1.8.0-next.0 + - @backstage/version-bridge@1.0.7-next.0 + - @backstage/theme@0.4.4-next.0 + - @backstage/catalog-client@1.4.5 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## 1.5.6 + +### Patch Changes + +- 9a1fce352e: Updated dependency `@testing-library/jest-dom` to `^6.0.0`. +- f95af4e540: Updated dependency `@testing-library/dom` to `^9.0.0`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.5 + - @backstage/core-plugin-api@1.7.0 + - @backstage/core-components@0.13.6 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/version-bridge@1.0.6 + - @backstage/theme@0.4.3 + - @backstage/catalog-client@1.4.5 + - @backstage/types@1.1.1 + - @backstage/plugin-scaffolder-common@1.4.2 + +## 1.5.6-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.6-next.2 + - @backstage/core-plugin-api@1.7.0-next.1 + - @backstage/catalog-model@1.4.3-next.0 + - @backstage/plugin-catalog-react@1.8.5-next.2 + - @backstage/errors@1.2.3-next.0 + - @backstage/theme@0.4.3-next.0 + - @backstage/catalog-client@1.4.5-next.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + - @backstage/plugin-scaffolder-common@1.4.2-next.0 + +## 1.5.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.6-next.1 + - @backstage/plugin-catalog-react@1.8.5-next.1 + - @backstage/core-plugin-api@1.7.0-next.0 + - @backstage/catalog-client@1.4.4 + - @backstage/catalog-model@1.4.2 + - @backstage/errors@1.2.2 + - @backstage/theme@0.4.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + - @backstage/plugin-scaffolder-common@1.4.1 + +## 1.5.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.5-next.0 + - @backstage/core-plugin-api@1.7.0-next.0 + - @backstage/core-components@0.13.6-next.0 + - @backstage/catalog-client@1.4.4 + - @backstage/catalog-model@1.4.2 + - @backstage/errors@1.2.2 + - @backstage/theme@0.4.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + - @backstage/plugin-scaffolder-common@1.4.1 + +## 1.5.5 + +### Patch Changes + +- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds. +- b16c341ced45: Updated dependency `@rjsf/utils` to `5.13.0`. + Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.13.0`. + Updated dependency `@rjsf/material-ui-v5` to `npm:@rjsf/material-ui@5.13.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.13.0`. +- 27fef07f9229: Updated dependency `use-immer` to `^0.9.0`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.4 + - @backstage/core-components@0.13.5 + - @backstage/catalog-client@1.4.4 + - @backstage/catalog-model@1.4.2 + - @backstage/core-plugin-api@1.6.0 + - @backstage/errors@1.2.2 + - @backstage/plugin-scaffolder-common@1.4.1 + - @backstage/theme@0.4.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.5 + +## 1.5.5-next.3 + +### Patch Changes + +- 406b786a2a2c: Mark package as being free of side effects, allowing more optimized Webpack builds. +- b16c341ced45: Updated dependency `@rjsf/utils` to `5.13.0`. + Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.13.0`. + Updated dependency `@rjsf/material-ui-v5` to `npm:@rjsf/material-ui@5.13.0`. + Updated dependency `@rjsf/validator-ajv8` to `5.13.0`. +- Updated dependencies + - @backstage/catalog-client@1.4.4-next.2 + - @backstage/catalog-model@1.4.2-next.2 + - @backstage/core-components@0.13.5-next.3 + - @backstage/core-plugin-api@1.6.0-next.3 + - @backstage/errors@1.2.2-next.0 + - @backstage/plugin-catalog-react@1.8.4-next.3 + - @backstage/plugin-scaffolder-common@1.4.1-next.2 + - @backstage/theme@0.4.2-next.0 + - @backstage/types@1.1.1-next.0 + - @backstage/version-bridge@1.0.5-next.0 + +## 1.5.5-next.2 + +### Patch Changes + +- 27fef07f9229: Updated dependency `use-immer` to `^0.9.0`. +- Updated dependencies + - @backstage/core-components@0.13.5-next.2 + - @backstage/core-plugin-api@1.6.0-next.2 + - @backstage/plugin-catalog-react@1.8.4-next.2 + - @backstage/catalog-model@1.4.2-next.1 + - @backstage/catalog-client@1.4.4-next.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.4.1-next.1 + +## 1.5.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.4-next.1 + - @backstage/core-components@0.13.5-next.1 + - @backstage/catalog-model@1.4.2-next.0 + - @backstage/core-plugin-api@1.6.0-next.1 + - @backstage/catalog-client@1.4.4-next.0 + - @backstage/plugin-scaffolder-common@1.4.1-next.0 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + +## 1.5.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.6.0-next.0 + - @backstage/core-components@0.13.5-next.0 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-catalog-react@1.8.3-next.0 + - @backstage/plugin-scaffolder-common@1.4.0 + +## 1.5.2 + +### Patch Changes + +- ba9ee98a37bd: Fixed bug in Workflow component by passing a prop `templateName` down to Stepper component. +- Updated dependencies + - @backstage/core-components@0.13.4 + - @backstage/plugin-catalog-react@1.8.1 + - @backstage/plugin-scaffolder-common@1.4.0 + - @backstage/core-plugin-api@1.5.3 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + +## 1.5.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.1-next.1 + +## 1.5.2-next.0 + +### Patch Changes + +- ba9ee98a37bd: Fixed bug in Workflow component by passing a prop `templateName` down to Stepper component. +- Updated dependencies + - @backstage/core-components@0.13.4-next.0 + - @backstage/core-plugin-api@1.5.3 + - @backstage/plugin-catalog-react@1.8.1-next.0 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/errors@1.2.1 + - @backstage/theme@0.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.2 + +## 1.5.1 + +### Patch Changes + +- f74a27de4d2c: Made markdown description theme-able +- Updated dependencies + - @backstage/theme@0.4.1 + - @backstage/errors@1.2.1 + - @backstage/plugin-catalog-react@1.8.0 + - @backstage/core-components@0.13.3 + - @backstage/core-plugin-api@1.5.3 + - @backstage/catalog-client@1.4.3 + - @backstage/catalog-model@1.4.1 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.2 + +## 1.5.1-next.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.8.0-next.2 + - @backstage/theme@0.4.1-next.1 + - @backstage/core-plugin-api@1.5.3-next.1 + - @backstage/core-components@0.13.3-next.2 + - @backstage/catalog-client@1.4.3-next.0 + - @backstage/catalog-model@1.4.1-next.0 + - @backstage/errors@1.2.1-next.0 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.2-next.0 + +## 1.5.1-next.1 + +### Patch Changes + +- f74a27de4d2c: Made markdown description theme-able +- Updated dependencies + - @backstage/theme@0.4.1-next.0 + - @backstage/core-components@0.13.3-next.1 + - @backstage/core-plugin-api@1.5.3-next.0 + - @backstage/plugin-catalog-react@1.7.1-next.1 + +## 1.5.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/errors@1.2.1-next.0 + - @backstage/core-components@0.13.3-next.0 + - @backstage/catalog-client@1.4.3-next.0 + - @backstage/catalog-model@1.4.1-next.0 + - @backstage/core-plugin-api@1.5.2 + - @backstage/theme@0.4.0 + - @backstage/types@1.1.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-catalog-react@1.7.1-next.0 + - @backstage/plugin-scaffolder-common@1.3.2-next.0 + +## 1.5.0 + +### Minor Changes + +- 6b571405f806: `scaffolder/next`: Provide some default template components to `rjsf` to allow for standardization and markdown descriptions +- 4505dc3b4598: `scaffolder/next`: Don't render `TemplateGroups` when there's no results in with search query +- a452bda74d7a: Fixed typescript casting bug for useTemplateParameterSchema hook +- 6b571405f806: `scaffolder/next`: provide a `ScaffolderField` component which is meant to replace some of the `FormControl` components from Material UI, making it easier to write `FieldExtensions`. + +### Patch Changes + +- 84a5c7724c7e: fixed refresh problem when backstage backend disconnects without any feedback to user. Now we send a generic message and try to reconnect after 15 seconds +- cf34311cdbe1: Extract `ui:*` fields from conditional `then` and `else` schema branches. +- 2ff94da135a4: bump `rjsf` dependencies to 5.7.3 +- 74b216ee4e50: Add `PropsWithChildren` to usages of `ComponentType`, in preparation for React 18 where the children are no longer implicit. +- Updated dependencies + - @backstage/core-plugin-api@1.5.2 + - @backstage/catalog-client@1.4.2 + - @backstage/core-components@0.13.2 + - @backstage/types@1.1.0 + - @backstage/theme@0.4.0 + - @backstage/plugin-catalog-react@1.7.0 + - @backstage/catalog-model@1.4.0 + - @backstage/errors@1.2.0 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.1 + +## 1.5.0-next.3 + +### Minor Changes + +- a452bda74d7a: Fixed typescript casting bug for useTemplateParameterSchema hook + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.2-next.3 + - @backstage/catalog-model@1.4.0-next.1 + - @backstage/catalog-client@1.4.2-next.2 + - @backstage/core-plugin-api@1.5.2-next.0 + - @backstage/errors@1.2.0-next.0 + - @backstage/theme@0.4.0-next.1 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-catalog-react@1.7.0-next.3 + - @backstage/plugin-scaffolder-common@1.3.1-next.1 + +## 1.5.0-next.2 + +### Patch Changes + +- cf34311cdbe1: Extract `ui:*` fields from conditional `then` and `else` schema branches. +- 2ff94da135a4: bump `rjsf` dependencies to 5.7.3 +- Updated dependencies + - @backstage/theme@0.4.0-next.1 + - @backstage/plugin-catalog-react@1.7.0-next.2 + - @backstage/core-components@0.13.2-next.2 + - @backstage/core-plugin-api@1.5.2-next.0 + +## 1.5.0-next.1 + +### Minor Changes + +- 6b571405f806: `scaffolder/next`: Provide some default template components to `rjsf` to allow for standardization and markdown descriptions +- 4505dc3b4598: `scaffolder/next`: Don't render `TemplateGroups` when there's no results in with search query +- 6b571405f806: `scaffolder/next`: provide a `ScaffolderField` component which is meant to replace some of the `FormControl` components from Material UI, making it easier to write `FieldExtensions`. + +### Patch Changes + +- 74b216ee4e50: Add `PropsWithChildren` to usages of `ComponentType`, in preparation for React 18 where the children are no longer implicit. +- Updated dependencies + - @backstage/errors@1.2.0-next.0 + - @backstage/core-components@0.13.2-next.1 + - @backstage/plugin-catalog-react@1.7.0-next.1 + - @backstage/catalog-model@1.4.0-next.0 + - @backstage/core-plugin-api@1.5.2-next.0 + - @backstage/catalog-client@1.4.2-next.1 + - @backstage/plugin-scaffolder-common@1.3.1-next.0 + - @backstage/theme@0.4.0-next.0 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + +## 1.4.1-next.0 + +### Patch Changes + +- 84a5c7724c7e: fixed refresh problem when backstage backend disconnects without any feedback to user. Now we send a generic message and try to reconnect after 15 seconds +- Updated dependencies + - @backstage/catalog-client@1.4.2-next.0 + - @backstage/plugin-catalog-react@1.7.0-next.0 + - @backstage/theme@0.4.0-next.0 + - @backstage/core-components@0.13.2-next.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/catalog-model@1.3.0 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.3.0 + +## 1.4.0 + +### Minor Changes + +- 82e10a6939c: Add support for Markdown text blob outputs from templates + +### Patch Changes + +- ad1a1429de4: Improvements to the `scaffolder/next` buttons UX: + + - Added padding around the "Create" button in the `Stepper` component + - Added a button bar that includes the "Cancel" and "Start Over" buttons to the `OngoingTask` component. The state of these buttons match their existing counter parts in the Context Menu + - Added a "Show Button Bar"/"Hide Button Bar" item to the `ContextMenu` component + +- Updated dependencies + - @backstage/theme@0.3.0 + - @backstage/plugin-catalog-react@1.6.0 + - @backstage/plugin-scaffolder-common@1.3.0 + - @backstage/core-components@0.13.1 + - @backstage/catalog-client@1.4.1 + - @backstage/catalog-model@1.3.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + +## 1.4.0-next.2 + +### Minor Changes + +- 82e10a6939c: Add support for Markdown text blob outputs from templates + +### Patch Changes + +- Updated dependencies + - @backstage/theme@0.3.0-next.0 + - @backstage/plugin-scaffolder-common@1.3.0-next.0 + - @backstage/core-components@0.13.1-next.1 + - @backstage/plugin-catalog-react@1.6.0-next.2 + - @backstage/core-plugin-api@1.5.1 + +## 1.3.1-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.13.1-next.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/plugin-catalog-react@1.6.0-next.1 + +## 1.3.1-next.0 + +### Patch Changes + +- ad1a1429de4: Improvements to the `scaffolder/next` buttons UX: + + - Added padding around the "Create" button in the `Stepper` component + - Added a button bar that includes the "Cancel" and "Start Over" buttons to the `OngoingTask` component. The state of these buttons match their existing counter parts in the Context Menu + - Added a "Show Button Bar"/"Hide Button Bar" item to the `ContextMenu` component + +- Updated dependencies + - @backstage/plugin-catalog-react@1.6.0-next.0 + - @backstage/core-components@0.13.0 + - @backstage/core-plugin-api@1.5.1 + - @backstage/catalog-client@1.4.1 + - @backstage/catalog-model@1.3.0 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.19 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4 + - @backstage/plugin-scaffolder-common@1.2.7 + +## 1.3.0 + +### Minor Changes + +- 259d3407b9b: Move `CategoryPicker` from `scaffolder` into `scaffolder-react` + Move `ContextMenu` into `scaffolder-react` and rename it to `ScaffolderPageContextMenu` +- 2cfd03d7376: To offer better customization options, `ScaffolderPageContextMenu` takes callbacks as props instead of booleans +- 48da4c46e45: `scaffolder/next`: Export the `TemplateGroupFilter` and `TemplateGroups` and make an extensible component + +### Patch Changes + +- 7e1d900413a: `scaffolder/next`: Bump `@rjsf/*` dependencies to 5.5.2 +- e27ddc36dad: Added a possibility to cancel the running task (executing of a scaffolder template) +- 0435174b06f: Accessibility issues identified using lighthouse fixed. +- 7a6b16cc506: `scaffolder/next`: Bump `@rjsf/*` deps to 5.3.1 +- 90dda42cfd2: bug: Invert `templateFilter` predicate to align with `Array.filter` +- d2488f5e54c: Add an indication that the validators are running when clicking `next` on each step of the form. +- 1e4f5e91b8e: Bump `zod` and `zod-to-json-schema` dependencies. +- 8c40997df44: Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.5.2`. +- f84fc7fd040: Updated dependency `@rjsf/validator-ajv8` to `5.3.0`. +- 8e00acb28db: Small tweaks to remove warnings in the console during development (mainly focusing on techdocs) +- 34dab7ee7f8: `scaffolder/next`: bump `rjsf` dependencies to `5.5.0` +- 2898b6c8d52: Minor type tweaks for TypeScript 5.0 +- e0c6e8b9c3c: Update peer dependencies +- cf71c3744a5: scaffolder/next: Bump `@rjsf/*` dependencies to 5.6.0 +- Updated dependencies + - @backstage/core-components@0.13.0 + - @backstage/plugin-scaffolder-common@1.2.7 + - @backstage/catalog-client@1.4.1 + - @backstage/plugin-catalog-react@1.5.0 + - @backstage/theme@0.2.19 + - @backstage/core-plugin-api@1.5.1 + - @backstage/catalog-model@1.3.0 + - @backstage/version-bridge@1.0.4 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + +## 1.3.0-next.3 + +### Patch Changes + +- d2488f5e54c: Add indication that the validators are running +- 8c40997df44: Updated dependency `@rjsf/core-v5` to `npm:@rjsf/core@5.5.2`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.5.0-next.3 + - @backstage/catalog-model@1.3.0-next.0 + - @backstage/core-components@0.13.0-next.3 + - @backstage/catalog-client@1.4.1-next.1 + - @backstage/core-plugin-api@1.5.1-next.1 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.19-next.0 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4-next.0 + - @backstage/plugin-scaffolder-common@1.2.7-next.2 + +## 1.3.0-next.2 + +### Patch Changes + +- 90dda42cfd2: bug: Invert `templateFilter` predicate to align with `Array.filter` +- 34dab7ee7f8: `scaffolder/next`: bump `rjsf` dependencies to `5.5.0` +- 2898b6c8d52: Minor type tweaks for TypeScript 5.0 +- Updated dependencies + - @backstage/catalog-client@1.4.1-next.0 + - @backstage/core-components@0.12.6-next.2 + - @backstage/plugin-catalog-react@1.4.1-next.2 + - @backstage/core-plugin-api@1.5.1-next.1 + - @backstage/catalog-model@1.2.1 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.19-next.0 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.4-next.0 + - @backstage/plugin-scaffolder-common@1.2.7-next.1 + +## 1.3.0-next.1 + +### Patch Changes + +- 1e4f5e91b8e: Bump `zod` and `zod-to-json-schema` dependencies. +- e0c6e8b9c3c: Update peer dependencies +- Updated dependencies + - @backstage/core-components@0.12.6-next.1 + - @backstage/plugin-scaffolder-common@1.2.7-next.1 + - @backstage/core-plugin-api@1.5.1-next.0 + - @backstage/version-bridge@1.0.4-next.0 + - @backstage/plugin-catalog-react@1.4.1-next.1 + - @backstage/theme@0.2.19-next.0 + - @backstage/catalog-client@1.4.0 + - @backstage/catalog-model@1.2.1 + - @backstage/errors@1.1.5 + - @backstage/types@1.0.2 + +## 1.3.0-next.0 + +### Minor Changes + +- 259d3407b9b: Move `CategoryPicker` from `scaffolder` into `scaffolder-react` + Move `ContextMenu` into `scaffolder-react` and rename it to `ScaffolderPageContextMenu` +- 2cfd03d7376: To offer better customization options, `ScaffolderPageContextMenu` takes callbacks as props instead of booleans +- 48da4c46e45: `scaffolder/next`: Export the `TemplateGroupFilter` and `TemplateGroups` and make an extensible component + +### Patch Changes + +- e27ddc36dad: Added a possibility to cancel the running task (executing of a scaffolder template) +- 7a6b16cc506: `scaffolder/next`: Bump `@rjsf/*` deps to 5.3.1 +- f84fc7fd040: Updated dependency `@rjsf/validator-ajv8` to `5.3.0`. +- 8e00acb28db: Small tweaks to remove warnings in the console during development (mainly focusing on techdocs) +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.2.7-next.0 + - @backstage/core-components@0.12.6-next.0 + - @backstage/plugin-catalog-react@1.4.1-next.0 + - @backstage/core-plugin-api@1.5.0 + - @backstage/catalog-client@1.4.0 + - @backstage/catalog-model@1.2.1 + - @backstage/errors@1.1.5 + - @backstage/theme@0.2.18 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + +## 1.2.0 + +### Minor Changes + +- 8f4d13f21cf: Move `useTaskStream`, `TaskBorder`, `TaskLogStream` and `TaskSteps` into `scaffolder-react`. + +### Patch Changes + +- 65454876fb2: Minor API report tweaks +- 3c96e77b513: Make scaffolder adhere to page themes by using page `fontColor` consistently. If your theme overwrites template list or card headers, review those styles. +- c8d78b9ae9d: fix bug with `hasErrors` returning false when dealing with empty objects +- 9b8c374ace5: Remove timer for skipped steps in Scaffolder Next's TaskSteps +- 44941fc97eb: scaffolder/next: Move the `uiSchema` to its own property in the validation `context` to align with component development and access of `ui:options` +- d9893263ba9: scaffolder/next: Fix for steps without properties +- 928a12a9b3e: Internal refactor of `/alpha` exports. +- cc418d652a7: scaffolder/next: Added the ability to get the fields definition in the schema in the validation function +- d4100d0ec42: Fix alignment bug for owners on `TemplateCard` +- Updated dependencies + - @backstage/catalog-client@1.4.0 + - @backstage/core-components@0.12.5 + - @backstage/plugin-catalog-react@1.4.0 + - @backstage/errors@1.1.5 + - @backstage/core-plugin-api@1.5.0 + - @backstage/catalog-model@1.2.1 + - @backstage/theme@0.2.18 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.6 + +## 1.2.0-next.2 + +### Patch Changes + +- 65454876fb2: Minor API report tweaks +- 3c96e77b513: Make scaffolder adhere to page themes by using page `fontColor` consistently. If your theme overwrites template list or card headers, review those styles. +- d9893263ba9: scaffolder/next: Fix for steps without properties +- Updated dependencies + - @backstage/core-components@0.12.5-next.2 + - @backstage/plugin-catalog-react@1.4.0-next.2 + - @backstage/core-plugin-api@1.5.0-next.2 + +## 1.2.0-next.1 + +### Minor Changes + +- 8f4d13f21cf: Move `useTaskStream`, `TaskBorder`, `TaskLogStream` and `TaskSteps` into `scaffolder-react`. + +### Patch Changes + +- 44941fc97eb: scaffolder/next: Move the `uiSchema` to its own property in the validation `context` to align with component development and access of `ui:options` +- Updated dependencies + - @backstage/core-components@0.12.5-next.1 + - @backstage/errors@1.1.5-next.0 + - @backstage/catalog-client@1.4.0-next.1 + - @backstage/core-plugin-api@1.4.1-next.1 + - @backstage/theme@0.2.18-next.0 + - @backstage/plugin-catalog-react@1.4.0-next.1 + - @backstage/catalog-model@1.2.1-next.1 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.6-next.1 + +## 1.1.1-next.0 + +### Patch Changes + +- c8d78b9ae9: fix bug with `hasErrors` returning false when dealing with empty objects +- 928a12a9b3: Internal refactor of `/alpha` exports. +- cc418d652a: scaffolder/next: Added the ability to get the fields definition in the schema in the validation function +- d4100d0ec4: Fix alignment bug for owners on `TemplateCard` +- Updated dependencies + - @backstage/catalog-client@1.4.0-next.0 + - @backstage/plugin-catalog-react@1.4.0-next.0 + - @backstage/core-plugin-api@1.4.1-next.0 + - @backstage/catalog-model@1.2.1-next.0 + - @backstage/core-components@0.12.5-next.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.17 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.6-next.0 + +## 1.1.0 + +### Minor Changes + +- a07750745b: Added `DescriptionField` field override to the `next/scaffolder` +- a521379688: Migrating the `TemplateEditorPage` to work with the new components from `@backstage/plugin-scaffolder-react` +- 8c2966536b: Embed scaffolder workflow in other components +- 5555e17313: refactor `createAsyncValidators` to be recursive to ensure validators are called in nested schemas. + +### Patch Changes + +- 04f717a8e1: `scaffolder/next`: bump `react-jsonschema-form` libraries to `v5-stable` +- b46f385eff: scaffolder/next: Implementing a simple `OngoingTask` page +- cbab8ac107: lock versions of `@rjsf/*-beta` packages +- 346d6b6630: Upgrade `@rjsf` version 5 dependencies to `beta.18` +- ccbf91051b: bump `@rjsf` `v5` dependencies to 5.1.0 +- d2ddde2108: Add `ScaffolderLayouts` to `NextScaffolderPage` +- Updated dependencies + - @backstage/core-components@0.12.4 + - @backstage/catalog-model@1.2.0 + - @backstage/theme@0.2.17 + - @backstage/core-plugin-api@1.4.0 + - @backstage/plugin-catalog-react@1.3.0 + - @backstage/catalog-client@1.3.1 + - @backstage/errors@1.1.4 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.5 + +## 1.1.0-next.2 + +### Minor Changes + +- 5555e17313: refactor `createAsyncValidators` to be recursive to ensure validators are called in nested schemas. + +### Patch Changes + +- b46f385eff: scaffolder/next: Implementing a simple `OngoingTask` page +- ccbf91051b: bump `@rjsf` `v5` dependencies to 5.1.0 +- Updated dependencies + - @backstage/catalog-model@1.2.0-next.1 + - @backstage/core-components@0.12.4-next.1 + - @backstage/catalog-client@1.3.1-next.1 + - @backstage/core-plugin-api@1.3.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-catalog-react@1.3.0-next.2 + - @backstage/plugin-scaffolder-common@1.2.5-next.1 + +## 1.1.0-next.1 + +### Patch Changes + +- 04f717a8e1: `scaffolder/next`: bump `react-jsonschema-form` libraries to `v5-stable` +- 346d6b6630: Upgrade `@rjsf` version 5 dependencies to `beta.18` +- Updated dependencies + - @backstage/core-components@0.12.4-next.0 + - @backstage/plugin-catalog-react@1.3.0-next.1 + - @backstage/catalog-client@1.3.1-next.0 + - @backstage/catalog-model@1.1.6-next.0 + - @backstage/core-plugin-api@1.3.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.5-next.0 + +## 1.1.0-next.0 + +### Minor Changes + +- 8c2966536b: Embed scaffolder workflow in other components + +### Patch Changes + +- cbab8ac107: lock versions of `@rjsf/*-beta` packages +- d2ddde2108: Add `ScaffolderLayouts` to `NextScaffolderPage` +- Updated dependencies + - @backstage/plugin-catalog-react@1.3.0-next.0 + - @backstage/catalog-model@1.1.6-next.0 + - @backstage/catalog-client@1.3.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.5-next.0 + +## 1.0.0 + +### Major Changes + +- b4955ed7b9: Re-home some of the common types, components, hooks and `scaffolderApiRef` for the `@backstage/plugin-scaffolder` to this package for easy re-use across things that want to interact with the `scaffolder`. + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.5 + - @backstage/plugin-scaffolder-common@1.2.4 + - @backstage/catalog-client@1.3.0 + - @backstage/plugin-catalog-react@1.2.4 + - @backstage/core-components@0.12.3 + - @backstage/core-plugin-api@1.3.0 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + +## 1.0.0-next.0 + +### Major Changes + +- b4955ed7b9: Re-home some of the common types, components, hooks and `scaffolderApiRef` for the `@backstage/plugin-scaffolder` to this package for easy re-use across things that want to interact with the `scaffolder`. + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.3.0-next.1 + - @backstage/catalog-client@1.3.0-next.2 + - @backstage/plugin-catalog-react@1.2.4-next.2 + - @backstage/catalog-model@1.1.5-next.1 + - @backstage/core-components@0.12.3-next.2 + - @backstage/errors@1.1.4 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.2 + - @backstage/version-bridge@1.0.3 + - @backstage/plugin-scaffolder-common@1.2.4-next.1 + in the review step label +- bcec60f: updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + - @backstage/plugin-catalog-react@1.12.1-next.0 + ## 1.8.6-next.0 ### Patch Changes diff --git a/plugins/scaffolder-react/api-report.md b/plugins/scaffolder-react/api-report.md index 311f4116b3..850c30ced8 100644 --- a/plugins/scaffolder-react/api-report.md +++ b/plugins/scaffolder-react/api-report.md @@ -304,7 +304,7 @@ export interface ScaffolderRJSFFieldProps< disabled: boolean; errorSchema?: ErrorSchema; formContext?: F; - formData: T; + formData?: T; hideError?: boolean; idPrefix?: string; idSchema: IdSchema; diff --git a/plugins/scaffolder-react/package.json b/plugins/scaffolder-react/package.json index 0256f47d48..4460dfef50 100644 --- a/plugins/scaffolder-react/package.json +++ b/plugins/scaffolder-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-react", - "version": "1.8.6-next.0", + "version": "1.8.7-next.1", "description": "A frontend library that helps other Backstage plugins interact with the Scaffolder", "backstage": { "role": "web-library" diff --git a/plugins/scaffolder-react/src/extensions/rjsf.ts b/plugins/scaffolder-react/src/extensions/rjsf.ts index b81f06758f..b90caabdb0 100644 --- a/plugins/scaffolder-react/src/extensions/rjsf.ts +++ b/plugins/scaffolder-react/src/extensions/rjsf.ts @@ -64,7 +64,7 @@ export interface ScaffolderRJSFFieldProps< /** The tree of unique ids for every child field */ idSchema: IdSchema; /** The data for this field */ - formData: T; + formData?: T; /** The tree of errors for this field and its children */ errorSchema?: ErrorSchema; /** The field change event handler; called with the updated form data and an optional `ErrorSchema` */ diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index 120d239ea1..5ba2e05768 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-scaffolder +## 1.20.2-next.1 + +### Patch Changes + +- 75dcd7e: Fixing bug in `formData` type as it should be `optional` as it's possibly undefined +- bcec60f: updated the ContextMenu, ActionsPage, OngoingTask and TemplateCard frontend components to support the new scaffolder permissions: + + - `scaffolder.task.create` + - `scaffolder.task.cancel` + - `scaffolder.task.read` + +- Updated dependencies + - @backstage/plugin-scaffolder-react@1.8.7-next.1 + - @backstage/plugin-scaffolder-common@1.5.3-next.0 + - @backstage/plugin-catalog-react@1.12.1-next.0 + ## 1.20.1-next.0 ### Patch Changes diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 9236784abd..1dbe7ad7b0 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder", - "version": "1.20.1-next.0", + "version": "1.20.2-next.1", "description": "The Backstage plugin that helps you create new things", "backstage": { "role": "frontend-plugin" diff --git a/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.tsx b/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.tsx index f8fc831976..4ea26b4414 100644 --- a/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.tsx +++ b/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.tsx @@ -115,7 +115,7 @@ export const MultiEntityPicker = (props: MultiEntityPickerProps) => { } // We need to check against formData here as that's the previous value for this field. - if (formData.includes(ref) || allowArbitraryValues) { + if (formData?.includes(ref) || allowArbitraryValues) { return entityRef; } } @@ -173,7 +173,7 @@ export const MultiEntityPicker = (props: MultiEntityPickerProps) => { required={required} InputProps={{ ...params.InputProps, - required: formData.length === 0 && required, + required: formData?.length === 0 && required, }} /> )} diff --git a/plugins/search-backend-module-catalog/CHANGELOG.md b/plugins/search-backend-module-catalog/CHANGELOG.md index 3cd732f2b9..4c47c9d55a 100644 --- a/plugins/search-backend-module-catalog/CHANGELOG.md +++ b/plugins/search-backend-module-catalog/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-search-backend-module-catalog +## 0.1.25-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + ## 0.1.25-next.0 ### Patch Changes diff --git a/plugins/search-backend-module-catalog/package.json b/plugins/search-backend-module-catalog/package.json index 41828a7475..b1b1e0d643 100644 --- a/plugins/search-backend-module-catalog/package.json +++ b/plugins/search-backend-module-catalog/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-catalog", - "version": "0.1.25-next.0", + "version": "0.1.25-next.1", "description": "A module for the search backend that exports catalog modules", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/search-backend-module-elasticsearch/CHANGELOG.md b/plugins/search-backend-module-elasticsearch/CHANGELOG.md index 73aa7aee2c..228f390ddc 100644 --- a/plugins/search-backend-module-elasticsearch/CHANGELOG.md +++ b/plugins/search-backend-module-elasticsearch/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-search-backend-module-elasticsearch +## 1.4.2-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + ## 1.4.2-next.0 ### Patch Changes diff --git a/plugins/search-backend-module-elasticsearch/package.json b/plugins/search-backend-module-elasticsearch/package.json index 888b89e1bc..90ac189516 100644 --- a/plugins/search-backend-module-elasticsearch/package.json +++ b/plugins/search-backend-module-elasticsearch/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-elasticsearch", - "version": "1.4.2-next.0", + "version": "1.4.2-next.1", "description": "A module for the search backend that implements search using ElasticSearch", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/search-backend-module-explore/CHANGELOG.md b/plugins/search-backend-module-explore/CHANGELOG.md index 27137acc34..0649e48fcb 100644 --- a/plugins/search-backend-module-explore/CHANGELOG.md +++ b/plugins/search-backend-module-explore/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-search-backend-module-explore +## 0.1.25-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + ## 0.1.25-next.0 ### Patch Changes diff --git a/plugins/search-backend-module-explore/package.json b/plugins/search-backend-module-explore/package.json index 3e32174a2a..8abc027d57 100644 --- a/plugins/search-backend-module-explore/package.json +++ b/plugins/search-backend-module-explore/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-explore", - "version": "0.1.25-next.0", + "version": "0.1.25-next.1", "description": "A module for the search backend that exports explore modules", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/search-backend-module-pg/CHANGELOG.md b/plugins/search-backend-module-pg/CHANGELOG.md index 9d4fd62f82..2344912758 100644 --- a/plugins/search-backend-module-pg/CHANGELOG.md +++ b/plugins/search-backend-module-pg/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-search-backend-module-pg +## 0.5.28-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@0.7.6-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + ## 0.5.28-next.0 ### Patch Changes diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index 899abcee31..e19cdc7559 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-pg", - "version": "0.5.28-next.0", + "version": "0.5.28-next.1", "description": "A module for the search backend that implements search using PostgreSQL", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md b/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md index 1d643c7180..e7f5cd560b 100644 --- a/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md +++ b/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-search-backend-module-stack-overflow-collator +## 0.1.12-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + ## 0.1.12-next.0 ### Patch Changes diff --git a/plugins/search-backend-module-stack-overflow-collator/package.json b/plugins/search-backend-module-stack-overflow-collator/package.json index da22880943..e21c1c6a18 100644 --- a/plugins/search-backend-module-stack-overflow-collator/package.json +++ b/plugins/search-backend-module-stack-overflow-collator/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-stack-overflow-collator", - "version": "0.1.12-next.0", + "version": "0.1.12-next.1", "description": "A module for the search backend that exports stack overflow modules", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/search-backend-module-techdocs/CHANGELOG.md b/plugins/search-backend-module-techdocs/CHANGELOG.md index bd810f5208..9a05345cd8 100644 --- a/plugins/search-backend-module-techdocs/CHANGELOG.md +++ b/plugins/search-backend-module-techdocs/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-search-backend-module-techdocs +## 0.1.24-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-catalog-node@1.12.1-next.0 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + - @backstage/plugin-techdocs-node@1.12.5-next.1 + ## 0.1.24-next.0 ### Patch Changes diff --git a/plugins/search-backend-module-techdocs/package.json b/plugins/search-backend-module-techdocs/package.json index 5df953cbf0..1b81340671 100644 --- a/plugins/search-backend-module-techdocs/package.json +++ b/plugins/search-backend-module-techdocs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-module-techdocs", - "version": "0.1.24-next.0", + "version": "0.1.24-next.1", "description": "A module for the search backend that exports techdocs modules", "backstage": { "role": "backend-plugin-module" diff --git a/plugins/search-backend-node/CHANGELOG.md b/plugins/search-backend-node/CHANGELOG.md index 769f8e5785..928a406cf9 100644 --- a/plugins/search-backend-node/CHANGELOG.md +++ b/plugins/search-backend-node/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-search-backend-node +## 1.2.24-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.24-next.1 + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + ## 1.2.24-next.0 ### Patch Changes diff --git a/plugins/search-backend-node/package.json b/plugins/search-backend-node/package.json index 50f59089b2..f5ce41e840 100644 --- a/plugins/search-backend-node/package.json +++ b/plugins/search-backend-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-node", - "version": "1.2.24-next.0", + "version": "1.2.24-next.1", "description": "A library for Backstage backend plugins that want to interact with the search backend plugin", "backstage": { "role": "node-library" diff --git a/plugins/search-backend/CHANGELOG.md b/plugins/search-backend/CHANGELOG.md index c116515a7a..fa17e485c8 100644 --- a/plugins/search-backend/CHANGELOG.md +++ b/plugins/search-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-search-backend +## 1.5.10-next.1 + +### Patch Changes + +- 34dc47d: Move @backstage/repo-tools to devDependencies +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/plugin-permission-node@0.7.30-next.1 + - @backstage/backend-defaults@0.3.0-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-node@1.2.24-next.1 + ## 1.5.10-next.0 ### Patch Changes diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index 40371682fc..095c2d368d 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend", - "version": "1.5.10-next.0", + "version": "1.5.10-next.1", "description": "The Backstage backend plugin that provides your backstage app with search", "backstage": { "role": "backend-plugin" diff --git a/plugins/search/CHANGELOG.md b/plugins/search/CHANGELOG.md index 98c9852acc..e3455c41ab 100644 --- a/plugins/search/CHANGELOG.md +++ b/plugins/search/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-search +## 1.4.12-next.1 + +### Patch Changes + +- 4f92394: Migrate from identityApi to fetchApi in frontend plugins. +- Updated dependencies + - @backstage/plugin-catalog-react@1.12.1-next.0 + ## 1.4.12-next.0 ### Patch Changes diff --git a/plugins/search/package.json b/plugins/search/package.json index c8a46d9555..1014036287 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search", - "version": "1.4.12-next.0", + "version": "1.4.12-next.1", "description": "The Backstage plugin that provides your backstage app with search", "backstage": { "role": "frontend-plugin" diff --git a/plugins/search/src/alpha.tsx b/plugins/search/src/alpha.tsx index 9fffa41bfb..5c85d097d4 100644 --- a/plugins/search/src/alpha.tsx +++ b/plugins/search/src/alpha.tsx @@ -32,9 +32,9 @@ import { import { useApi, DiscoveryApi, - IdentityApi, discoveryApiRef, identityApiRef, + FetchApi, } from '@backstage/core-plugin-api'; import { @@ -81,12 +81,12 @@ export const searchApi = createApiExtension({ api: searchApiRef, deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef }, factory: ({ - identityApi, + fetchApi, discoveryApi, }: { - identityApi: IdentityApi; + fetchApi: FetchApi; discoveryApi: DiscoveryApi; - }) => new SearchClient({ discoveryApi, identityApi }), + }) => new SearchClient({ discoveryApi, fetchApi }), }, }); diff --git a/plugins/search/src/apis.test.ts b/plugins/search/src/apis.test.ts index 7996ad3fa3..15745d2e68 100644 --- a/plugins/search/src/apis.test.ts +++ b/plugins/search/src/apis.test.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import { MockFetchApi } from '@backstage/test-utils'; import { SearchClient } from './apis'; describe('apis', () => { @@ -26,47 +27,35 @@ describe('apis', () => { const baseUrl = 'https://base-url.com/'; const getBaseUrl = jest.fn().mockResolvedValue(baseUrl); - const token = 'AUTHTOKEN'; - const withToken = jest.fn().mockResolvedValue({ token }); - const withoutToken = jest.fn().mockResolvedValue({ token: undefined }); - const createIdentityApiMock = (getCredentials: any) => ({ - signOut: jest.fn(), + const identityApi = { + getCredentials: jest.fn(), getProfileInfo: jest.fn(), getBackstageIdentity: jest.fn(), - getCredentials, + signOut: jest.fn(), + }; + const json = jest.fn(); + const mockFetch = jest.fn().mockResolvedValue({ + ok: true, + json, + }); + const fetchApi = new MockFetchApi({ + baseImplementation: mockFetch, + injectIdentityAuth: { identityApi }, }); const client = new SearchClient({ discoveryApi: { getBaseUrl }, - identityApi: createIdentityApiMock(withoutToken), - }); - - const json = jest.fn(); - const originalFetch = window.fetch; - window.fetch = jest.fn().mockResolvedValue({ json, ok: true }); - - afterAll(() => { - window.fetch = originalFetch; + fetchApi, }); it('Fetch is called with expected URL (including stringified Q params)', async () => { + identityApi.getCredentials.mockResolvedValue({}); await client.query(query); expect(getBaseUrl).toHaveBeenLastCalledWith('search'); - expect(fetch).toHaveBeenLastCalledWith(`${baseUrl}/query?term=`, { - headers: {}, - }); - }); - - it('Sets Authorization if token is available', async () => { - const authedClient = new SearchClient({ - discoveryApi: { getBaseUrl }, - identityApi: createIdentityApiMock(withToken), - }); - await authedClient.query(query); - expect(getBaseUrl).toHaveBeenLastCalledWith('search'); - expect(fetch).toHaveBeenLastCalledWith(`${baseUrl}/query?term=`, { - headers: { Authorization: `Bearer ${token}` }, - }); + expect(mockFetch).toHaveBeenLastCalledWith( + `${baseUrl}/query?term=`, + undefined, + ); }); it('Resolves JSON from fetch response', async () => { diff --git a/plugins/search/src/apis.ts b/plugins/search/src/apis.ts index eb5f47a65c..b56d88a22c 100644 --- a/plugins/search/src/apis.ts +++ b/plugins/search/src/apis.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; +import { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api'; import { ResponseError } from '@backstage/errors'; import { SearchApi } from '@backstage/plugin-search-react'; import { SearchQuery, SearchResultSet } from '@backstage/plugin-search-common'; @@ -23,25 +23,19 @@ import qs from 'qs'; export class SearchClient implements SearchApi { private readonly discoveryApi: DiscoveryApi; - private readonly identityApi: IdentityApi; + private readonly fetchApi: FetchApi; - constructor(options: { - discoveryApi: DiscoveryApi; - identityApi: IdentityApi; - }) { + constructor(options: { discoveryApi: DiscoveryApi; fetchApi: FetchApi }) { this.discoveryApi = options.discoveryApi; - this.identityApi = options.identityApi; + this.fetchApi = options.fetchApi; } async query(query: SearchQuery): Promise { - const { token } = await this.identityApi.getCredentials(); const queryString = qs.stringify(query); const url = `${await this.discoveryApi.getBaseUrl( 'search', )}/query?${queryString}`; - const response = await fetch(url, { - headers: token ? { Authorization: `Bearer ${token}` } : {}, - }); + const response = await this.fetchApi.fetch(url); if (!response.ok) { throw await ResponseError.fromResponse(response); diff --git a/plugins/search/src/plugin.ts b/plugins/search/src/plugin.ts index 07a645f73e..1adfd2e684 100644 --- a/plugins/search/src/plugin.ts +++ b/plugins/search/src/plugin.ts @@ -23,7 +23,7 @@ import { createRoutableExtension, discoveryApiRef, createComponentExtension, - identityApiRef, + fetchApiRef, } from '@backstage/core-plugin-api'; export const rootRouteRef = createRouteRef({ @@ -38,9 +38,9 @@ export const searchPlugin = createPlugin({ apis: [ createApiFactory({ api: searchApiRef, - deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef }, - factory: ({ discoveryApi, identityApi }) => { - return new SearchClient({ discoveryApi, identityApi }); + deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef }, + factory: ({ discoveryApi, fetchApi }) => { + return new SearchClient({ discoveryApi, fetchApi }); }, }), ], diff --git a/plugins/signals-backend/CHANGELOG.md b/plugins/signals-backend/CHANGELOG.md index e748bcd493..25b77a2261 100644 --- a/plugins/signals-backend/CHANGELOG.md +++ b/plugins/signals-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-signals-backend +## 0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + - @backstage/plugin-signals-node@0.1.5-next.1 + ## 0.1.5-next.0 ### Patch Changes diff --git a/plugins/signals-backend/package.json b/plugins/signals-backend/package.json index 8a2ec3373b..5b87a03929 100644 --- a/plugins/signals-backend/package.json +++ b/plugins/signals-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-signals-backend", - "version": "0.1.5-next.0", + "version": "0.1.5-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/signals-node/CHANGELOG.md b/plugins/signals-node/CHANGELOG.md index ab160c0c8f..a596027808 100644 --- a/plugins/signals-node/CHANGELOG.md +++ b/plugins/signals-node/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-signals-node +## 0.1.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + - @backstage/plugin-events-node@0.3.5-next.0 + ## 0.1.5-next.0 ### Patch Changes diff --git a/plugins/signals-node/package.json b/plugins/signals-node/package.json index f93947ae4b..d1e130d01b 100644 --- a/plugins/signals-node/package.json +++ b/plugins/signals-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-signals-node", "description": "Node.js library for the signals plugin", - "version": "0.1.5-next.0", + "version": "0.1.5-next.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/techdocs-backend/CHANGELOG.md b/plugins/techdocs-backend/CHANGELOG.md index 2764510f3c..cec699fcd7 100644 --- a/plugins/techdocs-backend/CHANGELOG.md +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-techdocs-backend +## 1.10.6-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-search-backend-module-techdocs@0.1.24-next.1 + - @backstage/plugin-techdocs-node@1.12.5-next.1 + ## 1.10.6-next.0 ### Patch Changes diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index df8cd6e096..f96c6ec31c 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-backend", - "version": "1.10.6-next.0", + "version": "1.10.6-next.1", "description": "The Backstage backend plugin that renders technical documentation for your components", "backstage": { "role": "backend-plugin" diff --git a/plugins/techdocs-node/CHANGELOG.md b/plugins/techdocs-node/CHANGELOG.md index c7d0223508..00ad945353 100644 --- a/plugins/techdocs-node/CHANGELOG.md +++ b/plugins/techdocs-node/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-techdocs-node +## 1.12.5-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + ## 1.12.5-next.0 ### Patch Changes diff --git a/plugins/techdocs-node/package.json b/plugins/techdocs-node/package.json index 08b52b45b0..95ef28a2e0 100644 --- a/plugins/techdocs-node/package.json +++ b/plugins/techdocs-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-node", - "version": "1.12.5-next.0", + "version": "1.12.5-next.1", "description": "Common node.js functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli", "backstage": { "role": "node-library" diff --git a/plugins/user-settings-backend/CHANGELOG.md b/plugins/user-settings-backend/CHANGELOG.md index 9402f0d688..915f283428 100644 --- a/plugins/user-settings-backend/CHANGELOG.md +++ b/plugins/user-settings-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-user-settings-backend +## 0.2.18-next.1 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.19-next.1 + - @backstage/backend-common@0.23.0-next.1 + - @backstage/plugin-auth-node@0.4.14-next.1 + ## 0.2.18-next.0 ### Patch Changes diff --git a/plugins/user-settings-backend/package.json b/plugins/user-settings-backend/package.json index b3210d8357..38d6d0e04d 100644 --- a/plugins/user-settings-backend/package.json +++ b/plugins/user-settings-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-user-settings-backend", - "version": "0.2.18-next.0", + "version": "0.2.18-next.1", "description": "The Backstage backend plugin to manage user settings", "backstage": { "role": "backend-plugin"