Commit Graph

73442 Commits

Author SHA1 Message Date
Patrik Oldsberg 8330f1319a frontend-plugin-api: restore @ignore on internal utility types
Route createExtension overloads through CreateExtensionOptions so that
ResolvedExtensionInputs, VerifyExtensionFactoryOutput, VerifyExtensionAttachTo,
and RequiredExtensionIds can remain @ignore without ae-forgotten-export warnings.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 12:52:59 +02:00
aarish mansur 2143a0ee85 feat(api-docs): use catalog presentation for API titles
Signed-off-by: aarish mansur <aarishmansur@gmail.com>
2026-04-10 16:10:28 +05:30
Patrik Oldsberg effa7bf459 Fix missing changesets and tsc errors from CI
Add changesets for plugin-app and plugin-catalog-graph. Fix cross-style
merge test to use direct schema values with configSchema instead of
factory functions.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 12:26:25 +02:00
Fredrik Adelöw 18d6f00afb Mark CatalogService updateLocation addition as BREAKING PRODUCERS in changeset
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-10 12:08:28 +02:00
Patrik Oldsberg a2a6c3b72e Add migration docs and changeset for new configSchema option
Add 1.50 migration section documenting the config.schema to configSchema
migration with examples for createExtension, createExtensionBlueprint,
and makeWithOverrides. Add a separate changeset for the new feature and
update the existing breaking changeset to reference the migration docs.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 11:51:22 +02:00
Patrik Oldsberg 540a03171c Add missing changeset and test coverage for PR review gaps
Add changeset for catalog-react blueprint migration. Add tests for
cross-style config merge (configSchema + deprecated config.schema),
deprecation warning emission, and empty configSchema edge case.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 11:28:38 +02:00
Patrik Oldsberg 2d89e198bd frontend-plugin-api: remove deprecated createSchemaFromZod
The helper is no longer used internally and has been replaced by
the `configSchema` option with direct Standard Schema values.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 11:18:03 +02:00
Patrik Oldsberg 1e6d2e91ad frontend-plugin-api: thorough error message tests for portable schema
Cover zod v3, zod v4, mixed, and merged schema error messages
with exact string assertions to document the error format produced
for missing fields, type mismatches, nested paths, and multi-field
errors.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 11:13:27 +02:00
Patrik Oldsberg 3218028048 docs: update extension config schema examples to new configSchema format
Switch all documentation examples from the deprecated
`config: { schema: { field: z => z.type() } }` pattern to the new
`configSchema: { field: z.type() }` format using zod v4 imports.
Also update catalog-graph README to use current blueprint APIs.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 10:58:21 +02:00
Fredrik Adelöw e3fd1d0f8e Mark entityRef addition as breaking for Location producers in changeset
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-10 10:52:20 +02:00
Fredrik Adelöw f0d82ac4b0 Merge pull request #33834 from backstage/freben/exit
exit prerelease mode
2026-04-10 10:44:50 +02:00
Patrik Oldsberg 1ef7954725 Migrate catalog-react and app blueprints to configSchema
Move EntityCardBlueprint and EntityContentBlueprint to the new
`configSchema` option using zod v3, and AppLanguageApi to zod v4.
Fix config schema merge in `makeWithOverrides` when mixing
`configSchema` and deprecated `config.schema` sources.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 10:39:50 +02:00
Fredrik Adelöw de2eb783a0 exit prerelease mode
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-10 10:33:51 +02:00
Patrik Oldsberg 8bb8560557 frontend-plugin-api: always warn on deprecated config.schema with call site
Instead of a one-time warning, emit a deprecation warning every time
an extension is created using the deprecated `config.schema` option,
including the call site location to help track down each usage.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 10:19:51 +02:00
Patrik Oldsberg 426d1b389f frontend-plugin-api: clean up comments in createPortableSchema
Replace box-style section comments with TSDoc comments to match
the style used throughout the rest of the repository.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 10:17:35 +02:00
Patrik Oldsberg 1f80e1a5a4 frontend-plugin-api: per-field config schema with lazy JSON Schema
Replace the monolithic `createSchemaFromZod` approach with per-field
schema resolution via `createConfigSchema`. Each field is resolved
individually and eagerly validated for JSON Schema conversion support,
but the actual JSON Schema generation is deferred until first access.

`PortableSchema.schema` is now a lazy callable — it can still be
accessed as a property (backward compat, deprecated) or called as a
method returning `{ schema: JsonObject }` for the new API.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 10:13:19 +02:00
Jack Palmer 28a362f2f7 Remove unused type parameter from ExtensionPointFactoryMiddleware
The generic is no longer needed since the interface is opaque. Type
inference is handled by createExtensionPointFactoryMiddleware instead.

Signed-off-by: Jack Palmer <jackpalmer@spotify.com>
2026-04-10 09:03:12 +01:00
Patrik Oldsberg 7ff3429bda Merge pull request #33831 from drodil/get_notifications_action
feat(notifications): action to get users notifications
2026-04-10 09:42:16 +02:00
Patrik Oldsberg 0d398f3271 frontend-plugin-api: remove ConfigFieldSchema and fix API report warnings
Remove the `ConfigFieldSchema` and `ConfigSchemaRecord` types that are
no longer needed now that `configSchema` and `config.schema` each accept
only one form. The deprecated overloads now constrain directly to the
factory signature `(zImpl: typeof z) => z.ZodType`.

