Commit Graph

72691 Commits

Author SHA1 Message Date
Patrik Oldsberg 26537124e0 Merge pull request #33665 from backstage/rugvip/docs-notifications-new-frontend
docs: migrate notifications docs to new frontend system
2026-03-30 16:42:19 +02:00
Patrik Oldsberg 014ba202ba Merge pull request #33670 from backstage/rugvip/app-routes-redirect-config
plugin-app: add redirect config to app/routes extension
2026-03-30 16:40:37 +02:00
Fredrik Adelöw 0a51db2547 Merge pull request #33676 from backstage/freben/catalog-search-table-sync
catalog: Reduce search table write churn during stitching
2026-03-30 16:27:23 +02:00
Fredrik Adelöw 9da73bf599 catalog: Reduce search table write churn during stitching
Replace the bulk DELETE + INSERT of all search rows with a minimal sync
that only touches rows that actually changed:

- Postgres: single writable CTE with unnest — DELETE stale rows and
  INSERT new ones in one atomic statement using snapshot isolation
- MySQL: temporary table merge with deadlock retry (errno 1213)
- SQLite: unchanged bulk replace (sufficient for dev/test)

For a typical user entity with ~200 search rows where one annotation
changed, this reduces the operation from ~400 row writes to ~2.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-30 16:01:37 +02:00
Charles de Dreuille 293bd67c64 Merge pull request #33675 from backstage/fix/storybook-apptheme-api
fix(storybook): register appThemeApiRef in Storybook API providers
2026-03-30 13:55:46 +01:00
Patrik Oldsberg baa72405ac Fix root path redirect matching all routes
Special-case `from: '/'` in redirect config to use an exact path match
instead of the `/*` wildcard, which would match the entire app.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-30 14:46:18 +02:00
Patrik Oldsberg 6cabf73736 Merge pull request #33669 from backstage/rugvip/docs-getting-started-new-frontend
docs: migrate getting-started docs to new frontend system
2026-03-30 14:40:34 +02:00
Charles de Dreuille 3bd5a0c7b8 Improve Toast setup
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-03-30 13:13:23 +01:00
Fredrik Adelöw aa8c802cf2 Merge pull request #33672 from backstage/freben/kebabs
remove some cli deprecation warnings
2026-03-30 13:42:46 +02:00
Charles de Dreuille 4dab043bd5 Update Toast.stories.tsx
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-03-30 12:05:12 +01:00
Patrik Oldsberg 0f8b40ddc5 docs: address copilot review comments
Add installation example for extraIcons in the customize-theme guide
and fix "productional code" typo in quickstart-app-plugin--old.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-30 12:57:47 +02:00
Charles de Dreuille cf2de9c8b8 Update Toast.stories.tsx
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-03-30 11:56:42 +01:00
Charles de Dreuille b651807e56 fix(storybook): replace require() with ESM import in Toast stories
The RealAlertApiStory component used require('@backstage/core-plugin-api')
inside the function body. Vite bundles Storybook as ESM, where require is
not available at runtime, causing a ReferenceError. Replace with a
standard top-level import.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-03-30 11:55:27 +01:00
Charles de Dreuille e21dd5edc4 fix(storybook): register appThemeApiRef in Storybook API providers
Add AppThemeSelector as an implementation for appThemeApiRef in the
shared Storybook API registry. Without this, any story that renders
a ToastContainer fails with NotImplementedError for core.apptheme.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-03-30 11:49:34 +01:00
Patrik Oldsberg 769fa96fe8 docs: address review feedback on notifications docs
Use dynamic import pattern for SubPageBlueprint loader instead of
Promise.resolve, and fix missing comma in TypeScript example.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-30 12:36:27 +02:00
Charles de Dreuille ac9286767c Merge pull request #33673 from backstage/bui-manifest
Improve BUI manifest
2026-03-30 11:34:01 +01:00
Patrik Oldsberg 964e8f9779 Update docs/notifications/index--old.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-30 12:30:11 +02:00
Patrik Oldsberg b70d3ca1ab Update docs/notifications/index.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-30 12:30:04 +02:00
Charles de Dreuille 6d120233a2 Update Table.tsx
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-03-30 11:19:43 +01:00
Charles de Dreuille dd880df9f0 Update report.api.md
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-03-30 11:18:03 +01:00
Charles de Dreuille dc009ed8a9 Improve BUI manifest
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-03-30 11:02:31 +01:00
Fredrik Adelöw e7f90f47a8 Update packages/cli-module-test-jest/src/commands/repo/test.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-03-30 11:53:54 +02:00
Fredrik Adelöw d3b8c370e1 Update docs/tooling/cli/03-commands.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-03-30 11:53:30 +02:00
Fredrik Adelöw 6cc48113fc remove some cli deprecation warnings
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-30 09:44:30 +02:00
Patrik Oldsberg 4a01a66da3 docs: document app/routes redirect configuration
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-30 01:36:07 +02:00
Patrik Oldsberg e5baa20a1b plugin-app: add redirect config to app/routes extension
Allow users to configure URL redirects on the app/routes extension
through app-config. Redirects are specified as an array of {from, to}
path pairs in the extension config schema.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-30 00:34:56 +02:00
Patrik Oldsberg 15ab64be96 docs: fix relative link depth in customize-theme guide
The previous fix overshot the directory traversal — three levels up
escapes the docs root. Use two levels (`../../`) to correctly reach the
frontend-system migration guide from golden-path/create-app/.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-29 22:49:58 +02:00
Patrik Oldsberg dce631e6f7 docs: fix broken relative link in customize-theme guide
Fix the relative path to the sidebar customization section in the
migration guide, which was missing two levels of directory traversal.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-29 22:39:53 +02:00
Patrik Oldsberg 7c1b319e74 docs: migrate getting-started docs to new frontend system
Migrate four documentation pages to use the new frontend system as the
primary content, moving the old frontend system instructions to --old
files following the established convention:

