Commit Graph

71064 Commits

Author SHA1 Message Date
Fredrik Adelöw cd0c36ffde docs: Fix inverted owner relation type in descriptor format docs
The `spec.owner` relation tables for all entity kinds incorrectly listed
`ownerOf` as the generated relation with `ownedBy` as the reverse. The
entity emitting the relation is owned by the target, so the outgoing
relation is `ownedBy` and the reverse is `ownerOf`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-03-01 11:17:56 +01:00
Patrik Oldsberg 03f7e74fe1 Merge pull request #33036 from backstage/rugvip/cli-execute-loader
cli: add lazy loader pattern for command execution
2026-02-27 15:36:12 +01:00
Patrik Oldsberg 992e37b93f repo-tools: Use randomUUID for temp files and document sequential execution
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 14:56:22 +01:00
Johan Persson 9027b10643 fix(ui): fix scroll overflow in Menu and Select popovers
When viewport height constrains the popover, content now scrolls
instead of overflowing.

- Menu: add flex column layout and overflow hidden to .bui-MenuInner
- Select: add overflow auto and min-height 0 to .bui-SelectList

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-02-27 14:35:30 +01:00
Patrik Oldsberg acb2714ca8 Merge pull request #33025 from backstage/rugvip/move-transform-tests
cli: move transform tests into the build module
2026-02-27 14:08:22 +01:00
Patrik Oldsberg 03f5009aae Merge pull request #33020 from kurtaking/kurtaking/metrics-alpha-docs
docs: metrics service alpha
2026-02-27 13:18:53 +01:00
Patrik Oldsberg c3e8286bf6 Merge pull request #32562 from Believe-SA/package-workspaces
chore: replace legacy package.json workspaces.packages by workspaces
2026-02-27 12:58:53 +01:00
Patrik Oldsberg 9810310781 Update changeset messages per review feedback
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 12:56:54 +01:00
Johan Persson 33324d45ac docs(ui): clarify module-scoped singleton in useBreakpoint
Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-02-27 12:32:31 +01:00
Johan Persson f10b3b8d7d refactor(ui): simplify useBreakpoint singleton store
Initialize listeners as an eager Set to eliminate the undefined union
type and non-null assertions. Add comment explaining the change listener
algorithm.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-02-27 12:32:31 +01:00
Johan Persson cd3cb0f35a chore: add changeset for useBreakpoint performance improvement
Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-02-27 12:32:31 +01:00
Johan Persson b39c2d3893 perf(ui): rewrite useBreakpoint with singleton useSyncExternalStore
Replace per-instance useState + matchMedia pattern with a module-level
singleton that shares 6 matchMedia listeners across all callers.
Reduces listener count from 18×N to a fixed 6.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-02-27 12:32:31 +01:00
Johan Persson 154492c05f chore(ui): add use-sync-external-store dependency
Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-02-27 12:32:31 +01:00
Gabriel Dugny 3187a7a441 Merge remote-tracking branch 'origin/master' into package-workspaces 2026-02-27 12:05:03 +01:00
Gabriel Dugny 37a309e7e2 Update .changeset/slow-items-pull.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Gabriel Dugny <gabriel@dugny.me>
2026-02-27 12:04:16 +01:00
Patrik Oldsberg aac8cd4cc2 repo-tools: Strip ANSI codes and set NO_COLOR for CLI report extraction
Cleye outputs ANSI bold escape sequences around section headers
(e.g. Usage:, Flags:) unconditionally, which prevented the help
page parser from recognizing them. Strip ANSI SGR sequences from
captured output and set NO_COLOR=1 in the child environment.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 10:45:56 +01:00
Patrik Oldsberg f2a8299d7a repo-tools: Log all command outputs for debugging
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 10:33:15 +01:00
Patrik Oldsberg 3a1054f51d repo-tools: Log stdout content when help markers missing
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 10:21:09 +01:00
Patrik Oldsberg b7c9a8df12 repo-tools: Add module-level debug log to verify util.ts is loaded
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 10:11:23 +01:00
Patrik Oldsberg f586daee1f repo-tools: Add debug logging for empty stdout in createBinRunner
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 09:59:15 +01:00
Patrik Oldsberg 2481126013 Remove setBlocking calls and simplify file-redirect approach
Remove fragile process.stdout._handle.setBlocking calls from CLI test
commands. Revert the preload workaround in repo-tools since the root
cause is removed.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 08:48:19 +01:00
Patrik Oldsberg 5e01ab714a repo-tools: Add _handle stub preload for file-backed stdout
Add a --require preload that stubs process.stdout._handle when stdout is
a SyncWriteStream (file-backed). Some CLI code accesses _handle.setBlocking
directly and would crash without the stub.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 08:46:44 +01:00
Patrik Oldsberg d9dde597c9 repo-tools: Redirect child stdout to file for CLI reports
Use a temp file instead of a pipe for child process stdout in
createBinRunner. Node.js uses a SyncWriteStream for regular files, so
all writes complete synchronously before process.exit() can discard them.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 01:21:53 +01:00
Patrik Oldsberg a2653cd112 Update repo-tools changeset to cover spawnSync change
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 00:08:23 +01:00
Patrik Oldsberg b4fea2bc29 repo-tools: Use spawnSync for CLI report extraction
Use spawnSync instead of spawn for child processes in createBinRunner.
This avoids stdout data loss when child processes call process.exit()
before Node.js flushes its internal stream buffer to the pipe.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 00:08:22 +01:00
Patrik Oldsberg fab449cf9e cli: lint fix
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-02-27 00:08:18 +01:00
Patrik Oldsberg bf97fecaf7 Merge pull request #33019 from backstage/rugvip/nfs-entity-page-group-aliases-and-ordering
catalog: add group aliases and configurable content ordering to entity page
2026-02-26 23:34:17 +01:00
Fredrik Adelöw 858eb3755c Merge pull request #33037 from backstage/freben/by-refs-predicate-query
feat(catalog): Add predicate-based filtering to the by-refs endpoint
2026-02-26 22:35:27 +01:00
Fredrik Adelöw 3880820c62 fix: clean up filter merging logic and add combined filter+query test
- Replace incorrect Object.keys-on-array guard with direct filter
  conversion, matching the pattern used in getEntityFacetsByPredicate
