Merge branch 'master' of github.com:AmericanAirlines/backstage into fix-clear-text-cookie-codeql

Signed-off-by: Fidel Coria <fidel.coria@aa.com>
This commit is contained in:
Fidel Coria
2021-12-27 10:02:28 -06:00
329 changed files with 2882 additions and 1510 deletions
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-search': patch
---
Add Optional Props to Override Icon for SidebarSearch and SidebarSearchModal Component
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/app-defaults': patch
'@backstage/core-app-api': patch
'@backstage/core-plugin-api': patch
---
Add `FetchApi` and related `fetchApiRef` which implement fetch, with an added Backstage token header when available.
-22
View File
@@ -1,22 +0,0 @@
---
'@backstage/backend-common': patch
---
Fixed bug in backend-common to allow passing of remote option in order to enable passing remote url in --config option. The remote option should be passed along with reloadIntervalSeconds from packages/backend/src/index.ts (Updated the file as well)
These changes are needed in `packages/backend/src/index.ts` if remote URLs are desired to be passed in --config option and read and watch remote files for config.
```diff
@@ -86,7 +86,11 @@ async function main() {
const config = await loadBackendConfig({
argv: process.argv,
logger,
+ remote: {
+ reloadIntervalSeconds: 60 * 10 // Check remote config changes every 10 minutes. Change to your desired interval in seconds
+ }
});
+
const createEnv = makeCreateEnv(config);
const healthcheckEnv = useHotMemoize(module, () => createEnv('healthcheck'));
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/app-defaults': patch
---
Added an instance of PermissionApi to the apis included by default in createApp.
+24
View File
@@ -0,0 +1,24 @@
---
'@backstage/create-app': patch
---
removed inline and internal CSS from index.html
To make this change to an existing app, apply the following changes to the `packages/app/public/index.html` file:
Remove internal style
```diff
- <style>
- #root {
- min-height: 100%;
- }
- </style>
```
Remove inline style from the body tag
```diff
- <body style="margin: 0">
+ <body>
```
+1 -1
View File
@@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/config@1.3.0/schema.json",
"changelog": "./backstage-changelog.js",
"commit": false,
"linked": [["*"]],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/config-loader': patch
---
In case remote.reloadIntervalSeconds is passed, it must be a valid positive value
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-user-settings': patch
---
Fix undefined identity bug in UserSettingsProfileCard caused by using deprecated methods of the IdentityApi
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/test-utils': patch
---
JSON serialize and freeze values stored by the `MockStorageApi`.
-11
View File
@@ -1,11 +0,0 @@
---
'@backstage/core-plugin-api': minor
---
**BREAKING CHANGE** The `StorageApi` has received several updates that fills in gaps for some use-cases and makes it easier to avoid mistakes:
- The `StorageValueChange` type has been renamed to `StorageValueSnapshot`, the `newValue` property has been renamed to `value`, the stored value type has been narrowed to `JsonValue`, and it has received a new `presence` property that is `'unknown'`, `'absent'`, or `'present'`.
- The `get` method has been deprecated in favor of a new `snapshot` method, which returns a `StorageValueSnapshot`.
- The `observe$` method has had its contract changed. It should now emit values when the `presence` of a key changes, this may for example happen when remotely stored values are requested on page load and the presence switches from `'unknown'` to either `'absent'` or `'present'`.
The above changes have been made with deprecations in place to maintain much of the backwards compatibility for consumers of the `StorageApi`. The only breaking change is the narrowing of the stored value type, which may in some cases require the addition of an explicit type parameter to the `get` and `observe$` methods.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-common': patch
---
In-memory cache clients instantiated from the same cache manager now share the same memory space.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-config-schema': patch
'@backstage/plugin-scaffolder': patch
---
Fix a small browser console warning
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-react': patch
---
added useOwnedEntities hook to get the list of entities of the logged-in user
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-kubernetes': minor
---
Includes `KubernetesBackendClient` in the export to allow developers to use it externally.
-17
View File
@@ -1,17 +0,0 @@
---
'@backstage/plugin-permission-react': minor
---
Breaking Changes:
- Remove "api" suffixes from constructor parameters in IdentityPermissionApi.create
```diff
const { config, discovery, identity } = options;
- const permissionApi = IdentityPermissionApi.create({
- configApi: config,
- discoveryApi: discovery,
- identityApi: identity
- });
+ const permissionApi = IdentityPermissionApi.create({ config, discovery, identity });
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Added description to components: BottomLink, Breadcrumbs, BrokenImageIcon, CardTab, Content, ContentHeader, EmptyState, ErrorPage, FeatureCalloutCircular, Gauge, GaugeCard, Header, HeaderIconLinkRow, HeaderLabel, HeaderTabs, HorizontalScrollGrid, InfoCard, IntroCard
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Added peerPluginDependencies option to experimentalInstallationRecipe for install command to install plugins it depends on.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-tech-insights': minor
---
fixes api auth in tech-insights plugin
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-tech-radar': minor
---
Add new property to enable open links in a new window/tab
-8
View File
@@ -1,8 +0,0 @@
---
'@backstage/plugin-tech-insights': patch
'@backstage/plugin-tech-insights-backend-module-jsonfc': patch
---
RunChecks endpoint now handles missing retriever data in checks. Instead of
showing server errors, the checks will be shown for checks whose retrievers have
data, and a warning will be shown if no checks are returned.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-org': patch
---
Fixed bug in OwnershipCard component where text wasn't correctly pluralized
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend-module-rails': patch
---
Add new options to rails new (force and skipTests)
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-common': minor
---
Create catalog-common and add catalog permissions.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-bazaar': patch
'@backstage/plugin-bazaar-backend': patch
---
made the linkage between a Bazaar project to a catalog Entity optional
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-app-api': minor
---
Updated `WebStorageApi` to reflect the `StorageApi` changes in `@backstage/core-plugin-api`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/test-utils': minor
---
Updated `MockStorageApi` to reflect the `StorageApi` changes in `@backstage/core-plugin-api`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
Updated the `ReadTreeResponse` documentation to clarify that the caller of `dir()` is responsible for removing the directory after use.
-25
View File
@@ -1,25 +0,0 @@
---
'@backstage/plugin-catalog': patch
---
Deprecated the `CatalogClientWrapper` class.
The default implementation of `catalogApiRef` that this plugin exposes, is now powered by the new `fetchApiRef`. The default implementation of _that_ API, in turn, has the ability to inject the user's Backstage token in requests in a similar manner to what the deprecated `CatalogClientWrapper` used to do. The latter has therefore been taken out of the default catalog API implementation.
If you use a custom `fetchApiRef` implementation that does NOT issue tokens, or use a custom `catalogApiRef` implementation which does NOT use the default `fetchApiRef`, you can still for some time wrap your catalog API in this class to get back the old behavior:
```ts
// Add this to your packages/app/src/plugins.ts if you want to get back the old
// catalog client behavior:
createApiFactory({
api: catalogApiRef,
deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef },
factory: ({ discoveryApi, identityApi }) =>
new CatalogClientWrapper({
client: new CatalogClient({ discoveryApi }),
identityApi,
}),
}),
```
But do consider migrating to making use of the `fetchApiRef` as soon as convenient, since the wrapper class will be removed in a future release.
-14
View File
@@ -1,14 +0,0 @@
---
'@backstage/backend-common': minor
---
Auto-generate secrets for backend-to-backend auth in local development environments.
When NODE_ENV is 'development', the ServerTokenManager will now generate a secret for backend-to-backend auth to make it simpler to work locally on Backstage instances that use backend-to-backend auth. For production deployments, a secret must still be manually configured as described in [the backend-to-backend auth tutorial](https://backstage.io/docs/tutorials/backend-to-backend-auth).
After the change, the static `fromConfig` method on the `ServerTokenManager` requires a logger.
```diff
- const tokenManager = ServerTokenManager.fromConfig(config);
+ const tokenManager = ServerTokenManager.fromConfig(config, { logger: root });
```
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Fix issue with plugin:serve for Plugins not using Lerna monorepo.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
remove inline CSS from serve_index.html
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/catalog-client': patch
---
Add the ability to supply a custom `fetchApi`. In the default frontend app setup, this will use the `fetchApiRef` implementation.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder': patch
---
EntityPicker can require an existing entity be selected by disallowing arbitrary values
+9
View File
@@ -0,0 +1,9 @@
---
'@backstage/backend-common': patch
'@backstage/plugin-catalog': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-scaffolder-backend': patch
---
Uptake changes to the GitHub Credentials Provider interface.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/config-loader': minor
---
Removed deprecated option `env` from `LoadConfigOptions` and associated tests
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-newrelic-dashboard': patch
---
Created a New Plugin , which imports dashboard links and snapshots from New Relic
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-home': patch
---
Fix undefined identity bug in `WelcomeTitle` caused by using deprecated methods of the IdentityApi
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-techdocs': patch
---
Add the techdocs.sanitizer.allowedIframeHosts config.
This config allows all iframes which have the host of the attribute src in the 'allowedIframehosts' list to be displayed in the documentation.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/test-utils': minor
---
Removed deprecated `Keyboard` class which has been superseded by `@testing-library/user-event#userEvent`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-rollbar-backend': patch
---
Bump `axios`
+5
View File
@@ -0,0 +1,5 @@
---
'@techdocs/cli': patch
---
remove internal and inline CSS from index.html
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/core-app-api': minor
---
- Removed deprecated definition `createApp` from `@backstage/core-app-api` which has been replaced by `@backstage/app-defaults#createApp`
- Removed deprecated type `BackstagePluginWithAnyOutput`
- Removed deprecated constructors for `GithubAuth`, `OAuth2`, and `SamlAuth` as the `create` method should be used instead
-8
View File
@@ -1,8 +0,0 @@
---
'@backstage/core-plugin-api': minor
---
- Removed deprecated option `description` from `ApiRefConfig`
- Removed descriptions from all plugin API refs
- Removed deprecated parameters `path`, `icon`, and `title` in `createRouteRef`
- Removed deprecated types `Error` and `ErrorContext` from `ErrorApi`
-30
View File
@@ -1,30 +0,0 @@
---
'@backstage/create-app': patch
---
The `index.html` template of the app has been updated to use the new `config` global provided by the Backstage CLI.
To apply this change to an existing app, make the following changes to `packages/app/public/index.html`:
```diff
- <title><%= app.title %></title>
+ <title><%= config.getString('app.title') %></title>
```
```diff
- <% if (app.googleAnalyticsTrackingId && typeof app.googleAnalyticsTrackingId === 'string') { %>
+ <% if (config.has('app.googleAnalyticsTrackingId')) { %>
<script
async
- src="https://www.googletagmanager.com/gtag/js?id=<%= app.googleAnalyticsTrackingId %>"
+ src="https://www.googletagmanager.com/gtag/js?id=<%= config.getString('app.googleAnalyticsTrackingId') %>"
></script>
```
```diff
- gtag('config', '<%= app.googleAnalyticsTrackingId %>');
+ gtag(
+ 'config',
+ '<%= config.getString("app.googleAnalyticsTrackingId") %>',
+ );
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/test-utils': minor
---
Removed deprecated `msw` definition which was replaced by calling `setupRequestMockHandlers` directly
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/config-loader': minor
---
Removed deprecated option `configPaths` as it has been superseded by `configTargets`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder': patch
---
Added OwnedEntityPicker field which displays Owned Entities in options
-15
View File
@@ -1,15 +0,0 @@
---
'@backstage/cli': patch
---
The frontend configuration is now available as a `config` global during templating of the `index.html` file. This allows for much more flexibility as the values available during templating is not longer hardcoded to a fixed set of values.
For example, to access the app title, you would now do the following:
```html
<title><%= config.getString('app.title') %></title>
```
Along with this change, usage of the existing `app.<key>` values has been deprecated and will be removed in a future release. The general pattern for migrating existing usage is to replace `<%= app.<key> %>` with `<%= config.getString('app.<key>') %>`, although in some cases you may need to use for example `config.has('app.<key>')` or `config.getOptionalString('app.<key>')` instead.
The [`@backstage/create-app` changelog](https://github.com/backstage/backstage/blob/master/packages/create-app/CHANGELOG.md#049) also contains more details how to migrate existing usage.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Fixed the fallback identity population to correctly generate an entity reference for `userEntityRef` if no token is provided.
-15
View File
@@ -1,15 +0,0 @@
---
'@backstage/plugin-permission-common': minor
---
- Add `PermissionAuthorizer` interface matching `PermissionClient` to allow alternative implementations like the `ServerPermissionClient` in @backstage/plugin-permission-node.
Breaking Changes:
- Remove "api" suffixes from constructor parameters in PermissionClient
```diff
const { config, discovery } = options;
- const permissionClient = new PermissionClient({ discoveryApi: discovery, configApi: config });
+ const permissionClient = new PermissionClient({ discovery, config });
```
-9
View File
@@ -1,9 +0,0 @@
---
'@backstage/app-defaults': patch
'@backstage/core-app-api': minor
'@backstage/core-plugin-api': minor
---
- Removed deprecation configuration option `theme` from `AppTheme` of the `AppThemeApi`
- Removed reference to `theme` in the `app-defaults` default `AppTheme`
- Removed logic in `AppThemeProvider` that creates `ThemeProvider` from `appTheme.theme`
+13
View File
@@ -0,0 +1,13 @@
---
'@backstage/integration': minor
---
Create an interface for the GitHub credentials provider in order to support providing implementations.
We have changed the name of the `GithubCredentialsProvider` to `SingleInstanceGithubCredentialsProvider`.
`GithubCredentialsProvider` is now an interface that maybe implemented to provide a custom mechanism to retrieve GitHub credentials.
In a later release we will support configuring URL readers, scaffolder tasks, and processors with customer GitHub credentials providers.
If you want to uptake this release, you will need to replace all references to `GithubCredentialsProvider.create` with `SingleInstanceGithubCredentialsProvider.create`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/catalog-client': patch
---
Add support for passing paging parameters to the getEntities call of the catalog client
-8
View File
@@ -1,8 +0,0 @@
---
'@backstage/plugin-search-backend': minor
---
Search result location filtering
This change introduces a filter for search results based on their location protocol. The intention is to filter out unsafe or
malicious values before they can be consumed by the frontend. By default locations must be http/https URLs (or paths).
+41
View File
@@ -0,0 +1,41 @@
---
'@backstage/create-app': patch
---
Add a `scheduler` to the plugin environment, which can schedule collaborative tasks across backends. To apply the same change in your backend, follow the steps below.
First install the package:
```shell
# From the Backstage repository root
cd packages/backend
yarn add @backstage/backend-tasks
```
Add the scheduler to your plugin environment type:
```diff
// In packages/backend/src/types.ts
+import { PluginTaskScheduler } from '@backstage/backend-tasks';
export type PluginEnvironment = {
+ scheduler: PluginTaskScheduler;
```
And finally make sure to add such an instance to each plugin's environment:
```diff
// In packages/backend/src/index.ts
+import { TaskScheduler } from '@backstage/backend-tasks';
function makeCreateEnv(config: Config) {
// ...
+ const taskScheduler = TaskScheduler.fromConfig(config);
return (plugin: string): PluginEnvironment => {
// ...
+ const scheduler = taskScheduler.forPlugin(plugin);
return {
+ scheduler,
// ...
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Do not `setState` when unmounted in `OverflowTooltip`
-5
View File
@@ -1,5 +0,0 @@
---
'embedded-techdocs-app': patch
---
The `index.html` template was updated to use the new `config` global.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-techdocs-backend': patch
---
Fixed a bug preventing cache from being enabled in TechDocs "recommended" deployment mode.
-9
View File
@@ -1,9 +0,0 @@
---
'@backstage/core-components': patch
'@backstage/plugin-scaffolder': patch
---
In @backstage/plugin-scaffolder - When user will have one option available in hostUrl or owner - autoselect and select component should be readonly.
in @backstage/core-components - Select component has extended API with few more props: native : boolean, disabled: boolean. native - if set to true - Select component will use native browser select picker (not rendered by Material UI lib ).
disabled - if set to true - action on component will not be possible.
-17
View File
@@ -1,17 +0,0 @@
---
'@backstage/core-components': patch
'@backstage/plugin-catalog': patch
'@backstage/plugin-circleci': patch
'@backstage/plugin-cloudbuild': patch
'@backstage/plugin-github-actions': patch
'@backstage/plugin-gitops-profiles': patch
'@backstage/plugin-jenkins': patch
'@backstage/plugin-lighthouse': patch
'@backstage/plugin-org': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-search': patch
'@backstage/plugin-sentry': patch
'@backstage/plugin-sonarqube': patch
---
Prefer using `Link` from `@backstage/core-components` rather than material-UI.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-jenkins-backend': patch
---
feature: add crumbIssuer option to Jenkins (optional) configuration, improve the UI to show a notification after executing the action re-build
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-jenkins': patch
---
feature: add crumbIssuer option to Jenkins (optional) configuration, improve the UI to show a notification after executing the action re-build
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder': patch
---
Add DescriptionField override to support Markdown
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-permission-node': patch
---
Add `ServerPermissionClient`, which implements `PermissionAuthorizer` from @backstage/plugin-permission-common. This implementation skips authorization entirely when the supplied token is a valid backend-to-backend token, thereby allowing backend-to-backend systems to communicate without authorization.
The `ServerPermissionClient` should always be used over the standard `PermissionClient` in plugin backends.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-app-api': patch
---
Schema-validate local storage cached session info on load
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-plugin-api': minor
---
Removed deprecated types `ApiRefType` and `ApiRefsToTypes`