inclusive terms

Signed-off-by: aaronbraundmeier@gmail.com <aaronbraundmeier@gmail.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
aaronbraundmeier@gmail.com
2022-11-22 15:42:03 -06:00
committed by Fredrik Adelöw
parent 30f860ce6e
commit 8015ff1258
30 changed files with 49 additions and 38 deletions
+11
View File
@@ -0,0 +1,11 @@
---
'@backstage/backend-common': patch
'@backstage/cli': patch
'@backstage/cli-common': patch
'@backstage/core-app-api': patch
'@backstage/core-components': patch
'@backstage/dev-utils': patch
'@techdocs/cli': patch
---
Tweaked wording to use inclusive terminology
@@ -48,7 +48,7 @@ Once you've saved the action, you should see an authentication flow be triggered
### Frontend
The Backstage App needs a SignInPage when authentication is required.
When using ALB authentication Backstage will only be loaded once the user has successfully authenticated; we won't need to display a SignIn page, however we will need to create a dummy SignIn component that can refresh the token.
When using ALB authentication Backstage will only be loaded once the user has successfully authenticated; we won't need to display a SignIn page, however we will need to create a placeholder SignIn component that can refresh the token.
- edit `packages/app/src/App.tsx`
- import the following two additional definitions from `@backstage/core-plugin-api`: `useApi`, `configApiRef`; these will be used to check whether Backstage is running locally or behind an ALB
@@ -59,7 +59,7 @@ import React from 'react';
import { UserIdentity } from '@backstage/core-components';
import { SignInPageProps } from '@backstage/core-app-api';
const DummySignInComponent: any = (props: SignInPageProps) => {
const SampleSignInComponent: any = (props: SignInPageProps) => {
const [error, setError] = React.useState<string | undefined>();
const config = useApi(configApiRef);
React.useEffect(() => {
@@ -102,13 +102,13 @@ const DummySignInComponent: any = (props: SignInPageProps) => {
};
```
- add `DummySignInComponent` as `SignInPage`:
- add `SampleSignInComponent` as `SignInPage`:
```ts
const app = createApp({
...
components: {
SignInPage: DummySignInComponent,
SignInPage: SampleSignInComponent,
...
},
...
+1 -1
View File
@@ -54,7 +54,7 @@ begun work on various aspects of all three phases. Looking at the
[milestones for active issues](https://github.com/backstage/backstage/milestones)
will also give you a sense of our progress.
### My company doesn't have thousands of developers or services. Is Backstage overkill?
### My company doesn't have thousands of developers or services. Is using Backstage excessive for our needs?
Not at all! A core reason to adopt Backstage is to standardize how software is
built at your company. It's easier to decide on those standards as a small
@@ -10,7 +10,7 @@ description: Architecture Decision Record (ADR) for Luxon Date Library
Date formatting (e.g. `a day ago`) and calculations are common within Backstage.
Some of these useful features are not supported by the standard JavaScript
`Date` object. The popular [Moment.js](https://momentjs.com/) library has been
commonly used to fill this gap but suffers from large bundle sizes and mutable
commonly used to fill this gap but is affected by large bundle sizes and mutable
state issues. On top of this, `momentjs` is
[being sunset](https://momentjs.com/docs/#/-project-status/) and the project
recommends using one of the more modern alternative libraries.
+1 -1
View File
@@ -63,7 +63,7 @@ export default async function createPlugin(
// and the access token and produces the Backstage token with the
// relevant user info.
async resolver({ profile, result }, ctx) {
// Somehow compute the Backstage token claims. Just some dummy code
// Somehow compute the Backstage token claims. Just some sample code
// shown here, but you may want to query your LDAP server, or
// https://<teamName>.cloudflareaccess.com/cdn-cgi/access/get-identity
// https://developers.cloudflare.com/cloudflare-one/identity/users/validating-json/#groups-within-a-jwt
+1 -1
View File
@@ -70,7 +70,7 @@ export default async function createPlugin(
// and the IAP token and produces the Backstage token with the
// relevant user info.
async resolver({ profile, result: { iapToken } }, ctx) {
// Somehow compute the Backstage token claims. Just some dummy code
// Somehow compute the Backstage token claims. Just some sample code
// shown here, but you may want to query your LDAP server, or
// GSuite or similar, based on the IAP token sub/email claims
const id = iapToken.email.split('@')[0];
+1 -1
View File
@@ -256,7 +256,7 @@ bash-5.1# exit
The database pod is running, but how does another pod connect to it?
Kubernetes pods are transient - they can be killed, restarted, or created
Kubernetes pods are transient - they can be stopped, restarted, or created
dynamically. Therefore we don't want to try to connect to pods directly, but
rather create a Kubernetes Service. Services keep track of pods and direct
traffic to the right place.
@@ -50,7 +50,7 @@ components need to be in a known machine-readable format so we can build further
tooling and analysis on top.
APIs have a visibility: they are either public (making them available for any
other component to consume), restricted (only available to a whitelisted set of
other component to consume), restricted (only available to an allowlisted set of
consumers), or private (only available within their system). As public APIs are
going to be the primary way interaction between components, Backstage supports
documenting, indexing and searching all APIs so we can browse them as
+1 -1
View File
@@ -260,7 +260,7 @@ development dependency only.
It can sometimes be difficult to decide where to place your plugin code. For example
should it go directly in the `-backend` plugin package or in the `-node` package?
As a rule of thumb you should try to keep the exposure of your code as low
As a general guideline you should try to keep the exposure of your code as low
as possible. If it doesn't need to be public API, it's best to avoid. If you don't
need it to be used by other plugins, then keep it directly in the plugin packages.
+1 -1
View File
@@ -51,7 +51,7 @@ terminal window, now run
curl localhost:7007/carmen/health
```
This should return `{"status":"ok"}`. Success! Press `Ctrl + c` to kill it
This should return `{"status":"ok"}`. Success! Press `Ctrl + c` to stop it
again.
## Developing your Backend Plugin
+2 -2
View File
@@ -123,7 +123,7 @@ than simply letting them know they had an invalid input.
> input change.
This piggybacks the Scalability Principle and applies primarily to frontend
development. As a general rule of thumb, frontends should be flexible enough so
development. As a general guideline, frontends should be flexible enough so
that the UX or design can change while touching the least amount of code
possible. So for example, a poor unit test would verify the color of a button
when it is hovered. This would be a poor unit test, because if you decide to
@@ -353,7 +353,7 @@ For more information:
### Accessing `store`, `theme`, routing, browser history, etc.
The Backstage application has several core providers at its root. To run your
test wrapped in a "dummy" Backstage application, you can use our utility
test wrapped in a "sample" Backstage application, you can use our utility
functions:
**`wrapInTestApp`**
+1 -1
View File
@@ -268,7 +268,7 @@ async function main() {
```
This will be run every time you restart the backend. Note that after any change
in the URL Reader code, you need to kill the backend and restart, since the
in the URL Reader code, you need to stop the backend and restart, since the
`reader` instance is memoized and does not update on hot module reloading. Also,
there are a lot of unit tests written for the URL Readers, which you can make
use of.
@@ -29,7 +29,7 @@ We started by creating a fork from React Natives open source project, applyin
The Backstage Upgrade Helper tool enables adopters to easily upgrade their Backstage app by using the power of git to create a diff between different versions.
Whenever a new version of Backstage is released, the Helper scaffolds a new dummy Backstage app using the `backstage-create-app` cli utility and checks all the generated files in a specific git branch. After the branch is generated, it gets compared with all the existing ones, which results in generating specific git patches stored in specific files. By selecting the version of the current Backstage release together with the version you want to upgrade to, the UI knows which patch file needs to be picked up.
Whenever a new version of Backstage is released, the Helper scaffolds a new sample Backstage app using the `backstage-create-app` cli utility and checks all the generated files in a specific git branch. After the branch is generated, it gets compared with all the existing ones, which results in generating specific git patches stored in specific files. By selecting the version of the current Backstage release together with the version you want to upgrade to, the UI knows which patch file needs to be picked up.
So, now you can update your Backstage application in three steps rather than manually reading the changelogs of all the Backstage modules in reverse order.
+1 -1
View File
@@ -102,7 +102,7 @@ export class CacheManager {
getClient: (opts = {}): CacheClient => {
const concreteClient = this.getClientWithTtl(pluginId, opts.defaultTtl);
// Always provide an error handler to avoid killing the process.
// Always provide an error handler to avoid stopping the process.
concreteClient.on('error', (err: Error) => {
// In all cases, just log the error.
this.logger.error(err);
@@ -133,7 +133,7 @@ describe('AwsS3UrlReader', () => {
});
};
it('creates a dummy reader without the awsS3 field', () => {
it('creates a sample reader without the awsS3 field', () => {
const entries = createReader({
integrations: {},
});
@@ -27,7 +27,7 @@ const TOKEN_EXPIRY_AFTER = Duration.fromObject({ hours: 1 });
const TOKEN_REISSUE_AFTER = Duration.fromObject({ minutes: 10 });
/**
* A token manager that issues static dummy tokens and never fails
* A token manager that issues static fake tokens and never fails
* authentication. This can be useful for testing.
*/
class NoopTokenManager implements TokenManager {
@@ -66,7 +66,7 @@ export class ServerTokenManager implements TokenManager {
private currentTokenPromise: Promise<{ token: string }> | undefined;
/**
* Creates a token manager that issues static dummy tokens and never fails
* Creates a token manager that issues static fake tokens and never fails
* authentication. This can be useful for testing.
*/
static noop(): TokenManager {
+1 -1
View File
@@ -64,7 +64,7 @@ export function findRootPath(
): string | undefined {
let path = searchDir;
// Some sanity check to avoid infinite loop
// Some confidence check to avoid infinite loop
for (let i = 0; i < 1000; i++) {
const packagePath = resolvePath(path, 'package.json');
const exists = fs.existsSync(packagePath);
+1 -1
View File
@@ -231,7 +231,7 @@ function createConfigForRole(dir, role, extraConfig = {}) {
},
restrictedImports: [
{
// Importing the entire MUI icons packages kills build performance as the list of icons is huge.
// Importing the entire MUI icons packages impedes build performance as the list of icons is huge.
name: '@material-ui/icons',
message: "Please import '@material-ui/icons/<Icon>' instead.",
},
+1 -1
View File
@@ -82,7 +82,7 @@ async function getProjectConfig(targetPath, displayName) {
let closestPkgJson = undefined;
let currentPath = targetPath;
// Some sanity check to avoid infinite loop
// Some confidence check to avoid infinite loop
for (let i = 0; i < 100; i++) {
const packagePath = path.resolve(currentPath, 'package.json');
const exists = fs.pathExistsSync(packagePath);
@@ -31,7 +31,7 @@ describe('formatErrorMessage with esbuild plugin error', () => {
plugin: 'esbuild',
message: 'test',
id: 'index.js',
errors: [{ text: 'Dummy', location: { line: 1, column: 1 } }],
errors: [{ text: 'Sample', location: { line: 1, column: 1 } }],
});
expect(msg).toContain('test\n\n');
});
+1 -1
View File
@@ -114,7 +114,7 @@ export function forwardFileImports(options: ForwardFileImportsOptions): Plugin {
return false;
}
// Sanity check, dunno if this can happen
// Confidence check, dunno if this can happen
if (!importer) {
throw new Error(`Unknown importer of file module ${id}`);
}
@@ -80,7 +80,7 @@ describe('LinkedPackageResolvePlugin', () => {
const callbackFalse = jest.fn();
tap(
{
request: 'dummy',
request: 'sample',
path: false,
},
'some-context',
+1 -1
View File
@@ -116,7 +116,7 @@ function getBasePath(configApi: Config) {
function readBasePath(configApi: ConfigApi) {
let { pathname } = new URL(
configApi.getOptionalString('app.baseUrl') ?? '/',
'http://dummy.dev', // baseUrl can be specified as just a path
'http://sample.dev', // baseUrl can be specified as just a path
);
pathname = pathname.replace(/\/*$/, '');
return pathname;
@@ -80,7 +80,7 @@ const useBaseUrl = () => {
*/
const useBasePath = () => {
// baseUrl can be specified as just a path
const base = 'http://dummy.dev';
const base = 'http://sample.dev';
const url = useBaseUrl() ?? '/';
const { pathname } = new URL(url, base);
return trimEnd(pathname, '/');
@@ -23,7 +23,7 @@ export default {
};
const text =
'Lorem Ipsum is simply dummy text of the printing and typesetting industry.';
'Lorem Ipsum is simply sample text of the printing and typesetting industry.';
export const Default = () => (
<Box maxWidth="200px">
+1 -1
View File
@@ -912,7 +912,7 @@
### Patch Changes
- 5aa4ceea6: Make sure to provide dummy routes for all external routes of plugins given to DevApp
- 5aa4ceea6: Make sure to provide sample routes for all external routes of plugins given to DevApp
- Updated dependencies [3a58084b6]
- Updated dependencies [e799e74d4]
- Updated dependencies [dc12852c9]
+5 -5
View File
@@ -165,9 +165,9 @@ export class DevAppBuilder {
* Build a DevApp component using the resources registered so far
*/
build(): ComponentType<{}> {
const dummyRouteRef = createRouteRef({ id: 'dummy' });
const DummyPage = () => <Box p={3}>Page belonging to another plugin.</Box>;
attachComponentData(DummyPage, 'core.mountPoint', dummyRouteRef);
const fakeRouteRef = createRouteRef({ id: 'fake' });
const FakePage = () => <Box p={3}>Page belonging to another plugin.</Box>;
attachComponentData(FakePage, 'core.mountPoint', fakeRouteRef);
const apis = [...this.apis];
if (!apis.some(api => api.api.id === scmIntegrationsApiRef.id)) {
@@ -188,7 +188,7 @@ export class DevAppBuilder {
for (const plugin of this.plugins ?? []) {
const targets: Record<string, RouteRef<any>> = {};
for (const routeKey of Object.keys(plugin.externalRoutes)) {
targets[routeKey] = dummyRouteRef;
targets[routeKey] = fakeRouteRef;
}
bind(plugin.externalRoutes, targets);
}
@@ -215,7 +215,7 @@ export class DevAppBuilder {
</Sidebar>
<FlatRoutes>
{this.routes}
<Route path="/_external_route" element={<DummyPage />} />
<Route path="/_external_route" element={<FakePage />} />
</FlatRoutes>
</SidebarPage>
</AppRouter>
@@ -64,7 +64,7 @@ describe('end-to-end', () => {
afterEach(async () => {
// On Windows the pid of a spawned process may be wrong
// Because of this, we should be kill the MKDocs after the test
// Because of this, we should stop the MKDocs after the test
// (e.g. https://github.com/nodejs/node/issues/4289#issuecomment-854270414)
if (process.platform === 'win32') {
const procs = await findProcess('name', 'mkdocs', true);
+1 -1
View File
@@ -63,7 +63,7 @@ export const run = async (
return childProcess;
};
// Block indefinitely and wait for a signal to kill the child process(es)
// Block indefinitely and wait for a signal to stop the child process(es)
// Throw error if any child process errors
// Resolves only when all processes exit with status code 0
export async function waitForSignal(
+1 -1
View File
@@ -1170,7 +1170,7 @@
### Minor Changes
- bc9d62f4f: Move the sanity checks of the publisher configurations to a dedicated `PublisherBase#getReadiness()` method instead of throwing an error when doing `Publisher.fromConfig(...)`.
- bc9d62f4f: Move the confidence checks of the publisher configurations to a dedicated `PublisherBase#getReadiness()` method instead of throwing an error when doing `Publisher.fromConfig(...)`.
You should include the check when your backend to get early feedback about a potential misconfiguration:
```diff