Commit Graph

72068 Commits

Author SHA1 Message Date
Fredrik Adelöw 32e9499caf Add onConflict query parameter to POST /locations endpoint
Adds an optional `onConflict` query parameter to the location creation
endpoint. When set to 'refresh', a conflict due to an already-registered
location triggers a refresh of the existing location entity instead of
returning a 409 error. The default behavior ('reject') is unchanged.

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 6c865dbd1d fix: use AWS_SHARED_CREDENTIALS_FILE instead of smithy internals in tests
Replace the brittle @smithy/shared-ini-file-loader internals hack with
temp credential files and AWS_SHARED_CREDENTIALS_FILE/AWS_CONFIG_FILE
env vars, which is the official AWS SDK mechanism for this.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 14:29:39 +01:00
Fredrik Adelöw d3cb061c5f Update packages/integration-aws-node/src/DefaultAwsCredentialsManager.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-03-10 14:29:39 +01:00
Fredrik Adelöw f3f5cac4d1 fix: update DefaultAwsCredentialsManager tests for new AWS SDK internals
The AWS SDK now uses @aws-sdk/nested-clients/sts internally in
fromTemporaryCredentials, so the tests need to mock both the regular
and nested STS clients. Also adapts to the new $source metadata on
credentials and the new @smithy/shared-ini-file-loader for ini profile
mocking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 14:29:39 +01:00
Fredrik Adelöw 7a1278bc0b fix: cast ListObjectsV2Command to any to fix type mismatch with @aws-sdk/middleware-endpoint
After bumping aws-sdk packages, @smithy/middleware-endpoint and
@aws-sdk/middleware-endpoint have incompatible EndpointParameterInstructions
types. Since this is already a workaround, casting to any is appropriate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 14:29:39 +01:00
Fredrik Adelöw 54a101a895 bump aws-sdk to get rid of critical fast-xml-parser warning
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 14:29:36 +01:00
Ben Lambert d0f4cd215b feat(cli): add auth commands for OIDC login (#32920)
* feat(cli): add auth commands for OIDC login

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

* address PR review feedback

- move CIMD check before callback server start
- add try/finally for callback server cleanup
- validate URLs with human-readable errors
- deduplicate config URL candidates
- preserve selected flag on re-authentication
- delete accessToken on logout
- log token refresh to stderr in show command
- fix command descriptions to reference CIMD not DCR
- type keytar as optionalDependency, rename storage paths
- add auth-backend changeset

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

* migrate auth module from yargs to cleye pattern

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

* address PR review feedback

- consolidate storage imports in auth.ts
- add withMetadataLock to setSelectedInstance
- skip file permission tests on Windows
- clarify changeset endpoint path

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

* address review feedback from Rugvip and Copilot

- use stdout for user-facing messages instead of stderr
- remove clientSecret remnants from logout
- make refresh_token optional in token response schema
- add timeout to CIMD metadata fetch
- pass same state to callback server and authorize URL
- remove inaccurate test comment

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

* validate state in callback server, add CIMD endpoint tests

- localServer now validates the OAuth state parameter in the request
  handler and returns 400 on mismatch
- Added tests for the CIMD metadata endpoint in OidcRouter covering
  both disabled and enabled cases

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

* revert validateRequest to use Zod error details

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

* fix callback server hanging by closing keep-alive connections

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

* rename secret store service prefix to backstage-cli:auth-instance

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

---------

Signed-off-by: benjdlambert <ben@blam.sh>
2026-03-10 13:28:25 +00:00
Fredrik Adelöw d056002e64 Merge pull request #33241 from backstage/freben/scheduler-cancel-task
Add cancelTask to SchedulerService for cancelling running tasks
2026-03-10 14:27:28 +01:00
Fredrik Adelöw c0b9c63be4 Fix TypeScript error in MockSchedulerService test
Use non-null assertion for resolveBlock since TypeScript cannot track
the async reassignment across the setTimeout boundary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 13:59:40 +01:00
Fredrik Adelöw 25157bec8d Fix AbortController reuse after cancel and prevent overlapping liveness checks
Reset AbortController in MockSchedulerService after cancelTask so
subsequent triggerTask calls receive a fresh signal. Replace setInterval
with a self-scheduling setTimeout loop for liveness checks in TaskWorker
to prevent overlapping DB queries when a check takes longer than the
polling interval.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 13:49:38 +01:00
Fredrik Adelöw 0899cb2cee Fix cancelTask to reschedule next run instead of permanently stopping task
The static cancel() now reads task settings from the DB and computes
the next_run_start_at, so cancelled tasks get picked up again on their
normal schedule. Also stops the liveness check polling immediately on
first detection of a cancelled task.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-10 11:47:51 +01: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
Ben Lambert c74b69788e feat(mcp-actions): Add the ability to configure different plugins for different servers (#33235)
* feat: split MCP actions into per-plugin servers

Add mcpActions.servers config to create multiple MCP server endpoints
scoped by plugin source, with per-server include/exclude filtering.
Add mcpActions.tools for global tool description overrides.

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

* feat: namespace tool names, use filter rules for server scoping

- Tool names now use action ID (plugin:name) by default, opt out
  via mcpActions.namespacedToolNames
- Removed pluginSources from server config, use filter.include
  with id glob patterns instead
- Removed tool description overrides (deferred to followup)
- Added server key validation for route safety

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

* docs: update README for filter-based server scoping

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

* feat: drop SSE routes for split servers

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

* fix: handle empty servers config, fix test name

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

---------

Signed-off-by: benjdlambert <ben@blam.sh>
2026-03-10 11:28:31 +01:00
renovate[bot] 9599697048 chore(deps): update dependency globals to v17
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 03:44:26 +00:00
Fredrik Adelöw 64073a4290 Merge pull request #33229 from backstage/freben/fix-flaky-techdocs-reader-state-test
fix(techdocs): fix flaky useReaderState stale content test
2026-03-10 04:34:25 +01:00
Iury Lenon Alves 346d3302c2 docs: fix markdown hierarchy and apply copilot suggestions
Signed-off-by: Iury Lenon Alves <iuryalves.uk@gmail.com>
2026-03-09 22:54:42 +00:00
Iury Lenon Alves d4199a9d28 docs: add required app-config for backstage-openapi module
Signed-off-by: Iury Lenon Alves <iuryalves.uk@gmail.com>
2026-03-09 22:17:21 +00:00
Iury Lenon Alves f75764c717 docs: move backstage openapi docs to configuration.md and add install steps
Signed-off-by: Iury Lenon Alves <iuryalves.uk@gmail.com>
2026-03-09 22:15:39 +00:00
renovate[bot] f1bfd351cd chore(deps): update dependency @types/jquery to v4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 22:10:33 +00:00
renovate[bot] d26488e5e3 chore(deps): update dependency eslint to v9.39.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 22:08:00 +00:00
Iury Lenon Alves 80c0b16e18 docs(integrations): add mention of backstage-openapi backend module
Signed-off-by: Iury Lenon Alves <iuryalves.uk@gmail.com>
2026-03-09 21:51:04 +00:00
Fredrik Adelöw 3e4b372955 Implement cancelTask in MockSchedulerService with proper error types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-09 22:37:08 +01:00
Fredrik Adelöw 164711a61f Add changeset for backend-test-utils cancelTask addition
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-09 22:18:23 +01:00
Fredrik Adelöw 60eec59601 Fix missing cancelTask in mock SchedulerService implementations
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-09 22:16:33 +01:00
renovate[bot] 4a75544809 fix(deps): update dependency react-refresh to ^0.18.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 21:06:46 +00:00
Fredrik 015668c5d2 Add cancelTask to SchedulerService for cancelling running tasks
Adds the ability to cancel currently running scheduled tasks via a new
cancelTask method on the SchedulerService interface. For global (distributed)
tasks, the database lock is released and a periodic liveness check detects
the lost ticket and aborts the task function's AbortSignal. For local tasks,
the abort signal is triggered directly. Also adds a REST endpoint at
POST /.backstage/scheduler/v1/tasks/:id/cancel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-09 22:00:44 +01:00
backstage-goalie[bot] 88ad2fff14 Merge pull request #33239 from backstage/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.56.1
2026-03-09 20:49:16 +00:00
renovate[bot] b3af36d91b chore(deps): update typescript-eslint monorepo to v8.56.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 20:10:43 +00:00
renovate[bot] 132047b4c0 chore(deps): update step-security/harden-runner action to v2.15.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 20:10:06 +00:00
backstage-goalie[bot] f3f99b811e Merge pull request #33236 from backstage/renovate/cleye-2.x-lockfile
chore(deps): update dependency cleye to v2.3.0
2026-03-09 20:00:17 +00:00
Fredrik Adelöw e46834752a fix(techdocs): fix flaky useReaderState stale content test
Switch from real timers to fake timers so state transitions are
deterministic. The test previously relied on a ~100ms real-time window
between the 1000ms buildingTimeout and the 1100ms mock sync delay,
which was too tight for slow CI machines to observe reliably.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-03-09 20:58:22 +01:00
renovate[bot] cfebfed724 chore(deps): update shiki monorepo to v3.23.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 19:23:33 +00:00
renovate[bot] 649f8272ac chore(deps): update dependency cleye to v2.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 19:23:05 +00:00
backstage-goalie[bot] 174063f0b9 Merge pull request #33233 from backstage/renovate/ts-checker-rspack-plugin-1.x-lockfile
chore(deps): update dependency ts-checker-rspack-plugin to v1.3.0
2026-03-09 18:47:40 +00:00
renovate[bot] afded9e1eb chore(deps): update postgres docker tag to v17.9
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 18:11:59 +00:00
renovate[bot] 83b0af29f7 chore(deps): update dependency ts-checker-rspack-plugin to v1.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 18:11:50 +00:00
backstage-goalie[bot] f58441bbed Merge pull request #33232 from backstage/renovate/swagger-ui-react-5.x-lockfile
chore(deps): update dependency swagger-ui-react to v5.32.0
2026-03-09 18:02:55 +00:00
backstage-goalie[bot] 949c2d9575 Merge pull request #33231 from backstage/renovate/strip-ansi-7.x-lockfile
chore(deps): update dependency strip-ansi to v7.2.0
2026-03-09 18:02:50 +00:00
renovate[bot] 2bb08b0f02 chore(deps): update dependency swagger-ui-react to v5.32.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 17:14:46 +00:00
renovate[bot] fa13018885 chore(deps): update dependency strip-ansi to v7.2.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 17:13:52 +00:00
backstage-goalie[bot] 2135c17953 Merge pull request #33228 from backstage/renovate/react-virtualized-auto-sizer-1.x-lockfile
chore(deps): update dependency @types/react-virtualized-auto-sizer to v1.0.8
2026-03-09 17:01:24 +00:00
backstage-goalie[bot] 0635608ae8 Merge pull request #33226 from backstage/renovate/classnames-2.x-lockfile
chore(deps): update dependency @types/classnames to v2.3.4
2026-03-09 17:01:19 +00:00
backstage-goalie[bot] e335fbda71 Merge pull request #33223 from backstage/renovate/pg-8.x-lockfile
chore(deps): update dependency pg to v8.20.0
2026-03-09 17:01:14 +00:00
Sander van Delden cd0ecc50b1 feat(plugin-scaffolder-node/githelpers): add function to stage files for removal
Signed-off-by: Sander van Delden <38953576+SanderDelden@users.noreply.github.com>
2026-03-09 17:20:05 +01:00
renovate[bot] 313617fa4d chore(deps): update dependency @types/react-virtualized-auto-sizer to v1.0.8
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 16:14:18 +00:00
renovate[bot] adef02723f chore(deps): update dependency @types/classnames to v2.3.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-09 16:13:41 +00:00
Fredrik Adelöw 030222686d Merge pull request #33225 from backstage/freben/unbreak-my-heart
unbreak my heart
2026-03-09 17:08:20 +01:00
Fredrik Adelöw f71e8e6982 Merge pull request #33222 from backstage/renovate/mysql2-3.x-lockfile
chore(deps): update dependency mysql2 to v3.19.0
2026-03-09 17:05:44 +01:00
Fredrik Adelöw a682832ae5 unbreak my heart
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-03-09 16:58:38 +01:00
renovate[bot] b4e14b6f89 chore(deps): update dependency react-aria-components to v1.16.0 (#32783)
* chore(deps): update dependency react-aria-components to v1.16.0

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(ui): fix selectedKey type mismatch in Tabs component

Change `selectedId` initialization from `null` to `undefined` to
match React Aria's `selectedKey` prop type (`Key | undefined`).

Signed-off-by: Johan Persson <johanopersson@gmail.com>

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Johan Persson <johanopersson@gmail.com>
2026-03-09 15:50:29 +00:00