Commit Graph

71734 Commits

Author SHA1 Message Date
Fredrik Adelöw 2b87d22ad4 Update plugins/catalog-backend/migrations/20260214000000_search_fk_final_entities.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-03-11 16:19:19 +01:00
Fredrik Adelöw 34af7b4551 catalog-backend: improve search FK migration test coverage
Add tests for NULL entity_id rows surviving migration, FK enforcement
rejecting invalid inserts, and down migration orphan cleanup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-11 15:03:06 +01:00
Fredrik Adelöw 1b69ff9c82 catalog-backend: make MySQL FK swap idempotent with retry loop
Replace the non-atomic MySQL transaction wrapper with a retry loop that
checks information_schema before dropping the FK and retries the add if
new orphan rows appear during the window between DROP and ADD.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-11 14:56:45 +01:00
Fredrik Adelöw 09c7e49f82 catalog-backend: combine PG DROP+ADD into single ALTER TABLE, fix MySQL comment
- Combine DROP CONSTRAINT and ADD CONSTRAINT into a single ALTER TABLE
  statement for PostgreSQL, eliminating the brief window where no FK exists
- Reword MySQL transaction comment to clarify that ALTER TABLE causes
  implicit commits in InnoDB, so the wrapper doesn't provide full atomicity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-11 14:43:10 +01:00
Fredrik Adelöw 89a1c313d0 catalog-backend: address review comments on search FK migration
- Close PG race window: drop old FK and add NOT VALID FK before batch
  cleanup, so no new orphans can be inserted during cleanup
- Extract batch-delete helpers (batchDeleteOrphansPg, batchDeleteOrphansMysql)
  to reduce duplication across up/down and dialects
- Fix ShareUpdateExclusiveLock comment to be more precise
- Make changeset message more descriptive

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-11 14:16:25 +01:00
Fredrik Adelöw 1ecf82a5c2 catalog-backend: wrap MySQL/SQLite migration branches in explicit transactions
The search FK migration uses transaction: false for PostgreSQL's benefit,
but this left MySQL and SQLite branches non-atomic. A failure between
dropForeign and the new addForeign would leave the table with no FK
constraint. Wrap those branches in explicit knex.transaction() calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-11 14:00:52 +01:00
Fredrik Adelöw 3644b725f8 add changeset
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-11 13:58:44 +01:00
Fredrik Adelöw 65364716da fix: add NULL safety and idempotent DROP CONSTRAINT to search FK migration
Prevent orphan cleanup queries from incorrectly matching rows with NULL
entity_id via LEFT JOIN, and use DROP CONSTRAINT IF EXISTS for safer
partial re-runs given transaction: false.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-11 11:53:28 +01:00
Fredrik Adelöw 42a42d5625 fix: add JSDoc type annotation for MySQL orphan ID mapping
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-11 11:06:57 +01:00
Fredrik Adelöw ffe5febfd6 fix: use LEFT JOIN for MySQL batch deletes in search FK migration
Address review feedback: replace NOT IN subquery with LEFT JOIN for
MySQL batch deletes. Since MySQL doesn't support LIMIT in multi-table
DELETE, orphan entity_ids are found via SELECT first, then deleted in
a separate statement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-11 11:04:52 +01:00
Fredrik Adelöw b4e28e1c27 fix(catalog): make search FK migration safe for large databases
The search FK migration previously ran all DDL and a bulk DELETE in a
single transaction, holding AccessExclusiveLock for the entire duration.
On large tables this blocks all reads for potentially minutes or hours.

This restructures the migration per database engine:
- PostgreSQL: batch-deletes orphans before DDL, uses NOT VALID to skip
  full table scan under AccessExclusiveLock, then VALIDATE CONSTRAINT
  under the weaker ShareUpdateExclusiveLock
- MySQL: batch-deletes orphans with LIMIT before DDL
- SQLite: unchanged simple approach (no locking concerns)

