21074 Commits

Author SHA1 Message Date
Fredrik Adelöw ead0ca27e5 chore: add changesets for duplicate dependency cleanup
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-16 10:27:10 +02:00
Patrik Oldsberg e0dc6f98de Simplify changeset message
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-15 23:03:41 +02:00
Fredrik Adelöw b0f39adb37 Merge pull request #33927 from backstage/freben/ts6-migration-test
frontend-test-utils: fix implicit any types for TypeScript 6 compatibility
2026-04-15 22:38:38 +02:00
Fredrik Adelöw 9279ea8366 frontend-test-utils: fix implicit any types for TypeScript 6 compatibility
Add explicit type annotations to `.map()` callback parameters in
`renderInTestApp` to prevent TS7006 errors with TypeScript 6, and
update `@mswjs/interceptors` to 0.39.8 within the existing version
range.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-15 22:02:18 +02:00
Patrik Oldsberg b62781fc82 Add changeset for integration package
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-15 21:03:52 +02:00
Fredrik Adelöw 04dea64eb7 Merge pull request #33897 from backstage/freben/fix-irreversible-migration
fix(catalog-backend): fix irreversible database migration down functions
2026-04-15 17:44:09 +02:00
Patrik Oldsberg 927c0039d7 repo-tools, create-app: replace duplicate error utilities with cli-common imports (#33893)
* Replace duplicate error utilities with @backstage/cli-common imports

Remove dead CustomError and ExitCodeError classes from repo-tools and
create-app, replacing them with the ExitCodeError import from
@backstage/cli-common. This fixes the instanceof check in exitWithError
so it actually catches errors thrown by cli-common's run().

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

* Add changeset for repo-tools and create-app

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

---------

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-04-15 12:39:42 +00:00
Patrik Oldsberg ba9717cf70 Merge pull request #33913 from drodil/config_schemas
fix: replace old config schemas for extensions and blueprints
2026-04-15 14:21:47 +02:00
Patrik Oldsberg d130fbc6ec Merge pull request #33918 from backstage/fix/ui-missing-react-types-table-dep
fix(ui,app): update React Aria to v1.17.0 and migrate to monopackage imports
2026-04-15 14:20:37 +02:00
Johan Persson d1be10cb89 fix(ui,app): update React Aria to v1.17.0 and migrate to monopackage imports
React Aria Components v1.17.0 consolidated individual packages
into monopackages, dropping `@react-types/table` as a transitive
dependency. This caused `TS2307` errors in new app installations
where `react-aria-components@1.17.0` was resolved.

Migrate all imports from individual `@react-aria/*` and
`@react-stately/*` packages to the `react-aria` and
`react-stately` monopackages in both `@backstage/ui` and
`@backstage/plugin-app`, and update minimum dependency versions
accordingly.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-15 12:21:23 +02:00
Patrik Oldsberg 8741e5a800 errors: add explicit name property to ServiceUnavailableError
Every CustomErrorBase subclass explicitly sets `name = 'ClassName' as const`
except ServiceUnavailableError, which relied on the constructor fallback that
reads `this.constructor.name`. This is fragile under minification. Added the
explicit name property for consistency and added a serialization round-trip test.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-15 12:20:33 +02:00
Hellgren Heikki cad156e797 fix: replace old config schemas for extensions and blueprints
to overcome a lot of warnings given during for example testing where
these extensions are used.

Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2026-04-15 12:55:27 +03:00
Patrik Oldsberg a321fc0c47 Merge pull request #33914 from backstage/cursor/fix-embedded-postgres-config-path-resolution
cli: fix config path resolution for embedded-postgres detection
2026-04-15 11:32:08 +02:00
Patrik Oldsberg ed4ee6fdfb cli: fix config path resolution for embedded-postgres detection
Resolve config paths relative to the target package directory instead
of the workspace root in readDatabaseClient, matching the behavior of
the rest of the config loading system.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-15 09:58:31 +02:00
David Josefson a42766e2f7 fix(ui): use correct dark theme selector in Dialog (#33898)
* fix(ui): use correct dark theme selector in Dialog

The Dialog component used [data-theme='dark'] while every other BUI
component and the global token system uses [data-theme-mode='dark'].
This mismatch meant the dark mode background rule never matched.

Signed-off-by: David Josefson <david.josefson@neo4j.com>

* Update .changeset/fix-dialog-dark-theme-selector.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: David Josefson <david.josefson@neo4j.com>

---------

Signed-off-by: David Josefson <david.josefson@neo4j.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-15 09:39:02 +02:00
Patrik Oldsberg 3210dbd638 Merge pull request #33782 from UsainBloot/feat/extension-point-middleware
feat(backend): add extensionPointFactoryMiddleware to createBackend
2026-04-15 01:00:53 +02:00
github-actions[bot] 93e643d142 Version Packages 2026-04-14 14:57:31 +00:00
Fredrik Adelöw 9f24941b49 Merge pull request #33663 from backstage/freben/catalog-model-extensions
Add catalog model layer system with JSON Schema based kind declarations
2026-04-14 16:29:01 +02:00
Fredrik Adelöw 3e291ae523 Rename schema imports to jsonSchema and remove stale changeset
Rename the JSON schema imports in kind definitions from `schema` to
`jsonSchema` to enable shorthand property syntax. Also remove the
stale scaffolder-backend changeset since that package no longer has
changes in this PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 15:44:11 +02:00
Fredrik Adelöw 49d12d31c1 Rename templateModelLayer to scaffolderCatalogModelLayer
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 15:41:08 +02:00
Fredrik Adelöw b33f8450b5 fix(catalog-backend): fix irreversible database migration down functions
Five migration down functions were broken, causing the SQL report to flag
them as not reversible. All issues were pre-existing bugs that were never
caught because the down migrations had never been exercised under the
reversibility checker.

- 20241003170511: add .notNullable() to both up and down when altering
  locations.target, preventing the NOT NULL constraint from being silently
  dropped by knex's .alter() when widening varchar(255) to text.
- 20220116144621: implement a real down function that recreates the three
  dropped legacy tables (entities, entities_search, entities_relations)
  with correct columns and indices.
- 20210302150147: drop dependent tables in the correct order to avoid a
  FK constraint violation, and fix a typo (references → refresh_state_references).
- 20201005122705: drop full_name from entities (not entities_search), and
  restore entities_unique_name with the correct column order (kind, name, namespace).
- 20200702153613: use table.integer('generation') instead of table.string()
  in the down function to restore the correct column type.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-14 14:54:42 +02:00
Fredrik Adelöw 4114d4b955 Clarify that ModelProcessor has no effect on default catalog usage
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 14:39:44 +02:00
Shamil Ganiev d00a44bc12 fix: use iovalkey Cluster for Valkey cluster mode
Signed-off-by: Shamil Ganiev <ganiev@pm.me>
2026-04-14 15:30:31 +03:00
Dmitry Gusev 3ef6078b70 scaffolder: Support conditional if on output links and text (#33332)
* Add sample template for conditional output demo

Add a scaffolder template that exercises conditional `if` on output
links and text items, for testing issue #24805.

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Support conditional `if` on scaffolder output links and text

Add `if` property to output link and text items in scaffolder templates,
allowing template authors to conditionally show/hide output items based
on parameters or step results. Items with a falsy `if` condition are
filtered out before being sent to the frontend.

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Add changesets for conditional output feature

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Document conditional if on output links and text

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Guard against non-object items in output arrays

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Skip array items in output if-filtering destructuring

Add Array.isArray guard to prevent corrupting array items
into plain objects during the rest-destructuring step.

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Extract filterConditionalItems helper to deduplicate logic

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Align output if schema descriptions with step if semantics

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Fix docs quality check: replace 'falsy' wording

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

* Refactor filterConditionalItems to use flatMap and generics

Replace .filter().map() with a single flatMap call and make the function
generic to eliminate JsonArray casts at call sites.

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>

---------

Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
2026-04-14 14:29:04 +02:00
Stanislav Cherkasov aa08b7f135 fix(search): use sub-transaction rollback when truncating document text (#31494)
* fix: implement sub-transactions for partial rollbacks in PgSearchEngineIndexer

Signed-off-by: Stanislav Cherkasov <150145013+stanislav-c@users.noreply.github.com>

* fix: address Copilot review feedback

- Wrap sub-transaction creation in try/catch to handle failures
- Await subTx.commit() and subTx.rollback() to prevent race conditions
- Use inline eslint-disable comments instead of file-level disable
- Use mockResolvedValue for async tx.transaction mock

Signed-off-by: Stanislav Cherkasov <150145013+stanislav-c@users.noreply.github.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Signed-off-by: Stanislav Cherkasov <150145013+stanislav-c@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-14 08:28:45 -04:00
vincent c6abc52e1f feat: change resource url to comply with RFC 9728 Section 7.3 (#33855)
* feat: change oauth protected resource url to comply with RFC 9728 Section 7.3

Signed-off-by: Vincent Rittner <Vincent_R@gmx.de>

* feat: enable dynamic mcp resource paths

Signed-off-by: Vincent Rittner <Vincent_R@gmx.de>

* refactor: move url discovery in route handler

Signed-off-by: Vincent Rittner <Vincent_R@gmx.de>

* refactor: revert to upfront route registration

Signed-off-by: Vincent Rittner <Vincent_R@gmx.de>

---------

Signed-off-by: Vincent Rittner <Vincent_R@gmx.de>
2026-04-14 14:13:24 +02:00
Adam Kunicki 297302ebce scaffolder: fix NFS custom field explorer wiring (#33599)
* scaffolder: fix NFS custom field explorer wiring

Signed-off-by: Adam Kunicki <kunickiaj@gmail.com>

* refactor: use useMountEffect instead of useEffect for async execute

Signed-off-by: benjdlambert <ben@blam.sh>

---------

Signed-off-by: Adam Kunicki <kunickiaj@gmail.com>
Signed-off-by: benjdlambert <ben@blam.sh>
Co-authored-by: benjdlambert <ben@blam.sh>
2026-04-14 13:57:58 +02:00
Patrik Oldsberg d3627319a1 Merge pull request #33836 from backstage/rugvip/explore-standard-schema-decoupling
frontend-plugin-api: decouple zod dependency using Standard Schema
2026-04-14 12:27:53 +02:00
Patrik Oldsberg 1d4c1a8306 Merge pull request #33885 from Parsifal-M/patch/prefer-title
MembersListCard displayName -> title -> name
2026-04-14 10:27:35 +02:00
Fredrik Adelöw 742165a053 Merge pull request #33030 from backstage/sennyeya/mem-leak
fix(openapi-jest-utils): memory leak in proxy clean up
2026-04-14 10:23:29 +02:00
Patrik Oldsberg 05e7b1fe38 Update .changeset/clean-weeks-beg.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-04-14 10:14:47 +02:00
Peter Macdonald 64c9a20004 displayname, title, name order of preference for the memberslistcard
Signed-off-by: Peter Macdonald <peterm4c@pm.me>
2026-04-14 10:06:42 +02:00
Patrik Oldsberg 11d7130ff4 Merge pull request #33878 from backstage/rugvip/harmonize-phantom-t-getter
backend-plugin-api: harmonize phantom .T getter behavior
2026-04-14 00:54:04 +02:00
Patrik Oldsberg 47ca947279 Fix changeset wording to remove incorrect toJSON mention
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-13 23:48:27 +02:00
Patrik Oldsberg ad33d56c9e Update changeset wording
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-13 23:43:35 +02:00
Patrik Oldsberg d79072b5de Update phantom T getter doc comments and expand changeset scope
Updated doc comments on ExtensionPoint.T and ServiceRef.T to reflect
that reading the value returns null rather than throwing. Expanded the
changeset to cover all three behavioral changes in the PR.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-13 23:10:16 +02:00
Patrik Oldsberg 213ebe77cc Harmonize phantom .T getter behavior between ExtensionPoint and ServiceRef
Both `createExtensionPoint` and `createServiceRef` now consistently return
`null` from the phantom `.T` getter instead of throwing. Added `toJSON()` to
`ExtensionPoint` for parity with `ServiceRef`.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-13 22:40:36 +02:00
Patrik Oldsberg 8923d6def0 Drop Zod v3 support from new configSchema path
The new `configSchema` option now strictly requires StandardSchemaV1
values (e.g. Zod v4 or `zod/v4` from the Zod v3 package). Direct Zod
v3 schemas are no longer silently converted and will throw an error.

The deprecated `config.schema` callback path continues to work with
Zod v3 through a separate `createDeprecatedConfigSchema` function.

Also adds `createZodV4FilterPredicateSchema` to `@backstage/filter-predicates`
as a v4 counterpart to the now-deprecated v3 variant.

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
2026-04-13 21:38:28 +02:00
Patrik Oldsberg f44c6bd265 backend-test-utils: deduplicate test infrastructure readiness-polling helpers
Extract shared internal helpers to eliminate near-identical readiness
polling loops across database and cache test infrastructure:

- waitForReady: generic probe-until-ready loop used by both postgres
  and mysql database helpers
- attemptKeyvConnection: generic Keyv set/get probe loop used by redis,
  valkey, and memcached cache helpers
- startRedisLikeContainer: shared container-start for redis-protocol
  stores (redis and valkey)

Also normalizes cache timeout error formatting to use stringifyError
instead of template string coercion.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-13 20:48:35 +02:00
Jonathan Roebuck 698a835ab6 Update .changeset/auth0-federated-logout.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
2026-04-13 17:12:13 +01:00
Jonathan Roebuck 0e31e9c312 docs: clarify Auth0 logout changeset description
The original changeset implied the logout redirect only happens when
federatedLogout is true. In reality, sign-out always redirects to
Auth0's /v2/logout to clear the Auth0 session cookie. The
federatedLogout flag only controls whether the upstream IdP session
is also terminated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
2026-04-13 16:36:53 +01:00
Fredrik Adelöw e5fcfcb2cb Add catalog model layers with JSON Schema based kind declarations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-13 16:54:15 +02:00
Patrik Oldsberg 68c557b381 backend-plugin-api: tighten internal any usage (#33867)
* backend-plugin-api: tighten internal any usage

Replace internal `any` type annotations with proper types:

- Use `'root' | 'plugin'` union in DepsToInstances conditional type
  and createServiceRef implementation signature
- Use Error type guard with object cast fallback in
  isDatabaseConflictError instead of `as any`

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

* Use isError in isDatabaseConflictError

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

* Update changeset wording per review feedback

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

---------

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-04-13 14:58:03 +02:00
Patrik Oldsberg 4c09967317 Deduplicate frontend plugin/module extension collection logic (#33869)
Extract the shared extension resolution and duplicate-check logic from
createFrontendPlugin and createFrontendModule into a new
resolveExtensionDefinitions helper. Also fixes the duplicate extension
error message in createFrontendModule to say "Module" instead of
"Plugin".


Made-with: Cursor

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-04-13 13:58:59 +02:00
Patrik Oldsberg 9b57f709e9 Merge pull request #33866 from backstage/rugvip/assert-error-delegate-to-is-error
Have `assertError` delegate to `isError` in `@backstage/errors`
2026-04-13 13:49:37 +02:00
Patrik Oldsberg 5e8b8399f0 Merge pull request #33864 from backstage/rugvip/remove-unused-openapi-generator-constants
repo-tools: remove unused OpenAPI generator constants
2026-04-13 13:46:15 +02:00
Patrik Oldsberg ca2dc15b07 repo-tools: remove unused OpenAPI generator constants
Remove the unused exported constants GENERATOR_VERSION, GENERATOR_NAME,
GENERATOR_FILE, and TS_MODULE from the OpenAPI constants module. The
TS_MODULE intermediate variable is inlined into TS_SCHEMA_PATH.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-13 13:19:24 +02:00
Patrik Oldsberg 608c1e5958 Have assertError delegate to isError in @backstage/errors
Simplify the assertError implementation by delegating to isError
instead of duplicating the same validation checks.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-13 13:19:22 +02:00
Patrik Oldsberg 8055219d27 Merge pull request #33847 from backstage/rugvip/dialog-api-open
DialogApi: Add open() method, deprecate show/showModal
2026-04-13 13:04:30 +02:00
Patrik Oldsberg a2f0c72af8 Remove unused isDev constant from CLI version module (#33858)
The `isDev` export in `packages/cli/src/wiring/version.ts` was never
imported anywhere. Remove it to reduce dead code.


Made-with: Cursor

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-04-13 12:22:04 +02:00