19202 Commits

Author SHA1 Message Date
Fredrik Adelöw 62dd4fc3bc Add changeset for renderInTestApp route matching fix
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-20 10:31:13 +02:00
Fredrik Adelöw a06003bc90 Switch to in-memory catalog client for entity page tests
Now that renderInTestApp properly sets up Route matching, the test can
use the real in-memory catalog client instead of jest stubs. The
in-memory client does actual ref-based lookups, verifying that
useEntityFromUrl receives correct route params end-to-end.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-20 10:28:18 +02:00
Fredrik Adelöw 95e107bc6e Wrap test element in Routes when mountedRoutes are provided
renderInTestApp disables app/routes, so the test element was rendered
without any Route matching. This meant useParams() always returned {}
even when initialRouteEntries and mountedRoutes were set — the mounted
routes only fed the route resolution API for link generation, never
created actual React Router <Route> matching for param extraction.

Wrap the test element in <Routes> with a <Route> for each mounted path
(plus a path="*" fallback), mirroring what the real AppRoutes extension
does via useRoutes(). This makes useParams() return real params when
initialRouteEntries matches a mounted route path.

Update entity page test href expectations to match the now-correct
production behavior where sub-route links resolve relative to the
matched parent Route, and replace synchronous getByTestId/getByText
with async findBy queries for lazy-loaded content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-20 09:42:47 +02:00
Fredrik Adelöw 8abfa78e4c Revert eachSupportedId guard — env var fix is sufficient
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-19 23:23:37 +02:00
Fredrik Adelöw 1cbc3241a1 fix(backend-test-utils): prevent suite crash when no databases are available
When eachSupportedId() returned an empty array, describe.each([]) would
throw and crash the entire test suite. Return a placeholder ID instead,
so individual tests fail with a clear error rather than preventing the
entire suite from running.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-19 23:19:07 +02:00
github-actions[bot] b97fcb0a93 Version Packages 2026-05-19 18:28:24 +00:00
Patrik Oldsberg 0a44fb3cb8 Merge pull request #33895 from ganievs/fix-valkey-cluster-client
fix: use iovalkey Cluster for Valkey cluster mode
2026-05-19 20:14:27 +02:00
Ben Lambert 381cf2ae10 Merge pull request #34308 from backstage/freben/cached-service-cleanup
Fix cache eviction race in CachedUserInfoService
2026-05-19 18:37:27 +02:00
Ben Lambert 359d5a502f Merge pull request #34016 from backstage/benjdlambert/api-v1beta2-mcp-server 2026-05-19 16:01:11 +02:00
Ben Lambert 484c073be9 Merge pull request #34261 from backstage/session/scheming-finch-ks70 2026-05-19 16:00:41 +02:00
Fredrik Adelöw 4b4a614c5c Guard cache eviction on identity and use createDeferred in test
Only delete the cache entry on error if the map still holds the same
promise, preventing a stale rejection from evicting a newer entry.
Also switch the test to createDeferred for readability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-19 15:26:58 +02:00
Fredrik Adelöw 6eacdc036e Merge pull request #34252 from backstage/freben/lazy-permission-user
permission: cache user info, clean up PolicyQueryUser, drop getPluginRequestToken
2026-05-19 15:20:48 +02:00
Patrik Oldsberg 1dbc1543f4 Merge pull request #34299 from backstage/rugvip/nav-item-gone
frontend-plugin-api: remove NavItemBlueprint
2026-05-19 14:44:58 +02:00
Fredrik Adelöw a9f5560b49 Address review feedback: use fake timers and type the shared cache map
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-19 14:44:28 +02:00
Andre Wanlin a07e6a31a4 Typos CLI - initial config and changes
Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed test typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed docs typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed code comment typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed remaining typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Added CI and Config

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed typo, lol

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixes and update API reports

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated test

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Minor corrections

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Removed changesets

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Refactor to make changes non-breaking

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Clean up of new typos

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Use typoed over typo'd

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Added typoed

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated API Reports

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Feedback improvement

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Refinements

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Simplify based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Reverted to handle both keys

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-05-19 07:38:06 -05:00
benjdlambert 3bf3c9d878 chore: remove unnecessary as const assertions
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:44 +02:00
benjdlambert 34e52d13e7 chore: regenerate API reports after rebase
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:35 +02:00
benjdlambert 6d98fcefe0 chore: regenerate API reports
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:35 +02:00
benjdlambert be71476943 chore: rename changeset, remove invalid example entity
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:34 +02:00
benjdlambert a674ec354d refactor: type McpServerApiEntity against ApiEntityV1alpha1
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:34 +02:00
benjdlambert 2003dcb4db refactor(catalog-model): move mcp-server model to opt-in backend module
Moves the mcp-server specType registration out of the default catalog
entity model into a separate backend module following the same pattern
as the AiResource module. Types and validators are now alpha exports.

Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:34 +02:00
benjdlambert 2a640474c2 chore: add invalid mcp-server example for validation demo
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:34 +02:00
benjdlambert 664d1da60f refactor(catalog-model): move mcp-server to v1alpha1 specType, drop v1alpha2
Registers mcp-server as a specType on v1alpha1/v1beta1 instead of
introducing a new v1alpha2 apiVersion. Adds addKindVersion to the
builder so separate layers can extend existing kinds.

Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:34 +02:00
benjdlambert 421af6a8d1 chore: add example MCP server API entity
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:34 +02:00
benjdlambert 8dd6dce9ed feat(catalog-model): add addKindVersion builder method and move v1alpha2 to own layer
Adds addKindVersion to CatalogModelLayerBuilder so layers can add
versions to an existing kind without re-declaring its metadata.
Moves v1alpha2 API registration into ApiEntityV1alpha2.ts as a
separate model layer using the new method.

Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:34 +02:00
benjdlambert fc407b805e chore: remove explanatory comments from apiEntityModel test
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:34 +02:00
benjdlambert 2cf453f328 refactor(catalog-model): rename API v1beta2 to v1alpha2
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:34 +02:00
benjdlambert dddcc0b382 chore(catalog-model): regenerate API report for v1beta2 additions
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:33 +02:00
benjdlambert 27aee3a9b1 feat(catalog-model): add API v1beta2 with mcp-server subtype
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:33 +02:00
benjdlambert 163561085b feat(catalog-model): add API v1beta2 default and mcp-server schemas
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:33 +02:00
benjdlambert 9e0572b88c refactor: move AiResource types to @backstage/catalog-model alpha
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:15:33 +02:00
benjdlambert 19f9330073 docs: document source-location annotation for skill/rule content
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 14:14:58 +02:00
Fredrik Adelöw 644adbd19a Move sweep before cache lookup to simplify expired entry handling
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-19 14:09:58 +02:00
benjdlambert a185d7e0f8 feat: restore per-type guards for union narrowing
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 12:14:25 +02:00
Patrik Oldsberg dcf850f1f5 Merge pull request #34108 from backstage/rugvip/forward-embedded-pg-config
cli-module-build: forward user config to embedded Postgres
2026-05-19 12:10:05 +02:00
benjdlambert e5671e44c0 refactor: extend default type and remove per-type guards
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 12:09:21 +02:00
Patrik Oldsberg 2a03b0798c Apply suggestion from @Rugvip
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-05-19 11:48:20 +02:00
Patrik Oldsberg 269c4f9f0d Remove legacy nav stub from renderInTestApp
Disable app/nav in the minimal test shell instead of rendering
legacy nav-item extensions. Use renderTestApp when nav behavior matters.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 11:15:31 +02:00
Patrik Oldsberg 10e5d6f8aa Remove NavItemBlueprint in favor of page-based nav discovery
Drop the deprecated NavItemBlueprint from the public API and migrate core
plugins to set title and icon on PageBlueprint instead. AppNav keeps
backward compatibility for legacy nav-item extensions via an internal
core.nav-item.target data ref.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 11:00:46 +02:00
Patrik Oldsberg 9a88d85d50 Merge pull request #34089 from backstage/otel/mcp-tools-call
feat: Instrument MCP tool calls with semantically appropriate span
2026-05-19 10:53:13 +02:00
benjdlambert 21835f6f52 feat: add rule specType with disciplines, category, and rationale
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 10:48:59 +02:00
benjdlambert 333b10c2ab refactor: move AiResource types to @backstage/catalog-model alpha
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 10:42:49 +02:00
benjdlambert 46fbd60aef refactor: rename package to @backstage/plugin-catalog-backend-module-ai-model
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 10:42:49 +02:00
benjdlambert cf29736923 refactor: rename AIResource to AiResource for PascalCase consistency
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 10:42:48 +02:00
benjdlambert 07a2ece671 feat: install AIResource module in example backend with test entities
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 10:42:48 +02:00
Patrik Oldsberg 05f13d50c0 Merge pull request #34296 from backstage/worktree-fix-e2e-tests
fix(create-app): remove disabled nav-item config that breaks custom sidebar
2026-05-19 10:40:58 +02:00
Fredrik Adelöw a29edc58fb Merge pull request #34267 from backstage/freben/describe-each-databases
tests: use describe.each for database test iteration
2026-05-19 10:24:00 +02:00
Fredrik Adelöw 50d97e714e Merge pull request #34258 from backstage/freben/mock-credentials-version
backend-test-utils: add version field to mock credentials
2026-05-19 09:24:41 +02:00
Fredrik Adelöw d325ee31d0 Merge pull request #34225 from backstage/fix/filter-predicate-mixed-operator-keys
fix(filter-predicates): reject operator keys mixed with other keys
2026-05-19 09:24:31 +02:00
benjdlambert 219cc05885 fix(create-app): remove disabled nav-item config that breaks custom sidebar
The nav-item extensions were disabled in the template config to prevent
duplicate rendering, but the custom sidebar already handles this via
nav.take(). After #33788 added filtering of disabled nav items from page
discovery, disabling them causes nav.take('page:catalog') to return
nothing, breaking the sidebar navigation.

Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-19 09:08:02 +02:00