- configure-app-with-plugins: rewrite for auto-discovered plugins
- customize-theme: rewrite for ThemeBlueprint/extension-based theming
- enable-public-entry: make new frontend system the primary content
- quickstart-app-plugin: remove manual sidebar wiring instructions

Each main file gets an info banner linking to the --old variant, and
each --old file gets a banner linking back to the current guide.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-29 21:35:17 +02:00
Patrik Oldsberg 2ad2771944 docs: migrate notifications docs to new frontend system
Rewrite the notifications documentation pages to target the new
frontend system as the primary content, and move the old frontend
system instructions to --old files following the established convention.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-29 21:30:48 +02:00
Fredrik Adelöw 0336f92de8 Merge pull request #33658 from backstage/freben/clarify-fetch-failures
Add FetchMiddlewares.clarifyFailures and improve permission error handling
2026-03-29 12:51:04 +02:00
Fredrik Adelöw 0eb8d1a31f Merge pull request #33290 from backstage/freben/catalog-exists-query-optimization
catalog-backend: optimize entity filter queries with EXISTS
2026-03-29 12:48:38 +02:00
Fredrik Adelöw 4538f05b24 Address PR review: extract shared searchExists helper and rename strategy
- Extract shared `searchExists` helper into `searchSubquery.ts` to avoid
  duplicate EXISTS subquery logic between the two filter modules
- Rename `applyInStrategy` to `applyExistsStrategy` to reflect the actual
  query shape
