Commit Graph

73697 Commits

Author SHA1 Message Date
backstage-goalie[bot] 254286ebd5 Merge pull request #34215 from backstage/renovate/dockerode-4.x-lockfile
chore(deps): update dependency dockerode to v4.0.12
2026-05-13 12:32:37 +00:00
Fredrik Adelöw b0ce61a8b5 Merge pull request #34202 from backstage/dependabot/npm_and_yarn/protobufjs/utf8-1.1.1
chore(deps): Bump @protobufjs/utf8 from 1.1.0 to 1.1.1
2026-05-13 13:27:14 +02:00
Fredrik Adelöw f2cb76215b Merge pull request #34167 from backstage/renovate/rspack-plugin-react-refresh-1.x-lockfile
chore(deps): update dependency @rspack/plugin-react-refresh to v1.6.2
2026-05-13 13:21:46 +02:00
renovate[bot] 5555ff6232 chore(deps): update dependency dockerode to v4.0.12
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-13 11:19:50 +00:00
Fredrik Adelöw 5da4528553 Merge pull request #34088 from backstage/renovate/actions-cache-5.x
chore(deps): update actions/cache action to v5.0.5
2026-05-13 13:19:28 +02:00
Fredrik Adelöw b6ff1ca58f Merge pull request #34083 from backstage/renovate/stefanbuck-github-issue-parser-digest
chore(deps): update stefanbuck/github-issue-parser digest to cb6e971
2026-05-13 13:19:11 +02:00
Fredrik Adelöw f96ee452f8 Merge pull request #34082 from backstage/renovate/actions-upload-artifact-digest
chore(deps): update actions/upload-artifact digest to 043fb46
2026-05-13 13:18:55 +02:00
Fredrik Adelöw 1399e136d7 Merge pull request #34073 from backstage/renovate/actions-cache-digest
chore(deps): update actions/cache digest to 27d5ce7
2026-05-13 13:18:37 +02:00
Fredrik Adelöw 9ed2f68261 Merge pull request #34163 from backstage/dependabot/npm_and_yarn/fast-uri-3.1.2
chore(deps): Bump fast-uri from 3.0.1 to 3.1.2
2026-05-13 13:15:07 +02:00
Fredrik Adelöw b6e1ecf158 Merge pull request #34166 from backstage/renovate/actions-upload-artifact-7.x
chore(deps): update actions/upload-artifact action to v7.0.1
2026-05-13 13:14:32 +02:00
Fredrik Adelöw 985fa2d8c8 Merge pull request #34212 from backstage/freben/fix-catalog-entity-page-test-flake
fix(catalog): increase test timeout and fix waitFor antipattern
2026-05-13 12:33:06 +02:00
Fredrik Adelöw 6fd90ee0a7 fix: address review feedback
- Await both tabs before asserting order in tab ordering tests
- Use findByText for icon assertions in context menu tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-05-13 12:00:48 +02:00
Fredrik Adelöw 4eb547fa12 fix: move jest.setTimeout below imports
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-05-13 11:48:17 +02:00
Fredrik Adelöw e481250793 fix(catalog): increase test timeout and replace waitFor antipattern in entity page tests
The entity page tests render the full extension tester + entity layout
component tree, which involves multiple React.lazy boundaries,
useAsyncRetry for entity fetching, and Material-UI CSS-in-JS processing
in jsdom. This makes each test inherently slow (~300-600ms) due to
jsdom's CSS engine processing MUI stylesheets during React render
cycles. Under CI load, the default 5s Jest timeout can be exceeded.

