Skip to content

Commit 051643d

Browse files
committed
chore: update Backstage to 1.31.2
1 parent 1f79435 commit 051643d

File tree

20 files changed

+1106
-104
lines changed

20 files changed

+1106
-104
lines changed

.github/workflows/ci.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616
build:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2020
with:
2121
fetch-depth: 0
22-
- uses: actions/setup-node@v3
22+
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
2323
with:
24-
node-version: '18.x'
25-
- run: yarn install
24+
node-version: '20.x'
25+
- run: yarn install --immutable
2626
- run: yarn lint
2727
- run: yarn tsc
2828
#- run: yarn test

.github/workflows/publish.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
fetch-depth: 0
1212
- uses: actions/setup-node@v3
1313
with:
14-
node-version: '18.x'
14+
node-version: '20.x'
1515
- run: yarn install
1616
- run: |
1717
cd backstage-plugin-pulumi

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ coverage
2121
# Dependencies
2222
node_modules/
2323

24-
# Yarn 3 files
24+
# Yarn files
2525
.pnp.*
2626
.yarn/*
2727
!.yarn/patches

.yarn/releases/yarn-4.4.1.cjs

+925
Large diffs are not rendered by default.

.yarnrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.4.1.cjs

app-config.production.yaml

+18-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
app:
2-
# Should be the same as backend.baseUrl when using the `app-backend` plugin.
1+
app: # Should be the same as backend.baseUrl when using the `app-backend` plugin.
32
baseUrl: http://localhost:7007
43

5-
backend:
6-
# Note that the baseUrl should be the URL that the browser and other clients
4+
backend: # Note that the baseUrl should be the URL that the browser and other clients
75
# should use when communicating with the backend, i.e. it needs to be
86
# reachable not just from within the backend host, but from all of your
97
# callers. When its value is "http://localhost:7007", it's strictly private
@@ -30,10 +28,22 @@ backend:
3028

3129
auth:
3230
providers:
33-
guest: null
31+
guest: {}
3432

35-
catalog:
36-
# Overrides the default list locations from app-config.yaml as these contain example data.
33+
catalog: # Overrides the default list locations from app-config.yaml as these contain example data.
3734
# See https://backstage.io/docs/features/software-catalog/#adding-components-to-the-catalog for more details
3835
# on how to get entities into the catalog.
39-
locations: []
36+
locations: # Local example data, replace this with your production config, these are intended for demo use only.
37+
# File locations are relative to the backend process, typically in a deployed context, such as in a Docker container, this will be the root
38+
- type: file
39+
target: ./examples/entities.yaml
40+
# Local example template
41+
- type: file
42+
target: ./examples/template/template.yaml
43+
rules:
44+
- allow: [Template]
45+
# Local example organizational data
46+
- type: file
47+
target: ./examples/org.yaml
48+
rules:
49+
- allow: [User, Group]

app-config.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,10 @@ catalog:
9999
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
100100
# rules:
101101
# - allow: [User, Group]
102+
103+
kubernetes:
104+
# see https://backstage.io/docs/features/kubernetes/configuration for kubernetes configuration options
105+
# see https://backstage.io/docs/permissions/getting-started for more on the permission framework
106+
permission:
107+
# setting this to `false` will disable permissions
108+
enabled: true

backstage.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "1.28.4"
2+
"version": "1.31.2"
33
}

lerna.json

-6
This file was deleted.

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"node": "18 || 20"
77
},
88
"scripts": {
9-
"dev": "concurrently \"yarn start\" \"yarn start-backend\"",
9+
"dev": "yarn workspaces foreach -A --include backend --include app --parallel -v -i run start",
1010
"start": "yarn workspace app start",
1111
"start-backend": "yarn workspace backend start",
1212
"build:backend": "yarn workspace backend build",
@@ -30,7 +30,7 @@
3030
]
3131
},
3232
"devDependencies": {
33-
"@backstage/cli": "^0.26.10",
33+
"@backstage/cli": "^0.27.1",
3434
"@backstage/e2e-test-utils": "^0.1.1",
3535
"@playwright/test": "^1.32.3",
3636
"@spotify/prettier-config": "^12.0.0",
@@ -53,5 +53,6 @@
5353
"*.{json,md}": [
5454
"prettier --write"
5555
]
56-
}
56+
},
57+
"packageManager": "yarn@4.4.1"
5758
}

packages/app/package.json

+27-26
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,33 @@
1414
"lint": "backstage-cli package lint"
1515
},
1616
"dependencies": {
17-
"@backstage/app-defaults": "^1.5.7",
18-
"@backstage/catalog-model": "^1.5.0",
19-
"@backstage/cli": "^0.26.10",
20-
"@backstage/core-app-api": "^1.13.0",
21-
"@backstage/core-components": "^0.14.8",
22-
"@backstage/core-plugin-api": "^1.9.3",
23-
"@backstage/integration-react": "^1.1.28",
24-
"@backstage/plugin-api-docs": "^0.11.6",
25-
"@backstage/plugin-catalog": "^1.21.0",
26-
"@backstage/plugin-catalog-common": "^1.0.24",
27-
"@backstage/plugin-catalog-graph": "^0.4.6",
28-
"@backstage/plugin-catalog-import": "^0.12.0",
29-
"@backstage/plugin-catalog-react": "^1.12.1",
30-
"@backstage/plugin-org": "^0.6.26",
31-
"@backstage/plugin-permission-react": "^0.4.23",
32-
"@backstage/plugin-scaffolder": "^1.22.0",
33-
"@backstage/plugin-scaffolder-react": "^1.9.0",
34-
"@backstage/plugin-search": "^1.4.13",
35-
"@backstage/plugin-search-react": "^1.7.12",
36-
"@backstage/plugin-techdocs": "^1.10.6",
37-
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.11",
38-
"@backstage/plugin-techdocs-react": "^1.2.5",
39-
"@backstage/plugin-user-settings": "^0.8.8",
40-
"@backstage/theme": "^0.5.6",
4117
"@backstage-community/plugin-github-actions": "^0.6.16",
4218
"@backstage-community/plugin-tech-radar": "^0.7.4",
19+
"@backstage/app-defaults": "^1.5.11",
20+
"@backstage/catalog-model": "^1.7.0",
21+
"@backstage/cli": "^0.27.1",
22+
"@backstage/core-app-api": "^1.15.0",
23+
"@backstage/core-components": "^0.15.0",
24+
"@backstage/core-plugin-api": "^1.9.4",
25+
"@backstage/integration-react": "^1.1.32",
26+
"@backstage/plugin-api-docs": "^0.11.10",
27+
"@backstage/plugin-catalog": "^1.23.1",
28+
"@backstage/plugin-catalog-common": "^1.1.0",
29+
"@backstage/plugin-catalog-graph": "^0.4.10",
30+
"@backstage/plugin-catalog-import": "^0.12.4",
31+
"@backstage/plugin-catalog-react": "^1.13.1",
32+
"@backstage/plugin-kubernetes": "^0.11.14",
33+
"@backstage/plugin-org": "^0.6.30",
34+
"@backstage/plugin-permission-react": "^0.4.26",
35+
"@backstage/plugin-scaffolder": "^1.25.1",
36+
"@backstage/plugin-scaffolder-react": "^1.12.1",
37+
"@backstage/plugin-search": "^1.4.17",
38+
"@backstage/plugin-search-react": "^1.8.0",
39+
"@backstage/plugin-techdocs": "^1.10.10",
40+
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.15",
41+
"@backstage/plugin-techdocs-react": "^1.2.8",
42+
"@backstage/plugin-user-settings": "^0.8.13",
43+
"@backstage/theme": "^0.5.7",
4344
"@material-ui/core": "^4.12.2",
4445
"@material-ui/icons": "^4.9.1",
4546
"@pulumi/backstage-plugin-pulumi": "^0.1.0",
@@ -51,12 +52,12 @@
5152
"react-use": "^17.2.4"
5253
},
5354
"devDependencies": {
54-
"@backstage/test-utils": "^1.5.7",
55+
"@backstage/test-utils": "^1.6.0",
5556
"@playwright/test": "^1.32.3",
57+
"@testing-library/dom": "^9.0.0",
5658
"@testing-library/jest-dom": "^6.0.0",
5759
"@testing-library/react": "^14.0.0",
5860
"@testing-library/user-event": "^14.0.0",
59-
"@testing-library/dom": "^9.0.0",
6061
"@types/react-dom": "*",
6162
"cross-env": "^7.0.0"
6263
},

packages/app/src/components/Root/Root.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import {
2525
} from '@backstage/core-components';
2626
import MenuIcon from '@material-ui/icons/Menu';
2727
import SearchIcon from '@material-ui/icons/Search';
28+
import { MyGroupsSidebarItem } from '@backstage/plugin-org';
29+
import GroupIcon from '@material-ui/icons/People';
2830

2931
const useSidebarLogoStyles = makeStyles({
3032
root: {
@@ -65,6 +67,11 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
6567
<SidebarGroup label="Menu" icon={<MenuIcon />}>
6668
{/* Global nav, not org-specific */}
6769
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
70+
<MyGroupsSidebarItem
71+
singularTitle="My Group"
72+
pluralTitle="My Groups"
73+
icon={GroupIcon}
74+
/>
6875
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" />
6976
<SidebarItem icon={LibraryBooks} to="docs" text="Docs" />
7077
<SidebarItem icon={CreateComponentIcon} to="create" text="Create..." />