- Add backend router test covering combined filter query param + body
  query predicate being forwarded independently to entitiesBatch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-02-26 21:59:36 +01:00
Fredrik Adelöw ec411a01ae feat: add query predicate support to InMemoryCatalogClient
Adds support for the `query` field in `getEntitiesByRefs` and
`getEntityFacets` on InMemoryCatalogClient, matching the backend
behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-02-26 21:50:33 +01:00
Fredrik Adelöw 2ffb23df02 Update packages/catalog-client/src/CatalogClient.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-02-26 21:26:33 +01:00
Fredrik Adelöw 5aea009edd refactor: simplify entitiesBatchRequest to use filterPredicateSchema directly
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-02-26 21:11:06 +01:00
Fredrik Adelöw 972f686958 feat(catalog): Add predicate-based filtering to the by-refs endpoint
Adds support for predicate-based filtering (`$all`, `$any`, `$not`,
`$exists`, `$in`, `$contains`, `$hasPrefix`) to the catalog
`/entities/by-refs` endpoint via a `query` field in the request body.

The existing `filter` query parameter behavior is preserved for backward
compatibility. The `query` predicate is only used when explicitly
provided, and when both `filter` and `query` are given, they are merged
with `$all`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-02-26 21:03:25 +01:00
Fredrik Adelöw d0e5ccc92e Merge pull request #33031 from backstage/worktree-catalog-updates
feat(catalog): Add predicate-based filtering to the facets endpoint
2026-02-26 20:37:48 +01:00
Patrik Oldsberg d5779e525c Fix CLI report generation and --help handling for loader-based commands
Add cleye-based --help handling to all commands using the loader pattern.
Update the CLI report parser to support cleye's USAGE: and FLAGS: sections.
Revert accidental backstage.role addition to eslint-plugin.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-26 20:31:55 +01:00
Patrik Oldsberg 0d2d0f2e07 Add lazy loader pattern for CLI command execution
Extend `BackstageCommand.execute` to accept either a direct function or a
`{ loader }` object for lazy loading command implementations. Convert
several build and migrate commands to use the new pattern. Switch from
`program.parse` to `program.parseAsync` to properly await async actions.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-26 19:56:57 +01:00
Patrik Oldsberg 6b8395d1d8 Merge pull request #33034 from backstage/rugvip/fix-form-fields-api-export
scaffolder-react: export formFieldsApiRef
2026-02-26 19:24:05 +01:00
Fredrik Adelöw f2401e9bda Merge pull request #33032 from thomvaill/fix-devtools-trigger-task-urlencoding
fix(devtools): URL-encode task IDs when triggering scheduled tasks
2026-02-26 19:23:41 +01:00
Patrik Oldsberg 6b70a2abcf Apply suggestions from code review
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-26 19:09:44 +01:00
Patrik Oldsberg 4a9b189125 Add .patches entry for patch release
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-26 18:31:50 +01:00
Patrik Oldsberg 743e4e3a1b Remove scaffolder changeset, note API signature change
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-26 18:31:18 +01:00
Patrik Oldsberg 33cc7b218e Address review feedback on changesets
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-26 18:15:08 +01:00
Patrik Oldsberg 004b5c1208 Move formFieldsApiRef and ScaffolderFormFieldsApi to scaffolder-react
The formFieldsApiRef and ScaffolderFormFieldsApi type are now defined and
exported from @backstage/plugin-scaffolder-react/alpha, and re-exported
from @backstage/plugin-scaffolder/alpha for backwards compatibility.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-26 18:06:57 +01:00
Fredrik Adelöw 105befbbf0 fix(catalog): only route facets to POST when query predicate is present
Preserve backward compatibility by keeping filter-only requests on the
existing GET endpoint. Only route to POST when query is present, matching
the pattern used by queryEntities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-02-26 17:13:47 +01:00
Fredrik Adelöw 4c4632ce1b test(catalog): add GET /entity-facets backward compatibility test with filter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-02-26 17:13:01 +01:00
thomvaill afabb37104 fix(devtools): urlencode task IDs when calling trigger route
Signed-off-by: thomvaill <thomvaill@bluebricks.dev>
2026-02-26 16:50:57 +01:00
Fredrik Adelöw 12b790d3c3 chore: remove working plan documents
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-02-26 16:31:22 +01:00
Fredrik Adelöw 56c908eed5 chore: add changesets and API reports for facets predicate support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-02-26 16:25:31 +01:00
Fredrik Adelöw bd179b0d3b feat(catalog): route facets requests to POST when query is present
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-02-26 16:21:24 +01:00
Fredrik Adelöw be6c10ef8c test(catalog): add tests for POST /entity-facets endpoint
Add unit tests for parseEntityFacetsQuery covering valid inputs (simple
queries, complex predicate queries, no query) and error cases (missing
facets, empty facets, invalid query types). Add route-level tests for
both GET and POST /entity-facets in createRouter.test.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-02-26 16:21:12 +01:00