- Add jest.setTimeout(30_000) to prevent CI timeouts
- Replace waitFor(expect(getByRole(...))) antipattern with
  await expect(findByRole(...)).resolves pattern throughout

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-05-13 11:39:35 +02:00
backstage-goalie[bot] f52cbd9a89 Merge pull request #34208 from backstage/renovate/estree-1.x-lockfile
chore(deps): update dependency @types/estree to v1.0.9
2026-05-13 07:17:19 +00:00
renovate[bot] 50879e3e8e chore(deps): update dependency @types/estree to v1.0.9
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-13 06:03:44 +00:00
backstage-goalie[bot] b8183f2f98 Merge pull request #34207 from backstage/renovate/stoplight-spectral-runtime-1.x-lockfile
chore(deps): update dependency @stoplight/spectral-runtime to v1.1.5
2026-05-13 05:57:54 +00:00
renovate[bot] 9b12ba8b41 chore(deps): update dependency @stoplight/spectral-runtime to v1.1.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-13 04:44:39 +00:00
backstage-goalie[bot] 9e10997c4c Merge pull request #34206 from backstage/renovate/stoplight-spectral-rulesets-1.x-lockfile
chore(deps): update dependency @stoplight/spectral-rulesets to v1.22.1
2026-05-13 04:39:32 +00:00
dependabot[bot] 75e0a10c3b chore(deps): Bump fast-uri from 3.0.1 to 3.1.2
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.0.1 to 3.1.2.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.0.1...v3.1.2)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-13 03:26:11 +00:00
renovate[bot] 2fb5ae4c69 chore(deps): update dependency @stoplight/spectral-rulesets to v1.22.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-13 03:25:41 +00:00
backstage-goalie[bot] d0df1b372a Merge pull request #34205 from backstage/renovate/stoplight-spectral-functions-1.x-lockfile
chore(deps): update dependency @stoplight/spectral-functions to v1.10.2
2026-05-13 03:20:47 +00:00
renovate[bot] 876cabf31d chore(deps): update dependency @stoplight/spectral-functions to v1.10.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-13 02:09:29 +00:00
backstage-goalie[bot] 2974681fa8 Merge pull request #34204 from backstage/renovate/stoplight-spectral-formatters-1.x-lockfile
chore(deps): update dependency @stoplight/spectral-formatters to v1.5.1
2026-05-13 02:02:41 +00:00
renovate[bot] 6cb7d2b12e chore(deps): update dependency @stoplight/spectral-formatters to v1.5.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-13 01:19:50 +00:00
backstage-goalie[bot] ea223011c8 Merge pull request #34192 from backstage/renovate/slack-web-api-7.x-lockfile
chore(deps): update dependency @slack/web-api to v7.15.2
2026-05-13 01:15:20 +00:00
Fredrik Adelöw fcdf63f54b Merge pull request #34201 from backstage/freben/harden-bot-changeset-workflows
ci: add explicit permissions to pull_request_target workflows
2026-05-12 23:38:59 +02:00
dependabot[bot] 6a4200789d chore(deps): Bump @protobufjs/utf8 from 1.1.0 to 1.1.1
Bumps [@protobufjs/utf8](https://github.com/dcodeIO/protobuf.js) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/dcodeIO/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dcodeIO/protobuf.js/compare/protobufjs-cli-v1.1.0...protobufjs-cli-v1.1.1)

---
updated-dependencies:
- dependency-name: "@protobufjs/utf8"
  dependency-version: 1.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-12 20:04:44 +00:00
Fredrik Adelöw f5709382c9 Merge pull request #34140 from backstage/changeset-release/master
Version Packages (next)
2026-05-12 21:52:16 +02:00
github-actions[bot] 42a2f56e61 Version Packages (next) 2026-05-12 18:28:01 +00:00
Fredrik Adelöw add5d1ace7 catalog-backend: drive paginated entity ordering from search-by-key (#34162)
* draft: restructure entities() ordering to drive from search-by-key

When a sort field is specified, build the query so the search table
filtered by that key is the driving relation, instead of left-joining
search onto final_entities and sorting after. The planner can then walk
the (key, value, entity_id) index in already-sorted order and short
circuit on LIMIT.

Measured against a production replica, the catalog UI's default
"first page of components ordered by metadata.name" query goes from
~940 ms to ~8 ms. See PR description for the full numbers.

Known caveats this draft does not yet address:
- Entities lacking the order field are excluded; the previous shape
  put them at the end with NULLS LAST. A UNION ALL pattern can
  preserve the old semantics.
- Multi-field order falls back to the OLD shape (only the first field
  is taken when present today; subsequent fields acted as
  tie-breakers). Restoring tie-breakers needs additional joins or a
  CTE.
- queryEntities (/entities/by-query) is left untouched; the same
  optimization applies but the CTE/cursor structure makes the rewrite
  more involved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>

* two-phase entities() ordering: fast path + NULLs-last fallback

When an order field is specified, run a fast path first that drives
from the search-by-key index (excluding entities without the field).
If that path doesn't produce enough rows to cover offset+limit+1, run
a fallback that picks up the no-field entities in entity_id order.
This preserves NULLs-LAST semantics while keeping the fast plan for
the common case where every entity has the order field.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>

* fix: multi-field order fallback + MySQL quoting in entities()

Fall back to the original LEFT JOIN shape when multiple order fields
are specified, since tie-breaking on secondary fields inherently
requires materialization. The fast INNER-JOIN-driven path is used only
for single-field order (the typical UI case).

Fix the phase 2 NOT EXISTS clause to use knex's ?? identifier escaping
instead of hardcoded double-quotes, which broke on MySQL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>

* catalog-backend: fix phase 2 ordering and update changeset

Fix two issues raised in review:

- Phase 2 (entities lacking the sort field) now always sorts by
  entity_id ASC regardless of the primary sort direction, matching the
  original NULLS-LAST behaviour where the NULL group was always
  entity_id ASC.

- Update changeset to describe the actual two-phase behaviour (NULLS
  LAST preserved) instead of the stale description that said entities
  without the field are excluded.

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* catalog-backend: apply offset when limit is undefined in runOrderedEntitiesQuery

Previously the fast-path returned the full combined array when no limit
was specified, silently ignoring any pagination offset. The old
implementation always pushed offset to SQL independently of limit.
Restore parity by slicing the combined array by the offset even when
limit is absent.

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* catalog-backend: add pagination and phase-boundary tests for entities() ordering

Add two new test cases that cover the parts of runOrderedEntitiesQuery not
exercised before:

- "paginates correctly through single-field ordering": exercises limit, offset,
  and hasNextPage through the fast path (Phase 1 only) across all DB engines.

- "paginates across the Phase 1 / Phase 2 boundary": exercises the case where
  the requested page straddles entities that have the sort field (Phase 1) and
  those that do not (Phase 2), and verifies that Phase 2 entities are always
  ordered ASC by entity_id regardless of the primary sort direction.

Also fixes a double-space caught by prettier in DefaultEntitiesCatalog.ts.

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* catalog-backend: treat null sort-field value the same as a missing sort field

buildEntitySearch stores value=NULL for entity fields that are explicitly
null or exceed MAX_VALUE_LENGTH. Previously, Phase 1 included those rows via
the INNER JOIN (key matches, value IS NULL), causing them to sort ahead of
entities that have no row for the key at all — changing semantics vs the old
LEFT JOIN shape where both cases landed in the same NULLS-LAST bucket.

Fix Phase 1 to require order_0.value IS NOT NULL, and fix Phase 2's NOT EXISTS
to check for no non-null value (value IS NOT NULL) so that both null-valued
and missing-key entities are collected in Phase 2 and ordered together by
entity_id ASC.

Adds a regression test covering an entity with spec.b=null alongside one with
no spec.b, asserting both appear after sorted entities regardless of direction.

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-12 20:20:14 +02:00
Fredrik Adelöw 17c0551651 ci: add explicit permissions to pull_request_target workflows
Add least-privilege permissions blocks to three workflows that use
pull_request_target without explicit permission scoping:

- sync_renovate-changesets: contents:write + pull-requests:write
- sync_dependabot-changesets: contents:write + pull-requests:write
- sync_pull-requests-trigger: all none (only uploads artifacts)

These workflows run in the base repo context and have access to secrets.
Explicit permissions ensure the GITHUB_TOKEN is scoped to only what each
workflow needs, reducing blast radius if a guard is ever bypassed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-12 19:59:05 +02:00
Fredrik Adelöw ab690eea30 Merge pull request #34190 from backstage/freben/facets-count-optimization
fix(catalog-backend): simplify facets COUNT(DISTINCT) to COUNT(*)
2026-05-12 15:32:08 +02:00
Fredrik Adelöw bbd16c6f39 Merge pull request #34175 from backstage/freben/query-entities-inner-join
catalog-backend: drive queryEntities ordering from search-by-key
2026-05-12 15:28:50 +02:00
Fredrik Adelöw b61936fc62 fix(catalog-backend): add orderBy to facets query and clean up tests
Add ORDER BY to guarantee stable result ordering across all database
backends (MySQL does not sort without it). Also consolidate double
catalog.facets() calls in tests into a single call with both content
and length assertions on the same result.

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-12 15:18:10 +02:00
Fredrik Adelöw c2de113030 draft(catalog-backend): drive queryEntities ordering from search-by-key
Replace the LEFT OUTER JOIN + DISTINCT in the queryEntities CTE with
an INNER JOIN that drives from the search table for the sort field's
key. Entities lacking the sort field are excluded from both the result
and the count, aligning totalItems with navigable entities.

Removes DISTINCT (prerequisite: search table dedup migration).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-05-12 14:35:36 +02:00
Fredrik Adelöw af1c16db10 fix(catalog-backend): make facets predicate tests order-independent
GROUP BY result ordering is non-deterministic across database engines.
The switch from COUNT(DISTINCT entity_id) to COUNT(*) changes MySQL's
aggregation plan, which surfaces a different row order. Use
arrayContaining + length check instead of exact array equality.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-12 14:29:01 +02:00
Fredrik Adelöw 387ea7dd75 fix(catalog-backend): simplify facets COUNT(DISTINCT) to COUNT(*)
The UNIQUE constraint on (entity_id, key, value) from the search
indices migration guarantees each entity appears at most once per
(key, original_value) group, making DISTINCT unnecessary. Removing
it lets the database use a simpler aggregation plan.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-12 14:29:01 +02:00
Fredrik Adelöw 3be2ee90b6 Merge pull request #34177 from backstage/freben/search-indices-migration
feat(catalog-backend): search table dedup, covering indices, and UNIQUE constraint
2026-05-12 14:19:53 +02:00
Ben Lambert cde3643387 fix(catalog-backend): add missing description to unregister-entity MCP action parameter (#34196)
Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-12 13:34:27 +02:00
Ben Lambert d09c21cb84 feat(scaffolder): config-driven template groups and swappable TemplateCard (#34147)
* feat(scaffolder): config-driven template groups and swappable TemplateCard

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

* refactor(scaffolder): keep createGroupsWithOther internal

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

* docs(scaffolder): fix sub-page extension ID in changeset

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

* address PR review feedback

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

* split TemplateCard swappable contract from legacy props

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

* address review feedback: dedupe tags, defensive groups copy, doc clarifications

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

* regenerate api reports

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

* align docs and changeset with actual default group titles

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

* regen api reports after rebase

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

---------

Signed-off-by: benjdlambert <ben@blam.sh>
2026-05-12 12:29:44 +02:00
renovate[bot] 9ff4098ea2 chore(deps): update dependency @slack/web-api to v7.15.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 10:27:36 +00:00
renovate[bot] 154f186ae2 chore(deps): update dependency @rspack/plugin-react-refresh to v1.6.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 10:27:08 +00:00
renovate[bot] b4d844d304 chore(deps): update actions/upload-artifact action to v7.0.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 10:26:25 +00:00
renovate[bot] 6bdde6e6cb chore(deps): update actions/cache action to v5.0.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 10:26:18 +00:00
renovate[bot] 0395bb37a3 chore(deps): update stefanbuck/github-issue-parser digest to cb6e971
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 10:26:12 +00:00
renovate[bot] c1bef46f1f chore(deps): update actions/upload-artifact digest to 043fb46
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 10:26:00 +00:00
renovate[bot] 9b22d8dbf1 chore(deps): update actions/cache digest to 27d5ce7
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-12 10:25:52 +00:00
Fredrik Adelöw 92dfe61e79 Merge pull request #34087 from backstage/otel/tracing-service
feat: `TracingService` to match `MetricService`
2026-05-12 12:15:30 +02:00
Erik Hughes d726bcd842 feat(ui): add DatePicker component (#34184)
* feat(ui): add DatePicker component

Add a single-date picker built on React Aria's DatePicker, mirroring the
existing DateRangePicker implementation. Includes the date field with
segmented input, calendar popover, BUI design tokens, bg consumer
pattern, and full keyboard/screen reader accessibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Erik Hughes <erikh@spotify.com>

* fix(ui): address DatePicker PR feedback

- Remove unused dataAttributes spread from DatePickerGroup
- Mark DatePickerGroupDefinition and DatePickerCalendarDefinition as
  public so CSS class name changes appear in API reports
- Add Affected components line to changeset

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Erik Hughes <erikh@spotify.com>

* fix(ui): restore dataAttributes spread in DatePickerGroup

The bg: 'consumer' config on DatePickerGroupDefinition emits
data-on-bg attributes via useDefinition. Without spreading
dataAttributes onto <Group>, the CSS [data-on-bg] selectors
never match and background auto-increment doesn't work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Erik Hughes <erikh@spotify.com>

---------

Signed-off-by: Erik Hughes <erikh@spotify.com>
Co-authored-by: Erik Hughes <erikh@spotify.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-12 10:46:46 +02:00