packages/app/src/components/catalog/EntityPage.tsx

+21
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ import {
6262
PulumiComponent
6363
} from '@pulumi/backstage-plugin-pulumi';
6464

65+
import {
66+
EntityKubernetesContent,
67+
isKubernetesAvailable,
68+
} from '@backstage/plugin-kubernetes';
69+
6570
import {TechDocsAddons} from '@backstage/plugin-techdocs-react';
6671
import {ReportIssue} from '@backstage/plugin-techdocs-module-addons-contrib';
6772

@@ -183,6 +188,14 @@ const serviceEntityPage = (
183188
{cicdContent}
184189
</EntityLayout.Route>
185190

191+
<EntityLayout.Route
192+
path="/kubernetes"
193+
title="Kubernetes"
194+
if={isKubernetesAvailable}
195+
>
196+
<EntityKubernetesContent />
197+
</EntityLayout.Route>
198+
186199
<EntityLayout.Route path="/api" title="API">
187200
<Grid container spacing={3} alignItems="stretch">
188201
<Grid item md={6}>
@@ -194,6 +207,14 @@ const serviceEntityPage = (
194207
</Grid>
195208
</EntityLayout.Route>
196209

210+
<EntityLayout.Route
211+
path="/kubernetes"
212+
title="Kubernetes"
213+
if={isKubernetesAvailable}
214+
>
215+
<EntityKubernetesContent />
216+
</EntityLayout.Route>
217+
197218
<EntityLayout.Route path="/dependencies" title="Dependencies">
198219
<Grid container spacing={3} alignItems="stretch">
199220
<Grid item md={6}>

packages/backend/Dockerfile

+20-7
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
#
44
# Before building this image, be sure to have run the following commands in the repo root:
55
#
6-
# yarn install
6+
# yarn install --immutable
77
# yarn tsc
88
# yarn build:backend
99
#
1010
# Once the commands have been run, you can build the image using `yarn build-image`
1111

12-
FROM --platform=linux/amd64 node:18-bookworm-slim
12+
FROM --platform=linux/amd64 node:20-bookworm-slim
1313

14+
# Set Python interpreter for `node-gyp` to use
15+
ENV PYTHON=/usr/bin/python3
1416
RUN <<EOF
1517
## Install pulumi and set to PATH
1618
curl -fsSL https://get.pulumi.com | sh
@@ -22,14 +24,16 @@ EOF
2224
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
2325
--mount=type=cache,target=/var/lib/apt,sharing=locked \
2426
apt-get update && \
25-
apt-get install -y --no-install-recommends python3 g++ build-essential
27+
apt-get install -y --no-install-recommends python3 g++ build-essential && \
28+
rm -rf /var/lib/apt/lists/*
2629

2730
# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
2831
# in which case you should also move better-sqlite3 to "devDependencies" in package.json.
2932
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
3033
--mount=type=cache,target=/var/lib/apt,sharing=locked \
3134
apt-get update && \
32-
apt-get install -y --no-install-recommends libsqlite3-dev
35+
apt-get install -y --no-install-recommends libsqlite3-dev && \
36+
rm -rf /var/lib/apt/lists/*
3337

3438
# From here on we use the least-privileged `node` user to run the backend.
3539
USER node
@@ -39,9 +43,15 @@ USER node
3943
# If this occurs, then ensure BuildKit is enabled (`DOCKER_BUILDKIT=1`) so the app dir is correctly created as `node`.
4044
WORKDIR /app
4145

46+
# Copy files needed by Yarn
47+
COPY --chown=node:node .yarn ./.yarn
48+
COPY --chown=node:node .yarnrc.yml ./
49+
4250
# This switches many Node.js dependencies to production mode.
43-
ENV NODE_ENV production
44-
ENV PYTHON /usr/bin/python3
51+
ENV NODE_ENV=production
52+
53+
# This disables node snapshot for Node 20 to work with the Scaffolder
54+
ENV NODE_OPTIONS "--no-node-snapshot"
4555

4656
# Copy repo skeleton first, to avoid unnecessary docker cache invalidation.
4757
# The skeleton contains the package.json of each package in the monorepo,
@@ -50,7 +60,10 @@ COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar
5060
RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
5161

5262
RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid=1000 \
53-
yarn install --frozen-lockfile --production --network-timeout 300000
63+
yarn workspaces focus --all --production && rm -rf "$(yarn cache clean)"
64+
65+
# This will include the examples, if you don't need these simply remove this line
66+
COPY --chown=node:node examples ./examples
5467

5568
# Then copy the rest of the backend bundle, along with any other files we might want.
5669
COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./

packages/backend/package.json

+26-23
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,32 @@
1616
"build-image": "docker build ../.. -f Dockerfile --tag backstage"
1717
},
1818
"dependencies": {
19-
"@backstage/backend-common": "^0.23.2",
20-
"@backstage/backend-defaults": "^0.3.3",
21-
"@backstage/backend-tasks": "^0.5.26",
19+
"@backstage/backend-common": "^0.25.0",
20+
"@backstage/backend-defaults": "^0.5.0",
21+
"@backstage/backend-tasks": "^0.6.1",
2222
"@backstage/config": "^1.2.0",
23-
"@backstage/plugin-app-backend": "^0.3.70",
24-
"@backstage/plugin-auth-backend": "^0.22.8",
25-
"@backstage/plugin-auth-backend-module-github-provider": "^0.1.18",
26-
"@backstage/plugin-auth-backend-module-guest-provider": "^0.1.7",
27-
"@backstage/plugin-auth-node": "^0.4.16",
28-
"@backstage/plugin-catalog-backend": "^1.23.2",
29-
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.19",
30-
"@backstage/plugin-permission-backend": "^0.5.45",
31-
"@backstage/plugin-permission-backend-module-allow-all-policy": "^0.1.18",
32-
"@backstage/plugin-permission-common": "^0.7.14",
33-
"@backstage/plugin-permission-node": "^0.7.32",
34-
"@backstage/plugin-proxy-backend": "^0.5.2",
35-
"@backstage/plugin-scaffolder-backend": "^1.22.11",
36-
"@backstage/plugin-scaffolder-backend-module-github": "^0.3.2",
37-
"@backstage/plugin-search-backend": "^1.5.13",
38-
"@backstage/plugin-search-backend-module-catalog": "^0.1.27",
39-
"@backstage/plugin-search-backend-module-techdocs": "^0.1.26",
40-
"@backstage/plugin-search-backend-node": "^1.2.26",
41-
"@backstage/plugin-techdocs-backend": "^1.10.8",
23+
"@backstage/plugin-app-backend": "^0.3.74",
24+
"@backstage/plugin-auth-backend": "^0.23.0",
25+
"@backstage/plugin-auth-backend-module-github-provider": "^0.2.0",
26+
"@backstage/plugin-auth-backend-module-guest-provider": "^0.2.0",
27+
"@backstage/plugin-auth-node": "^0.5.2",
28+
"@backstage/plugin-catalog-backend": "^1.26.1",
29+
"@backstage/plugin-catalog-backend-module-logs": "^0.1.0",
30+
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.2.0",
31+
"@backstage/plugin-kubernetes-backend": "^0.18.6",
32+
"@backstage/plugin-permission-backend": "^0.5.49",
33+
"@backstage/plugin-permission-backend-module-allow-all-policy": "^0.2.0",
34+
"@backstage/plugin-permission-common": "^0.8.1",
35+
"@backstage/plugin-permission-node": "^0.8.3",
36+
"@backstage/plugin-proxy-backend": "^0.5.6",
37+
"@backstage/plugin-scaffolder-backend": "^1.25.0",
38+
"@backstage/plugin-scaffolder-backend-module-github": "^0.5.0",
39+
"@backstage/plugin-search-backend": "^1.5.17",
40+
"@backstage/plugin-search-backend-module-catalog": "^0.2.2",
41+
"@backstage/plugin-search-backend-module-pg": "^0.5.35",
42+
"@backstage/plugin-search-backend-module-techdocs": "^0.2.2",
43+
"@backstage/plugin-search-backend-node": "^1.3.2",
44+
"@backstage/plugin-techdocs-backend": "^1.10.13",
4245
"@pulumi/backstage-scaffolder-backend-pulumi": "^0.1.0",
4346
"@pulumi/plugin-catalog-backend-module-pulumi": "^0.1.0",
4447
"app": "link:../app",
@@ -51,7 +54,7 @@
5154
"winston": "^3.2.1"
5255
},
5356
"devDependencies": {
54-
"@backstage/cli": "^0.26.10",
57+
"@backstage/cli": "^0.27.1",
5558
"@types/dockerode": "^3.3.0",
5659
"@types/express": "^4.17.6",
5760
"@types/express-serve-static-core": "^4.17.5",

0 commit comments

Comments
 (0)