2907 Commits

Author SHA1 Message Date
github-actions[bot] 68db890456 Version Packages (next) 2026-05-26 15:26:38 +00:00
github-actions[bot] b97fcb0a93 Version Packages 2026-05-19 18:28:24 +00:00
github-actions[bot] 42a2f56e61 Version Packages (next) 2026-05-12 18:28:01 +00:00
Ben Lambert dbeb7aab3e feat(scaffolder): add BUI theme for scaffolder forms (#33053)
* feat(scaffolder): add BUI theme for scaffolder forms

Add a Backstage UI (BUI) form theme as an alternative to the Material
UI theme. Toggled via formProps.theme or enableBackstageUi page config.

Includes BUI widgets, templates, field extension variants, and a ported
React Aria Autocomplete component.

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

* refactor(scaffolder): use BUI Combobox and CheckboxGroup for form widgets

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

* chore(scaffolder): enable BUI form flag and add kitchen sink demo template

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

* fix(scaffolder): use outlined input style for BUI form widgets

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

* fix(scaffolder): address BUI form PR feedback

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

* fix(scaffolder): format CSS and regen API reports

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

---------

Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-12 10:35:21 +02:00
Ben Lambert 8006acf89a feat(scaffolder): promote formDecorators out of experimental (#34180)
* feat(scaffolder): promote formDecorators out of experimental

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

* fix(scaffolder): parse form decorator input through the configured zod schema

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

* refactor(scaffolder-backend): emit single formDecorators field on the parameter-schema response

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

* feat(scaffolder): promote form decorator blueprints to public API

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

---------

Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-11 11:29:36 +02:00
Fredrik Adelöw 213c6807d9 Merge pull request #33991 from jtbry/master
fix(SecureTemplater): return dispose function to clean up secure temp…
2026-05-07 17:15:23 +03:00
Justin Bryant 964bc8694f fix: run prettier
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-05-06 10:04:32 -04:00
Justin Bryant 4bcbd8245b Merge branch 'master' into master
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-05-06 09:49:24 -04:00
Andre Wanlin 2f33a9f63f Fixes for non-breaking typos and typos configuration
Signed-off-by: Andre Wanlin <awanlin@spotify.com>

More

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-04-29 16:54:05 -05:00
github-actions[bot] 7295193bb6 Version Packages (next) 2026-04-28 15:53:09 +00:00
Ferin Patel 07e08beac1 feat: Add status check functions for scaffolder steps (#32890)
* feat: Add status check functions for scaffolder steps

- Introduced `always()` and `failure()` functions to control step execution after failures.
- Updated documentation to explain usage of new status check functions.
- Enhanced NunjucksWorkflowRunner to process these functions in step conditions.
- Added tests to verify behavior of steps using `always()` and `failure()`.

Signed-off-by: ferin79 <ferinpatel79@gmail.com>

* feat: Enhance status check functions in scaffolder steps

- Updated documentation to clarify usage of status check functions with template expressions.
- Modified tests to reflect changes in syntax for status checks.
- Refactored NunjucksWorkflowRunner to ensure proper handling of status check functions in step conditions.

Signed-off-by: ferin79 <ferinpatel79@gmail.com>

* docs: Clarify usage of status check functions in writing templates

- Removed redundant explanation about truthy conditions after step failure.
- Streamlined the description for better clarity on status check functions.

Signed-off-by: ferin79 <ferinpatel79@gmail.com>

---------

Signed-off-by: ferin79 <ferinpatel79@gmail.com>
2026-04-28 11:16:59 +02:00
Fredrik Adelöw e9b78e9698 Remove uuid dependency in favor of crypto.randomUUID()
The uuid package dropped its CommonJS entry point in v14, making it
incompatible with Backstage's CJS build output and Jest test runner.
Rather than working around the ESM-only issue, replace all usage with
the built-in crypto.randomUUID() which has been available in Node.js
since v16.7 and in all major browsers since March 2022.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-23 10:51:43 +02:00
Fredrik Adelöw 8521de1d46 Merge pull request #33122 from johnmcollier/filterstatustasks
feat(scaffolder): Allow filtering by status in scaffolderService.listTasks
2026-04-22 10:27:36 +02:00
github-actions[bot] 1cc86bee1c Version Packages (next) 2026-04-21 15:07:43 +00:00
Justin Bryant 80c5481a44 fix: run prettier
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-04-17 18:02:53 -04:00
Justin Bryant 575b7cca3f Merge branch 'master' of github.com:jtbry/backstage 2026-04-17 17:44:50 -04:00
Justin Bryant ac64f0ad04 fix(SecureTemplater): implement PR suggestions
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-04-17 17:44:35 -04:00
Justin Bryant f32100a977 Update plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-04-17 17:43:38 -04:00
Justin Bryant 6d6c7f64a6 Update plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-04-17 17:43:25 -04:00
Justin Bryant 191ea13578 Update plugins/scaffolder-backend/src/lib/templating/SecureTemplater.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-04-17 17:43:07 -04:00
Justin Bryant ff13613d32 Merge branch 'master' of github.com:backstage/backstage
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-04-17 17:32:16 -04:00
Justin Bryant 6a73fff696 fix(SecureTemplater): implement PR suggestions
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-04-17 17:26:10 -04:00
Justin Bryant f063176143 Update plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/templateFileActionHandler.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-04-17 17:26:10 -04:00
Justin Bryant b7da1160fb Update plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-04-17 17:26:10 -04:00
Justin Bryant 4fb8469d37 fix(SecureTemplater): return dispose function to clean up secure templater isolate vm & context
Signed-off-by: Justin Bryant <justintbry@gmail.com>
2026-04-17 17:26:10 -04: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
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
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 61454d9a0c scaffolder-backend: remove unused hasProperty permission rule
The hasProperty rule was not included in the scaffolderActionRules export
or the public API report. Remove it and its associated tests.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-13 16:51:10 +02:00
Suhrid Marwah 1d95cd302d test(scaffolder): add test for after=0 query param handling
Signed-off-by: Suhrid Marwah <suhridmarwah07@gmail.com>
2026-04-09 10:54:11 +05:30
suhr25 4ec08648d7 Merge branch 'master' of https://github.com/backstage/backstage into fix/scaffolder-after-zero-query-param 2026-04-09 10:50:16 +05:30
Suhrid Marwah 6408e4aa8a fix(scaffolder): handle after=0 in task events polling endpoint
Signed-off-by: Suhrid Marwah <suhridmarwah07@gmail.com>
2026-04-09 10:27:15 +05:30
github-actions[bot] 6c10d88c13 Version Packages (next) 2026-04-07 15:30:58 +00:00
Patrik Oldsberg adf228cb16 Merge pull request #33720 from backstage/rugvip/add-to-error-utility
errors: add `toError` utility and migrate usages
2026-04-07 12:00:01 +02:00
Ben Lambert 5af48e77af feat(scaffolder): Migrate scaffolder to use permissions registry (#33740)
* feat(scaffolder-node): add PermissionResourceRef definitions for scaffolder resource types

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

* feat(scaffolder-backend): migrate to PermissionsRegistryService with fallback

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

* feat(scaffolder-backend): wire permissionsRegistry in ScaffolderPlugin

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

* test(scaffolder-backend): verify permissions metadata endpoint returns all scaffolder permissions

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

* chore: add changesets for scaffolder permissions registry migration

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

* chore: format scaffolder-node alpha exports

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

* fix: correct scaffolder-node changeset to patch for sub-1.0 package

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

* refactor(scaffolder-backend): simplify by removing fallback path and making permissionsRegistry required

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

* chore: update scaffolder-node API report

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

---------

Signed-off-by: benjdlambert <ben@blam.sh>
2026-04-06 19:10:43 +02:00
Andre Wanlin 6e6eff9b90 Fixes
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-04-03 12:28:56 -05:00
Patrik Oldsberg b2319ffe45 errors: add toError utility and migrate assertError usages
Add a `toError` utility function to `@backstage/errors` that converts
unknown values to `ErrorLike` objects. If the value is already error-like
it is returned as-is. Strings are used directly as the error message, and
other values are stringified with a fallback to JSON.stringify to avoid
unhelpful `[object Object]` messages.

Non-error causes passed to `CustomErrorBase` are now converted and stored
using `toError` rather than discarded. Existing `assertError` call sites
across the codebase are migrated to `toError`.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-03 10:16:23 +02:00
Kurt King b37a79ef5b Merge branch 'master' of https://github.com/backstage/backstage into migrate-scaffolder-to-metrics-service 2026-04-02 22:47:04 -06:00
github-actions[bot] a2cb332e25 Version Packages (next) 2026-03-31 15:30:51 +00:00
Stephanie Cao 309b7128c4 feat(scaffolder): create scaffolder mcp action to execute a template (#33124)
* create mcp action to execute a template

Signed-off-by: Stephanie <yangcao@redhat.com>

* include changeset

Signed-off-by: Stephanie <yangcao@redhat.com>

* address test errors and review comments from copilot

Signed-off-by: Stephanie <yangcao@redhat.com>

* address review comments

Signed-off-by: Stephanie <yangcao@redhat.com>

* add execute-template to mcp actions list

Signed-off-by: Stephanie <yangcao@redhat.com>

* fix: address review feedback for execute-template action

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

---------

Signed-off-by: Stephanie <yangcao@redhat.com>
Signed-off-by: benjdlambert <ben@blam.sh>
Co-authored-by: benjdlambert <ben@blam.sh>
2026-03-25 16:30:49 +01:00
Kurt King 90aadc6499 Be more specific in metric descriptions
Signed-off-by: Kurt King <kurtaking@gmail.com>
2026-03-24 17:44:02 -06:00
Kurt King 088454063c unpuralize run
Signed-off-by: Kurt King <kurtaking@gmail.com>
2026-03-24 17:37:27 -06:00
Kurt King 61f754504b Add type to tracker
Signed-off-by: Kurt King <kurtaking@gmail.com>
2026-03-24 17:28:00 -06:00
Ben Lambert 4559806b96 feat(actionsRegistry): Adding support for examples (#33551)
* feat(backend-plugin-api): add typed examples to actions registry

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

* fix: address review feedback for actions registry examples

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

* fix: remove empty examples from scaffolder action bridge

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

* chore: add changeset for scaffolder-backend

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

* fix: update router test to match removed examples field

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

---------

Signed-off-by: benjdlambert <ben@blam.sh>
2026-03-24 18:16:23 +01:00
github-actions[bot] c1b510cabb Version Packages (next) 2026-03-24 14:54:00 +00:00
Kurt King 961e274548 refactor: use MetricsService
Signed-off-by: Kurt King <kurtaking@gmail.com>
2026-03-23 23:37:58 -06:00
Fredrik Adelöw 884b8691b0 Merge pull request #33305 from backstage/renovate/wait-for-expect-4.x
chore(deps): update dependency wait-for-expect to v4
2026-03-20 10:26:36 +01:00
github-actions[bot] 5725b5fcfa Version Packages 2026-03-17 21:39:07 +00:00
Gabriel Dugny 0257363c51 Allow zod v3 or v4 dependency (keep using v3)
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
2026-03-17 16:48:42 +01:00