diff --git a/.changeset/grumpy-meals-wink.md b/.changeset/grumpy-meals-wink.md new file mode 100644 index 0000000000..8fb346b831 --- /dev/null +++ b/.changeset/grumpy-meals-wink.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-import': patch +--- + +Align plugin ID and fix variable typo diff --git a/.changeset/perfect-donkeys-hope.md b/.changeset/perfect-donkeys-hope.md new file mode 100644 index 0000000000..80feae11a0 --- /dev/null +++ b/.changeset/perfect-donkeys-hope.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Fix config schema for `.app.listen` diff --git a/.changeset/purple-ghosts-attack.md b/.changeset/purple-ghosts-attack.md new file mode 100644 index 0000000000..bf13d541e2 --- /dev/null +++ b/.changeset/purple-ghosts-attack.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search': patch +--- + +change default size for pageSize in search result view diff --git a/.changeset/shaggy-camels-remain.md b/.changeset/shaggy-camels-remain.md new file mode 100644 index 0000000000..f1c4e17643 --- /dev/null +++ b/.changeset/shaggy-camels-remain.md @@ -0,0 +1,8 @@ +--- +'example-backend': patch +'@backstage/plugin-scaffolder-backend': patch +'@backstage/plugin-techdocs-backend': patch +'@backstage/create-app': patch +--- + +Unify `dockerode` library and type dependency versions diff --git a/.changeset/unlucky-kiwis-rescue.md b/.changeset/unlucky-kiwis-rescue.md new file mode 100644 index 0000000000..71afaeb44a --- /dev/null +++ b/.changeset/unlucky-kiwis-rescue.md @@ -0,0 +1,14 @@ +--- +'@backstage/core': minor +--- + +Introducing a new optional property within `app-config.yaml` called `auth.environment` to have configurable environment value for `auth.providers` + +**Default Value:** 'development' + +**Optional Values:** 'production' | 'development' + +**Migration-steps:** + +- To override the default value, one could simply introduce the new property `environment` within the `auth` section of the `config.yaml` +- re-run the build to reflect the changed configs diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ac33ca7f8..9df533bb88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,9 @@ # Backstage Changelog -This is a best-effort changelog where we manually collect breaking changes. It is not an exhaustive list of all changes or even features added. +This changelog is no longer being updated and will be removed in the future, as each package now has its own changelog instead. It was a best-effort changelog where we manually collected breaking changes during the `v0.1.1-alpha.` releases. If you encounter issues while upgrading to a newer version, don't hesitate to reach out on [Discord](https://discord.gg/EBHEGzX) or [open an issue](https://github.com/backstage/backstage/issues/new/choose)! -## Next Release - -> Collect changes for the next release below - ## v0.1.1-alpha.26 ### @backstage/cli diff --git a/app-config.yaml b/app-config.yaml index 54d564de7d..7fc041bf13 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -190,6 +190,7 @@ scaffolder: token: $env: AZURE_TOKEN auth: + environment: development ### Providing an auth.session.secret will enable session support in the auth-backend # session: # secret: custom session secret diff --git a/packages/backend-common/src/reading/GithubUrlReader.ts b/packages/backend-common/src/reading/GithubUrlReader.ts index 692a3c6dd8..de798a7067 100644 --- a/packages/backend-common/src/reading/GithubUrlReader.ts +++ b/packages/backend-common/src/reading/GithubUrlReader.ts @@ -196,6 +196,7 @@ export class GithubUrlReader implements UrlReader { new URL( `${protocol}://${resource}/${full_name}/archive/${ref}.tar.gz`, ).toString(), + getRawRequestOptions(this.config), ); if (!response.ok) { const message = `Failed to read tree from ${url}, ${response.status} ${response.statusText}`; diff --git a/packages/backend/package.json b/packages/backend/package.json index 9e635902e9..5937d6a6f3 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -34,7 +34,7 @@ "@gitbeaker/node": "^25.2.0", "@octokit/rest": "^18.0.0", "azure-devops-node-api": "^10.1.1", - "dockerode": "^3.2.0", + "dockerode": "^3.2.1", "example-app": "^0.2.5", "express": "^4.17.1", "express-promise-router": "^3.0.3", @@ -46,7 +46,7 @@ }, "devDependencies": { "@backstage/cli": "^0.4.0", - "@types/dockerode": "^2.5.32", + "@types/dockerode": "^3.2.1", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5", "@types/helmet": "^0.0.48" diff --git a/packages/cli/package.json b/packages/cli/package.json index fd02473453..0d585436bb 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -178,7 +178,7 @@ "description": "Listening configuration for local development", "properties": { "host": { - "type": "number", + "type": "string", "visibility": "frontend", "description": "The host that the frontend should be bound to. Only used for local development." }, diff --git a/packages/core/config.d.ts b/packages/core/config.d.ts index 014e4ac934..a6f95ae71c 100644 --- a/packages/core/config.d.ts +++ b/packages/core/config.d.ts @@ -62,4 +62,17 @@ export interface Config { timezone: string; }[]; }; + + /** + * Configuration that provides information on available authentication providers configured for app + */ + auth?: { + /** + * The 'environment' attribute added as an optional parameter to have configurable environment value for `auth.providers`. + * default value: 'development' + * optional values: 'development' | 'production' + * @visibility frontend + */ + environment?: string; + }; } diff --git a/packages/core/src/api-wrappers/defaultApis.ts b/packages/core/src/api-wrappers/defaultApis.ts index 1f18f54d2a..d044b50b7a 100644 --- a/packages/core/src/api-wrappers/defaultApis.ts +++ b/packages/core/src/api-wrappers/defaultApis.ts @@ -78,30 +78,42 @@ export const defaultApis = [ deps: { discoveryApi: discoveryApiRef, oauthRequestApi: oauthRequestApiRef, + configApi: configApiRef, }, - factory: ({ discoveryApi, oauthRequestApi }) => - GoogleAuth.create({ discoveryApi, oauthRequestApi }), + factory: ({ discoveryApi, oauthRequestApi, configApi }) => + GoogleAuth.create({ + discoveryApi, + oauthRequestApi, + environment: configApi.getOptionalString('auth.environment'), + }), }), createApiFactory({ api: microsoftAuthApiRef, deps: { discoveryApi: discoveryApiRef, oauthRequestApi: oauthRequestApiRef, + configApi: configApiRef, }, - factory: ({ discoveryApi, oauthRequestApi }) => - MicrosoftAuth.create({ discoveryApi, oauthRequestApi }), + factory: ({ discoveryApi, oauthRequestApi, configApi }) => + MicrosoftAuth.create({ + discoveryApi, + oauthRequestApi, + environment: configApi.getOptionalString('auth.environment'), + }), }), createApiFactory({ api: githubAuthApiRef, deps: { discoveryApi: discoveryApiRef, oauthRequestApi: oauthRequestApiRef, + configApi: configApiRef, }, - factory: ({ discoveryApi, oauthRequestApi }) => + factory: ({ discoveryApi, oauthRequestApi, configApi }) => GithubAuth.create({ discoveryApi, oauthRequestApi, defaultScopes: ['read:user'], + environment: configApi.getOptionalString('auth.environment'), }), }), createApiFactory({ @@ -109,60 +121,91 @@ export const defaultApis = [ deps: { discoveryApi: discoveryApiRef, oauthRequestApi: oauthRequestApiRef, + configApi: configApiRef, }, - factory: ({ discoveryApi, oauthRequestApi }) => - OktaAuth.create({ discoveryApi, oauthRequestApi }), + factory: ({ discoveryApi, oauthRequestApi, configApi }) => + OktaAuth.create({ + discoveryApi, + oauthRequestApi, + environment: configApi.getOptionalString('auth.environment'), + }), }), createApiFactory({ api: gitlabAuthApiRef, deps: { discoveryApi: discoveryApiRef, oauthRequestApi: oauthRequestApiRef, + configApi: configApiRef, }, - factory: ({ discoveryApi, oauthRequestApi }) => - GitlabAuth.create({ discoveryApi, oauthRequestApi }), + factory: ({ discoveryApi, oauthRequestApi, configApi }) => + GitlabAuth.create({ + discoveryApi, + oauthRequestApi, + environment: configApi.getOptionalString('auth.environment'), + }), }), createApiFactory({ api: auth0AuthApiRef, deps: { discoveryApi: discoveryApiRef, oauthRequestApi: oauthRequestApiRef, + configApi: configApiRef, }, - factory: ({ discoveryApi, oauthRequestApi }) => - Auth0Auth.create({ discoveryApi, oauthRequestApi }), + factory: ({ discoveryApi, oauthRequestApi, configApi }) => + Auth0Auth.create({ + discoveryApi, + oauthRequestApi, + environment: configApi.getOptionalString('auth.environment'), + }), }), createApiFactory({ api: oauth2ApiRef, deps: { discoveryApi: discoveryApiRef, oauthRequestApi: oauthRequestApiRef, + configApi: configApiRef, }, - factory: ({ discoveryApi, oauthRequestApi }) => - OAuth2.create({ discoveryApi, oauthRequestApi }), + factory: ({ discoveryApi, oauthRequestApi, configApi }) => + OAuth2.create({ + discoveryApi, + oauthRequestApi, + environment: configApi.getOptionalString('auth.environment'), + }), }), createApiFactory({ api: samlAuthApiRef, deps: { discoveryApi: discoveryApiRef, + configApi: configApiRef, }, - factory: ({ discoveryApi }) => SamlAuth.create({ discoveryApi }), + factory: ({ discoveryApi, configApi }) => + SamlAuth.create({ + discoveryApi, + environment: configApi.getOptionalString('auth.environment'), + }), }), createApiFactory({ api: oneloginAuthApiRef, deps: { discoveryApi: discoveryApiRef, oauthRequestApi: oauthRequestApiRef, + configApi: configApiRef, }, - factory: ({ discoveryApi, oauthRequestApi }) => - OneLoginAuth.create({ discoveryApi, oauthRequestApi }), + factory: ({ discoveryApi, oauthRequestApi, configApi }) => + OneLoginAuth.create({ + discoveryApi, + oauthRequestApi, + environment: configApi.getOptionalString('auth.environment'), + }), }), createApiFactory({ api: oidcAuthApiRef, deps: { discoveryApi: discoveryApiRef, oauthRequestApi: oauthRequestApiRef, + configApi: configApiRef, }, - factory: ({ discoveryApi, oauthRequestApi }) => + factory: ({ discoveryApi, oauthRequestApi, configApi }) => OAuth2.create({ discoveryApi, oauthRequestApi, @@ -171,6 +214,7 @@ export const defaultApis = [ title: 'Your Identity Provider', icon: OAuth2Icon, }, + environment: configApi.getOptionalString('auth.environment'), }), }), ]; diff --git a/packages/create-app/templates/default-app/packages/backend/package.json.hbs b/packages/create-app/templates/default-app/packages/backend/package.json.hbs index 07d1b0be58..8dccb0b683 100644 --- a/packages/create-app/templates/default-app/packages/backend/package.json.hbs +++ b/packages/create-app/templates/default-app/packages/backend/package.json.hbs @@ -29,7 +29,7 @@ "@backstage/plugin-techdocs-backend": "^{{version '@backstage/plugin-techdocs-backend'}}", "@octokit/rest": "^18.0.0", "@gitbeaker/node": "^25.2.0", - "dockerode": "^3.2.0", + "dockerode": "^3.2.1", "express": "^4.17.1", "express-promise-router": "^3.0.3", "knex": "^0.21.6", @@ -43,7 +43,7 @@ }, "devDependencies": { "@backstage/cli": "^{{version '@backstage/cli'}}", - "@types/dockerode": "^2.5.32", + "@types/dockerode": "^3.2.1", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5", "@types/helmet": "^0.0.47" diff --git a/plugins/catalog-import/src/api/CatalogImportApi.ts b/plugins/catalog-import/src/api/CatalogImportApi.ts index 49012764e2..0ce569171f 100644 --- a/plugins/catalog-import/src/api/CatalogImportApi.ts +++ b/plugins/catalog-import/src/api/CatalogImportApi.ts @@ -18,7 +18,7 @@ import { createApiRef } from '@backstage/core'; import { PartialEntity } from '../util/types'; export const catalogImportApiRef = createApiRef({ - id: 'plugin.catalogimport.service', + id: 'plugin.catalog-import.service', description: 'Used by the catalog import plugin to make requests', }); diff --git a/plugins/catalog-import/src/api/CatalogImportClient.ts b/plugins/catalog-import/src/api/CatalogImportClient.ts index 94ba260d55..aaa110329e 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.ts @@ -160,7 +160,7 @@ export class CatalogImportClient implements CatalogImportApi { ); }); - const pullRequestRespone = await octo.pulls + const pullRequestResponse = await octo.pulls .create({ owner, repo, @@ -178,7 +178,7 @@ export class CatalogImportClient implements CatalogImportApi { }); return { - link: pullRequestRespone.data.html_url, + link: pullRequestResponse.data.html_url, location: `https://github.com/${owner}/${repo}/blob/${repoData.data.default_branch}/${fileName}`, }; } diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index f71d8bc36c..7aa8fc873a 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -26,13 +26,13 @@ "@gitbeaker/core": "^25.2.0", "@gitbeaker/node": "^25.2.0", "@octokit/rest": "^18.0.0", - "@types/dockerode": "^2.5.32", + "@types/dockerode": "^3.2.1", "@types/express": "^4.17.6", "azure-devops-node-api": "^10.1.1", "command-exists-promise": "^2.0.2", "compression": "^1.7.4", "cors": "^2.8.5", - "dockerode": "^3.2.0", + "dockerode": "^3.2.1", "express": "^4.17.1", "express-promise-router": "^3.0.3", "fs-extra": "^9.0.0", diff --git a/plugins/search/src/components/SearchResult/SearchResult.tsx b/plugins/search/src/components/SearchResult/SearchResult.tsx index 9fd54ac06c..4bbb15e229 100644 --- a/plugins/search/src/components/SearchResult/SearchResult.tsx +++ b/plugins/search/src/components/SearchResult/SearchResult.tsx @@ -251,7 +251,7 @@ export const SearchResult = ({ searchQuery }: SearchResultProps) => { )}