Also sets transaction: false so the batched deletes run outside the
DDL transaction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-11 10:58:42 +01:00
Fredrik Adelöw 90ea210559 Merge pull request #33100 from backstage/changeset-release/master
Version Packages (next)
2026-03-10 19:45:31 +01:00
github-actions[bot] ed7c4e3bef Version Packages (next) 2026-03-10 17:34:12 +00:00
Patrik Oldsberg 1097f68579 Merge pull request #33181 from backstage/rugvip/cli-boolean-flag-negation
cli: enable --no- prefix negation for boolean flags
2026-03-10 18:27:53 +01:00
Jonathan Roebuck 106d1b2a0e feat(catalog-backend-module-github): add config flag for verified email behavior (#33262)
Add a `defaultUserTransformer.useVerifiedEmails` config option to the
githubOrg provider, making the verified domain email behavior from #32997
opt-in rather than the default.

Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 16:55:53 +00:00
Fredrik Adelöw bed58405ab Merge pull request #33263 from backstage/freben/notar
remove @types/tar
2026-03-10 17:27:11 +01:00
Fredrik Adelöw df604dd3ae Merge pull request #33261 from backstage/freben/icon
fixup icons
2026-03-10 17:26:01 +01:00
benjdlambert 74aa55f0e9 chore: reset yarn.lock
Signed-off-by: benjdlambert <ben@blam.sh>
2026-03-10 17:20:38 +01:00
Patrik Oldsberg 5a5a113070 chore: deduplicate yarn.lock entries
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-10 17:20:38 +01:00
Patrik Oldsberg feaf449008 cli: enable --no- prefix negation for boolean flags
Bump cleye to ^2.3.0 (which pulls in type-flag 4.1.0) and enable
booleanFlagNegation: true in all cli() invocations so that boolean
flags automatically support --no-<flag> prefix negation.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-10 17:20:38 +01:00
Ben Lambert fa6dd7a611 chore: fix build (#33264)
Signed-off-by: benjdlambert <ben@blam.sh>
2026-03-10 17:19:29 +01:00
Fredrik Adelöw dbb7f0017a Merge pull request #33176 from backstage/freben/xml
bump aws-sdk to get rid of critical fast-xml-parser warning
2026-03-10 17:04:33 +01:00
Johan Persson d4d52fb13c fix(ui): ensure disabled rows override pointer cursor
Move the disabled rule after the pointer cursor rules so that
disabled rows always show cursor: not-allowed, even when they
have data-href or data-selection-mode.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-10 17:00:38 +01:00
Johan Persson f42f4cc055 fix(ui): truncate Table column headers with ellipsis on overflow
Wrap column header text in a label span with text-overflow: ellipsis
so that long headers truncate instead of wrapping to multiple lines.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-10 17:00:38 +01:00
Johan Persson fbd5c5a93d fix(ui): only show pointer cursor on interactive Table rows
Row always passed onAction to React Aria even when no handler or
href was set, causing all rows to appear interactive. Now onAction
is only passed when there is an actual interaction. CSS explicitly
sets cursor: default on rows and scopes cursor: pointer to rows
with href, selection mode, or pressable state.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-10 17:00:38 +01:00
Fredrik Adelöw 1fd15249ad remove @types/tar
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 16:44:41 +01:00
Fredrik Adelöw 645749d827 Merge pull request #33180 from cftad/gh-waittime
Update GitHub Scaffolder Environment Action Input Description
2026-03-10 16:41:20 +01:00
Fredrik Adelöw da2a0f974c Merge pull request #33242 from backstage/renovate/react-monorepo
fix(deps): update dependency react-refresh to ^0.18.0
2026-03-10 16:39:28 +01:00
Fredrik Adelöw 37459ebed3 Merge pull request #33027 from Flagsmith/asaphk/flagsmith-plugin
docs: add the Flagsmith plugin to the microsite directory
2026-03-10 16:36:54 +01:00
Fredrik Adelöw f234b29025 Merge pull request #33234 from backstage/renovate/postgres-17.x
chore(deps): update postgres docker tag to v17.9
2026-03-10 16:34:19 +01:00
Fredrik Adelöw 1340c82948 fixup icons
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 16:33:24 +01:00
Fredrik Adelöw cbc012c664 Merge pull request #32340 from Believe-SA/docs/hooks
feat(docs-ui): document BUI's hooks
2026-03-10 16:29:22 +01:00
Fredrik Adelöw c07c27d2b1 Merge pull request #33258 from backstage/freben/fix-e2e
fix end to end tests
2026-03-10 16:27:40 +01:00
Fredrik Adelöw 26fa44767a Merge pull request #31989 from 0xts/feat/scaffolder-logs-btn
feat: add log download btn for LogViewer
2026-03-10 16:24:26 +01:00
Fredrik Adelöw 1b116e4160 Merge pull request #33210 from backstage/renovate/changesets-cli-2.x-lockfile
chore(deps): update dependency @changesets/cli to v2.30.0
2026-03-10 16:23:34 +01:00
Fredrik Adelöw 2fe57aa333 Merge pull request #33158 from backstage/freben/move-stitch-queue-2
catalog: move stitch queue into dedicated table
2026-03-10 16:21:13 +01:00
Fredrik Adelöw 294f9fe17f Merge pull request #32377 from samarthsinh2660/fix/table-filters-title-layout
fix(core-components): fix Table layout when filters and title are used together
2026-03-10 16:19:10 +01:00
Fredrik Adelöw a302ac285c fix end to end tests
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 16:16:12 +01:00
Fredrik Adelöw 422a79039b Merge pull request #32619 from kaidubauskas-dd/kaidd/fix-user-slack-dms
fix(notifications-slack): Only DM explicit user recipients
2026-03-10 15:33:57 +01:00
Fredrik Adelöw 3b38dd0249 fix: mock fromTemporaryCredentials at module boundary instead of nested STS client
Replace the @aws-sdk/nested-clients/sts mock with a mock of
fromTemporaryCredentials itself. This avoids depending on AWS SDK
internal implementation details while still verifying that the correct
role ARN, session name, and external ID are passed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 15:29:30 +01:00
Fredrik Adelöw 241aa36b00 Merge pull request #33221 from backstage/freben/add-location-on-conflict-refresh
Add onConflict option to location registration endpoint
2026-03-10 15:19:31 +01:00
Fredrik Adelöw 63746129b2 reports
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 15:18:11 +01:00
Fredrik Adelöw a49c59f2da Update .changeset/curvy-socks-punch.md
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-03-10 14:56:07 +01:00
Fredrik Adelöw 5dc320ed5e remove unnecessary cast
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 14:39:01 +01:00
Fredrik Adelöw dfdb8e3a73 Add defaultLocationConflictStrategy config option for catalog locations
Adds a catalog config option to set the default conflict strategy when
registering locations, so adopters can default to 'refresh' instead of
'reject' without requiring each caller to specify it explicitly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 14:35:06 +01:00
Fredrik Adelöw d3796b6165 Fix OpenAPI spec linting errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 14:35:05 +01:00
Fredrik Adelöw 05a3e13b88 Add test for onConflict refresh updating refresh_state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 14:35:05 +01:00
Fredrik Adelöw e8dc06d2e9 Clean up test assertions for createLocation options
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 14:35:05 +01:00
Fredrik Adelöw 67fa705515 Use direct DB update for onConflict refresh instead of RefreshService
Simplify by updating refresh_state directly (next_update_at=now,
result_hash='') to force reprocessing, removing the need for
RefreshService wiring in the location store.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 14:35:04 +01:00
Fredrik Adelöw ced73ba3a0 Move onConflict refresh logic into DefaultLocationStore
The store now owns the conflict resolution and refresh logic directly,
keeping DefaultLocationService as a thin pass-through layer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 14:35:04 +01:00