Also fix pre-existing API report warnings by promoting
`ResolvedExtensionInputs`, `RequiredExtensionIds`,
`VerifyExtensionFactoryOutput`, and `VerifyExtensionAttachTo` to
`@public` and exporting them from both entry points.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 09:21:40 +02:00
Hellgren Heikki 4c1fd438b3 feat(notifications): action to get users notifications
useful for mcp for example to get the daily what is going on
status.

Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2026-04-10 10:19:46 +03:00
Patrik Oldsberg 4c7905d22c frontend-plugin-api: add configSchema option and deprecate config.schema
Introduce a new top-level `configSchema` option for `createExtension`,
`createExtensionBlueprint`, `override`, and `makeWithOverrides` that
accepts Standard Schema values directly. The old `config.schema` form
is deprecated via function/method overloads so that the entire call
site gets editor strikethrough when matched.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-10 08:54:43 +02:00
Fredrik Adelöw a25a9b8573 Merge pull request #33826 from backstage/dependabot/npm_and_yarn/axios-1.15.0 2026-04-09 21:28:03 +02:00
dependabot[bot] 9b09aba3ed chore(deps-dev): bump axios from 1.14.0 to 1.15.0
Bumps [axios](https://github.com/axios/axios) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-09 18:32:42 +00:00
Patrik Oldsberg aebba3f485 Merge pull request #33426 from backstage/rugvip/rename-create-app-templates
create-app: rename template directories
2026-04-09 20:25:58 +02:00
Patrik Oldsberg 70336a127c Merge pull request #33664 from backstage/scaffolder-actions-single-table
scaffolder: migrate actions page to @backstage/ui components
2026-04-09 20:25:49 +02:00
Patrik Oldsberg 787200224e frontend-plugin-api: use @standard-schema/spec dependency instead of inlining
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 18:45:20 +02:00
Fredrik Adelöw a328fd358f Add conflict check on updateLocation and authorization tests
Prevent updating a location to a {type, target} already used by another
location, matching the invariant enforced by createLocation. Also adds
ALLOW/DENY tests for updateLocation in AuthorizedLocationService.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-09 17:21:06 +02:00
Fredrik Adelöw 5b61c2f339 Merge pull request #33822 from backstage/freben/refactor-postgres-retry-loop
refactor(backend-defaults): clean up database creation retry loop
2026-04-09 17:11:30 +02:00
Jack Palmer e782afcb3b Address PR review comments
- Make ExtensionPointFactoryMiddleware an opaque type via new
  @internal/backend package using OpaqueType from @internal/opaque
- Use options object for createExtensionPointFactoryMiddleware
- Make middleware function async (returns Promise<T>)
- Remove extensionPointFactoryMiddleware from createBackend, keep only
  on createSpecializedBackend
- Export defaultServiceFactories from @backstage/backend-defaults

Signed-off-by: Jack Palmer <jackpalmer@spotify.com>
2026-04-09 15:59:44 +01:00
Erik Miller 49cab31527 fix: use database clock and separate migrations table for slack module
Address reviewer feedback:
- Use a dedicated migrations table to avoid conflicts with the parent plugin
- Use database-native now() instead of JS Date for timestamp columns
- Use database-level interval arithmetic for cleanup retention cutoff

Signed-off-by: Erik Miller <erik.miller@gusto.com>
2026-04-09 07:59:41 -07:00
Patrik Oldsberg 23a35d1b91 frontend-plugin-api: widen config schema constraint to accept Standard Schema
Widens the TConfigSchema generic constraint in createExtension,
createExtensionBlueprint, and their override/makeWithOverrides methods
to accept both the existing zod factory form and direct Standard Schema
instances via the new ConfigFieldSchema union type.

Existing consumers are unaffected — the factory form continues to
infer concrete types through z.infer<ReturnType<...>>. Direct Standard
Schema values are accepted but infer as any in the current iteration.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 16:36:00 +02:00
Patrik Oldsberg 6541cbfc58 Remove stray package.json from create-app templates
These empty `{}` files were accidentally committed during the template
directory rename and override the properly templated package.json
generated from package.json.hbs, causing E2E tests to fail.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg 7fc1a406d2 Increase E2E timeouts for default-app template
The new frontend system app takes longer to compile and render on
Windows CI runners. Switch from port-based to URL-based server
readiness detection and increase expect timeout to 30s to avoid
flaky failures on slow runners.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg 02a0f0dfa0 Use exact match for sidebar link assertions in E2E template test
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg f746ec202a e2e-test: fix crash when app has no devDependencies
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg 491297557e Add missing package versions to test mock for default-app template
The test was updated to use the default-app template (renamed from
next-app), but the mock version list was missing packages that this
template requires such as @backstage/core-compat-api,
@backstage/frontend-defaults, @backstage/frontend-plugin-api, and
others. Also sorted the mock entries alphabetically.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:52:20 +02:00
Patrik Oldsberg d312841559 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-04-09 15:51:28 +02:00
Patrik Oldsberg 83624f080b Fix broken doc link after template directory rename
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-09 15:51:28 +02:00
Patrik Oldsberg 25418372e0 create-app: rename template directories
Rename `next-app` to `default-app` and `default-app` to `legacy-app`
to better reflect their roles.

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-09 15:51:27 +02:00
Andre Wanlin eb8a6f7291 Merge pull request #33346 from awanlin/create-app/mcp-actions
create-app - Added the `mcp-actions-backend` and the `plugin-auth` plugins
2026-04-09 08:48:17 -05:00
Andre Wanlin 72a493a56a create-app - Added the mcp-actions-backend plugin
Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Changes based on feedback

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

Minor corrections

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

Default to false

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

Corrections

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

Feedback

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

Feedback changes

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

Feedback changes

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

Added tip

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

More feedback changes

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

Fixed typos

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

Reorder auth

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-04-09 08:33:59 -05:00
Fredrik Adelöw 547258f67b refactor(backend-defaults): clean up database creation retry loop
Refactor the postgres database creation retry loop to avoid an
unnecessary sleep after the final failed attempt, and improve
readability by using named variables.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-09 15:12:07 +02:00
Ben Lambert c705d44e4b feat(cli-module-actions): improve CLI formatting, help output, and UX (#33517)
* fix(cli-module-actions): show schema flags in execute --help

When an action ID is provided with --help, fetch the action schema and
display action-specific flags. Falls back to generic help if auth fails.

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

* fix(cli-module-actions): show schema flags in execute --help and fix build errors (#33518)

* feat(cli-module-actions): improve CLI output formatting and UX

- Pretty grouped list output with colored headers and action titles
- Custom help rendering for execute --help with markdown descriptions
- Support complex schema types (object, array, union) as JSON flags
- Show server error details instead of generic status codes
- Accept multiple plugin IDs in sources add/remove

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

* fix(cli-module-auth): preserve instance metadata on re-login

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

* fix: address code review feedback

- Extract triplicated cli() config into showGenericHelp helper
- Strip ANSI escape sequences before rendering server markdown
- Configure marked-terminal extension once via lazy singleton
- Parallelize listGrouped HTTP requests with Promise.all
- Log actual error message in execute help catch block
- Fix marked version in declarations.d.ts comment
- Add tests for sourcesAdd/sourcesRemove batch operations
- Add test for execute JSON parse error path
- Add tests for login metadata preservation on re-auth

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

* fix: use RegExp constructor to satisfy no-control-regex lint rule

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

* fix: improve ANSI stripping, default info.usage, add renderMarkdown comment

- Extend stripAnsiEscapes to cover OSC, DCS, APC, PM sequences
- Default info.usage to avoid undefined in help output
- Document why marked.use() is called per invocation

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

* fix: use strip-ansi, fresh Marked instance, add allOf support

- Replace hand-rolled ANSI stripping with strip-ansi package
- Use fresh Marked instance per call instead of mutating global singleton
- Add allOf to complex type detection alongside anyOf/oneOf
- Add happy-path test for valid JSON complex flag parsing
- Bump changeset to minor for new user-facing capabilities

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

* refactor: collapse listGrouped into list on ActionsClient

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

* refactor: clean up cli-module-actions structure

- Extract shared pluginSourcesSchema into lib/pluginSources.ts
- Merge schemaToFlags and getComplexKeys into single return value
- Move CleyeFlag-to-FlagInfo conversion into format.ts
- Extract parseArgs and showActionHelp from execute command body

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

---------

Signed-off-by: benjdlambert <ben@blam.sh>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2026-04-09 13:53:44 +02:00
Claire Peng ee0c95d971 Merge pull request #33820 from backstage/clairep/update_docs_openAPI
Clairep/update docs open api
2026-04-09 12:11:56 +01:00
Claire Peng 5185e919cf delete trailing whitespace
Signed-off-by: Claire Peng <clairep@spotify.com>
2026-04-09 11:42:10 +01:00
Roland Fuszenecker 9a60dcd9fc chore: deduplicate yarn.lock
Signed-off-by: Roland Fuszenecker <roland.fuszenecker@seon.io>
2026-04-09 12:07:32 +02:00
Claire Peng da17844798 add changeset for docs updates
Signed-off-by: Claire Peng <clairep@spotify.com>
2026-04-09 10:57:56 +01:00
Claire Peng f713b2459b add note about API Base URL in api-docs plugin Readme
Signed-off-by: Claire Peng <clairep@spotify.com>
2026-04-09 10:57:56 +01:00
Claire Peng d4979b5178 add note about API Base URL in descriptor-format docs page
Signed-off-by: Claire Peng <clairep@spotify.com>
2026-04-09 10:57:56 +01:00
Fredrik Adelöw 36be7c9bd5 Merge pull request #33818 from backstage/maratd/remove-humanize-entity-ref-org
fix(org): replace deprecated humanizeEntityRef with Catalog Presentation API
2026-04-09 11:39:37 +02:00