- Update block comment with correct EXISTS SQL examples
- Remove unused `strategy` parameter from `applyEntityFilterToQuery`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-29 12:31:01 +02:00
Patrik Oldsberg 9f3affb864 Merge pull request #33601 from thomvaill/github-provider-fix-validateLocationsExist-with-branch-filter
fix(github-provider): `validateLocationsExist: true` + `filters.branch` bug [contribfest]
2026-03-29 12:14:23 +02:00
Fredrik Adelöw d19e32ccad Use duck-typing for Request check and make clarification best-effort
Replace instanceof Request with a duck-type isRequestLike helper to
avoid cross-realm issues, and wrap the clarification logic in a
try/catch so it can never mask the original error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-29 10:30:22 +02:00
Fredrik Adelöw 741d367817 Merge pull request #33659 from backstage/freben/parallelize-cli-reports 2026-03-29 08:23:49 +02:00
Fredrik Adelöw 688481429c catalog-backend: optimize entity filter queries with EXISTS
Switch filter query builders from IN (subquery) to EXISTS (correlated
subquery) patterns. This enables PostgreSQL semi-join optimizations
(stops at first match) and replaces NOT IN with NOT EXISTS (faster,
no NULL-semantics pitfalls).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-28 22:45:48 +01:00
Fredrik Adelöw 8278540c60 Fix pLimit type and remove trailing comma in error message
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-28 18:27:53 +01:00
Fredrik Adelöw 8e9679b3eb Parallelize CLI report generation in repo-tools
Converts createBinRunner from spawnSync to async spawn, and processes
all CLI packages concurrently with a shared p-limit limiter bounded
by CPU count. Reduces wall-clock time from ~50s to ~12s.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-28 17:48:33 +01:00
Fredrik Adelöw c38610bd9d Address review feedback: add cast rationale, drop redundant assertError
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-28 17:07:00 +01:00
Fredrik Adelöw cba19b13de Avoid new Request() in catch to prevent disturbed body errors
Extracts method/url directly from the input instead of constructing
a new Request in the catch block, which could fail if the body was
already consumed. Also adds a test with Request object input.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-28 17:04:02 +01:00
Fredrik Adelöw 18c3dbadd6 Update packages/core-app-api/src/apis/implementations/FetchApi/ClarifyFailuresFetchMiddleware.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-03-28 17:01:07 +01:00
Fredrik Adelöw 9f1ac04765 Update packages/core-app-api/src/apis/implementations/FetchApi/ClarifyFailuresFetchMiddleware.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-03-28 17:00:56 +01:00
Fredrik Adelöw 400aa2313a Add FetchMiddlewares.clarifyFailures and improve permission error handling
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-28 16:55:33 +01:00
Patrik Oldsberg 0cb1189130 workflows: add Discord notification for ready PRs (#33655)
* workflows: add Discord notification for ready PRs

Adds a new workflow that posts to Discord whenever a pull request is
opened as non-draft or marked as ready for review. Uses jq to safely
construct the JSON payload and sends it via curl to a webhook URL
stored in repository secrets.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

* workflows: harden Discord webhook notification

Add early guard for missing webhook secret, disable Discord mention
parsing to prevent abuse via PR titles/bodies, and check the HTTP
response to surface webhook failures.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

* workflows: upgrade github-script to v8 and truncate embed title

Align actions/github-script pin with the rest of the repo (v8.0.0)
and truncate the Discord embed title to the 256-character limit to
prevent webhook failures on long PR titles.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor

---------

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-03-28 15:44:47 +01:00
backstage-goalie[bot] 781815fd25 Merge pull request #33654 from backstage/renovate/npm-path-to-regexp-vulnerability
chore(deps): update dependency path-to-regexp to v8.4.0 [security]
2026-03-28 11:43:31 +00:00
renovate[bot] 299e189a3f chore(deps): update dependency path-to-regexp to v8.4.0 [security]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-28 11:02:42 +00:00
Fredrik Adelöw 524d733762 Merge pull request #33651 from backstage/freben/remove-jest-when-dep
Remove unused jest-when dependency from scaffolder-backend-module-rails
2026-03-28 11:53:44 +01:00
Fredrik Adelöw 54f9639f3b Merge pull request #33650 from backstage/freben/simplify-create-route-ref-types
Simplify createRouteRef type signature
2026-03-28 11:20:45 +01:00
Fredrik Adelöw 2905c5931d Remove unused jest-when dev dependency from scaffolder-backend-module-rails
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-28 11:16:00 +01:00