97 Commits

Author SHA1 Message Date
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 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
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 173ef97b48 Address second round of PR review comments
- Close async iterators in ModelHolder after reading first value to
  prevent resource leaks
- Catch exceptions from validateMetaSchema in Zod refine predicate
  so validation errors flow through Zod's normal issue reporting
- Warn on duplicate catalog model layer IDs instead of silently
  dropping later entries
- Replace `as any` with `as JsonObject` for schema import in
  scaffolder template model layer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 13:59:39 +02:00
Fredrik Adelöw 445aefd4b9 Address PR review comments
- Remove unused deps @backstage/filter-predicates and zod-validation-error
  from catalog-model
- Deduplicate defaultCatalogEntityModel by re-exporting from the single
  source in model/defaultCatalogEntityModel.ts
- Fix typos: "Retuns"/"epxressed", "Obviopusly", "recorsively"
- Use domain-prefixed layer ID for scaffolder template model

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-14 13:41:22 +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
Ben Lambert e8736ea2e8 feat(scaffolder): implementing secrets schema for scaffolder templates (#32320)
* feat: implementing secrets schema for scaffolder templates

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

* chore: fix and regenerate openapi
Signed-off-by: benjdlambert <ben@blam.sh>

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

* chore: fix review feedback

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

* fix: address code review feedback for secrets validation

- Extract validateSecrets helper to deduplicate validation logic
- Add auditorEvent.fail() call on secrets validation failure
- Sanitize instance field in error responses to prevent secret leakage
- Add retry endpoint test coverage for secrets validation
- Split changeset into per-package entries

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

* refactor: nest secrets schema under secrets.schema

Move the JSON Schema definition from spec.secrets to
spec.secrets.schema to leave room for future extensions
like secret sources.

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

* chore: update API reports

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

* chore: use InputError for secrets validation audit event

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

---------

Signed-off-by: benjdlambert <ben@blam.sh>
2026-03-10 11:47:40 +01:00
Aramis Sennyey 0fbcf23714 feat: add support for OpenAPI 3.1 (#32300)
* breaking: add support for OpenAPI 3.1

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* add changeset

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* update nullable prop

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* remove more allowReserved usages

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* make changes less breaking

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* Apply suggestion from @aramissennyeydd

Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>

---------

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
2026-02-28 09:04:02 -05:00
Andre Wanlin 527cf88a90 Integration - Removed long deprecated code
Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed lock file

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

Improve changesets

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

Removed link

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

Update .changeset/sharp-ravens-shop.md

Co-authored-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>

Update .changeset/six-trees-carry.md

Co-authored-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>

Update .changeset/tiny-zoos-smash.md

Co-authored-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>

Corrected gerrit changes based on feedback

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

Updated API report

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

Fixed some tests

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

Fixed test

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

Fixed another test

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

Removed parseGerritGitilesUrl

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

Table clean up

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

Remove from changeset

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

Changes based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-02-27 12:50:00 -06:00
Ben Lambert f598909f0f feat(scaffolder): implement scaffolderServiceRef for credentials aware communication (#33044)
* add scaffolderServiceRef to scaffolder-node

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

* make ScaffolderApi methods required, add tests

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

* use request objects for single-string params in ScaffolderService

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

* add scaffolderServiceMock test utility

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

* adjust review comments

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

* add scaffolderApiMock test utility to scaffolder-react

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

* use items/totalItems response shape for listTasks

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

* pass credentials through for autocomplete

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

---------

Signed-off-by: benjdlambert <ben@blam.sh>
2026-02-27 16:24:49 +00:00
benjdlambert df41cf9557 chore: cleanup breaking change
Signed-off-by: benjdlambert <ben@blam.sh>
2025-07-29 13:24:48 +02:00
solimant 2ea0997446 Capture 403 errors
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:37 +00:00
solimant 0afb6e8e4f Remove deprecated ActionExample
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:36 +00:00
solimant 563ff4da0b Add ListTemplatingExtensions
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:36 +00:00
solimant e8e0f8e276 Relocate client
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:36 +00:00
solimant c475f8c4a0 Revert limit and offset test change
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:35 +00:00
solimant ac5613f635 Fix OpenAPI spec linting
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:35 +00:00
solimant 68eca7b9a0 Fix API report
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:35 +00:00
solimant 29d8a18841 Fix tests
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:34 +00:00
solimant 9d2bd50113 Pull some types from the spec
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:34 +00:00
solimant d2da49c568 Deprecate and re-export
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:34 +00:00
Kashish Mittal 152ae1e3c5 feat: initial implementation of scaffolder granular permissions
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
Co-authored-by: Frank Kong <frkong@redhat.com>
2025-06-18 16:18:33 -04:00
Tyler Davis c6a08fe954 Add support for lifecycle in template entities
Signed-off-by: Tyler Davis <tylerd@canva.com>
2025-03-16 20:49:41 +11:00
Fredrik Adelöw 09cf03890c scaffolder: got rid of most backend-common usages
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2025-03-03 11:47:40 +01:00
blam 7e3ca8be71 feat: more work on form decorators
Signed-off-by: blam <ben@blam.sh>
2024-11-25 16:12:43 +01:00
blam 88746203aa chore: hooks -> decorators
Signed-off-by: blam <ben@blam.sh>
2024-11-25 16:12:42 +01:00
blam aee334c14c feat: implemented useFormHooks hook for calling hooks on create
Signed-off-by: blam <ben@blam.sh>
2024-11-25 16:12:42 +01:00
blam 189201ef4b wip: start to implement the hooks
Signed-off-by: blam <ben@blam.sh>
2024-11-25 16:12:42 +01:00
Stephen Glass 28e222bbd8 Apply suggestions from code review
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
Signed-off-by: Stephen Glass <stephen@stephen.glass>
2024-11-06 15:45:39 -05:00
Stephen Glass f61d4ccc2f add scaffolder permission for template management
Signed-off-by: Stephen Glass <stephen@stephen.glass>
2024-10-06 20:18:34 -04:00
Frank Kong 2ba6e52f40 chore: remove action read scaffolder permission
Signed-off-by: Frank Kong <frkong@redhat.com>
2024-05-07 12:02:17 -04:00
Frank Kong ea7cb44de5 chore: apply suggestions
Signed-off-by: Frank Kong <frkong@redhat.com>
2024-05-02 22:36:30 -04:00
Frank Kong b1fbdebcc7 Merge branch 'master' into add-additional-scaffolder-permissions
Signed-off-by: Frank Kong <50030060+Zaperex@users.noreply.github.com>
2024-05-02 09:02:19 -04:00
bnechyporenko 9156654290 Capturing more event clicks for scaffolder
Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
2024-04-27 20:59:32 +02:00
Frank Kong a7b500bd08 feat(scaffolder): added permissions to backend endpoints
Signed-off-by: Frank Kong <frkong@redhat.com>
2024-04-25 17:24:33 -04:00
Frank Kong 9ee832c5a9 feat(scaffolder): add additional scaffolder task permissions
Signed-off-by: Frank Kong <frkong@redhat.com>
2024-04-25 17:24:18 -04:00
bnechyporenko 8e221cfc48 Merge remote-tracking branch 'origin/master' into rec-tasks-version-1
# Conflicts:
#	plugins/scaffolder-common/src/Template.v1beta3.schema.json
2024-01-16 13:05:00 +01:00
bnechyporenko 11b9a08e92 Recoverable tasks [version 1]
Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
2024-01-14 16:24:05 +01:00
bnechyporenko 04a57a034d wip
Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
2024-01-14 15:02:10 +01:00
bnechyporenko 331389fccd wip
Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
2024-01-14 15:02:10 +01:00
bnechyporenko 398b44907c Updated Template.v1beta3.schema.json, added a missing "presentation" field
Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
2024-01-14 15:02:10 +01:00
Bogdan Nechyporenko 5cdcf77a45 Updated to a presentation
Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
2023-10-23 11:05:30 +02:00
Bogdan Nechyporenko c35bb33065 Merge remote-tracking branch 'origin/master' into configure-template
# Conflicts:
#	plugins/scaffolder-react/api-report.md
#	plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx
2023-10-23 10:19:10 +02:00
Bogdan Nechyporenko 4db0d9903c Make it possible to define control buttons text (Back, Create, Review) per template
Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
2023-10-16 14:47:46 +02:00
Bogdan Nechyporenko b5dcf6b120 Make it possible to define control buttons text (Back, Create, Review) per template
Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
2023-10-16 14:18:37 +02:00
Federico Morreale 2e0cef42ab fix: add missing required property in template schema
Signed-off-by: Federico Morreale <frc.morreale@gmail.com>
2023-10-12 17:06:45 +02:00
Bogdan Nechyporenko 2e2b1f94e0 Make it possible to configure certain tings per template
Signed-off-by: Bogdan Nechyporenko <bnechyporenko@bol.com>
2023-10-09 17:41:26 +02:00
Alex Eftimie a0303ee5ef scaffolder: enable each property on task step (#8890)
Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
2023-06-07 03:46:41 +02:00