Commit graph

5546 commits

Author SHA1 Message Date
Andras Bacsai
8e033c5bc3 fix(destination): promote networks atomically
Wrap destination promotion in a transaction so the main destination swap and additional network updates stay consistent. Add coverage for promoting an owned team network while preserving the previous main destination as an additional network.
2026-05-26 14:50:29 +02:00
Andras Bacsai
f44ace3965 fix(destination): validate network server pairing
Ensure destination attach and promote operations only accept networks that belong to the selected server, preventing mismatched same-team server/network pairs.
2026-05-26 14:48:36 +02:00
Andras Bacsai
579ce3064f chore(schedule): type scheduled task job input 2026-05-26 14:47:11 +02:00
Andras Bacsai
097efd14ce fix(storage): clear stale disk usage cache
Forget cached storage threshold state when reported disk usage drops below the alert threshold, allowing future threshold crossings to dispatch a fresh storage check.
2026-05-26 14:45:49 +02:00
Andras Bacsai
43884823c6 chore(ssh): remove stale mux cleanup job
Drop the scheduled stale multiplexed connection cleanup job, its SSH mux
health/orphan config, and the tests that covered that cleanup path.
2026-05-26 14:40:38 +02:00
Andras Bacsai
b5be9fe9e8 fix(sentinel): lock push dedupe decisions
Guard Sentinel push hash checks and cache updates with a server-scoped atomic cache lock to prevent concurrent duplicate dispatches.
2026-05-26 14:12:56 +02:00
Andras Bacsai
7677fac2f5 fix(sentinel): validate push containers payload
Reject malformed sentinel push payloads before updating heartbeat state,
dispatching jobs, or writing deduplication cache entries.
2026-05-26 14:07:41 +02:00
Andras Bacsai
ed3780b2a7 fix(schedule): run stale multiplex cleanup on crons queue
Dispatch CleanupStaleMultiplexedConnections through the crons queue and
cover the scheduled job queue assignment with a feature test.
2026-05-26 13:51:22 +02:00
Andras Bacsai
ebf23f4874 fix(ssh): escape scp source and destination
Quote SCP operands when building commands to prevent shell injection through source or destination paths, and cover the escaping behavior in the SSH command injection tests.
2026-05-26 13:48:10 +02:00
Andras Bacsai
8a40c4e348 chore(sync-bunny): remove GitHub release sync paths
Drop the unused GitHub release and version sync options from sync:bunny,
leaving the command focused on BunnyCDN template, release, and nightly syncs.
Update the nightly test to assert it does not invoke gh or git.
2026-05-26 11:51:38 +02:00
Andras Bacsai
21db1fd374 fix(sync-bunny): sync nightly CDN files to nested paths
Write nightly versions and releases under json/nightly in the CDN repo, and cover both release and versions-only sync flows with feature tests.
2026-05-26 11:41:04 +02:00
Andras Bacsai
8e6e3551f3
fix(ui): improve configuration changes modal values, colors and spacing (#10365) 2026-05-26 11:09:54 +02:00
Andras Bacsai
a058786509 fix(ssh): remove mux first-use lock wrapper
Rely on OpenSSH lazy multiplexing directly for SSH and SCP commands,
removing the shell lock wrapper and related readiness checks.
2026-05-22 18:27:40 +02:00
Andras Bacsai
a13fb3cf00 fix(ssh): verify mux readiness before reusing socket
Use ssh -O check in the first-use mux lock flow so commands only reuse a multiplexed socket after the control master is actually ready.
2026-05-22 18:22:22 +02:00
Andras Bacsai
5c67766f41 fix(ssh): serialize initial mux connection creation
Wrap first-use SSH and SCP multiplexed commands with a lock to avoid racing while the control socket is created. Also detect native OpenSSH mux master process names during stale connection cleanup and cover both orphaned and duplicate mux processes with tests.
2026-05-22 18:17:37 +02:00
Andras Bacsai
54a020cf1b fix(ssh): rely on lazy multiplexed connections
Remove explicit SSH master pre-warming and lock handling so OpenSSH manages ControlMaster creation lazily from real ssh/scp commands. Add cleanup for duplicate mux processes and update coverage around mux command options and stale process cleanup.
2026-05-22 18:01:53 +02:00
ShadowArcanist
bd744eb8dd
fix(ui): configuration changes modal values, colors and spacing 2026-05-22 21:22:50 +05:30
Andras Bacsai
57d879263d fix(ssh): prevent orphaned multiplexed connections
Serialize multiplexed SSH master creation per server to avoid concurrent workers spawning orphaned processes. Enable scheduled cleanup for stale mux connections and add guarded orphan process reaping with tests.
2026-05-22 17:31:38 +02:00
Andras Bacsai
5a7408a919 fix(github): improve GitHub App setup and installation flow
- resolve the GitHub App by a stable identifier during installation
  callbacks so installing and re-installing keeps working over the
  full lifetime of the App
- verify the installation id received from the callback against the
  GitHub API before persisting it
- support re-installing an already configured GitHub App instead of
  blocking it
- require an authenticated session and rate limit the setup callback
  routes
- extend manifest setup state validity to match GitHub's manifest
  code lifetime

Adds feature coverage for the GitHub App setup and installation
callbacks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 16:34:36 +02:00
Andras Bacsai
fcd63f40eb fix(queue): route scheduled jobs through crons helper
Centralize scheduled job queue selection with crons_queue() and use it for scheduler, task, and database backup jobs so cloud runs on crons while self-hosted stays on high.
2026-05-22 16:26:15 +02:00
Andras Bacsai
e2199f1223 fix(queue): route cloud jobs to dedicated queues
Use config-based queue selection for deployment and scheduled jobs so cloud dispatches deployments to `deployments` and scheduled jobs to `crons`, while self-hosted keeps using `high`.

Add coverage for deployment queue helper, start action routing, and scheduled job manager routing.
2026-05-22 16:11:24 +02:00
Andras Bacsai
809d9b21fa fix(webhook): match manual webhook repositories case-insensitively
Git hosts treat owner/repo names case-insensitively, but the exact
repository match used a case-sensitive comparison, so a payload whose
casing differed from the stored git remote would fail to match and
skip a legitimate deployment.

Lowercase both canonical repository paths before comparing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 15:59:20 +02:00
Andras Bacsai
c1518ba1c0 fix(webhook): match manual webhook repositories exactly
The manual webhook handlers selected target applications with a
`git_repository LIKE %full_name%` substring query, so a payload
repository name could match unintended applications when repository
names overlap.

Add a `MatchesManualWebhookApplications` trait that validates the
incoming `owner/repo` value and matches `Application.git_repository`
by exact normalized path. Github, Gitlab, Gitea and Bitbucket manual
handlers now use it, reject invalid repository input early, and return
a consistent generic webhook failure payload.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 15:32:44 +02:00
Andras Bacsai
00ce43a9d0
Refine service resource routing (#10358) 2026-05-22 13:40:18 +02:00
Andras Bacsai
beaad0a722 Refine service resource routing 2026-05-22 13:39:26 +02:00
Andras Bacsai
7f135e0f6d Harden token permission handling 2026-05-22 13:12:17 +02:00
Andras Bacsai
e9b8320d5f Fix source selection flow 2026-05-22 13:00:53 +02:00
Andras Bacsai
783344c875
fix(environment): scope DeleteEnvironment lookups to current team (#10349) 2026-05-22 12:57:57 +02:00
Andras Bacsai
59111e8cf3 fix(destination): scope server and network selection to current team
Resolve the server and network in Destination::addServer() and
::promote() through ownedByCurrentTeam() before use, authorize the
update against the resource, and pass the validated IDs into
attach()/detach()/update(). Errors are routed through handleError()
to match the sibling removeServer() method.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 12:53:14 +02:00
Andras Bacsai
36526928df feat(sentinel): deduplicate metrics push processing
Move Sentinel push handling into a controller and dispatch server update jobs only when container state changes or the force interval elapses. Add opt-in PostgreSQL read/write replica configuration and tune periodic proxy network and storage checks to reduce unnecessary work.

Add feature coverage for replica config, Sentinel push deduplication, deployment log scrolling, and server update job optimizations.
2026-05-22 12:48:48 +02:00
Andras Bacsai
df166ac689 fix(environment): scope DeleteEnvironment lookups to current team
Scope DeleteEnvironment::mount() and delete() lookups through
Environment::ownedByCurrentTeam() so an environment_id that belongs to
another team resolves to a 404 instead of loading the foreign record.
Mark $environment_id as #[Locked] so the public Livewire property can no
longer be reassigned from the client.

Add tests/Feature/DeleteEnvironmentTeamScopingTest.php covering mount,
delete, the #[Locked] guard, and the team-scoped helper for both the
cross-team and own-team cases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 12:37:48 +02:00
Andras Bacsai
5dda39e588 fix(source): scope private key and source selection to current team
The Source component now resolves the supplied private key and Git
source IDs through team-scoped queries before persisting them, so a
selection can only ever reference a resource owned by the current
team. The source type is additionally restricted to the supported
GitHub/GitLab app classes.

The privateKeyId property is marked #[Locked] so it can only change
through the dedicated handler rather than a direct property update.

Adds feature tests covering team-scoped selection of private keys and
Git sources.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 12:30:00 +02:00
Andras Bacsai
b124397613 fix(schedule): prevent duplicate SSL certificate regeneration
Run RegenerateSslCertJob on one server only and add coverage to ensure scheduled production jobs use onOneServer.
2026-05-21 19:19:43 +02:00
Andras Bacsai
65c0c92c02 fix(destinations): handle empty and server-scoped destinations
Build the global destinations list from actual destination records so empty
servers do not render duplicate empty states. Allow creating Docker destinations
for a selected team server outside the global usable list, authorize swarm
creation correctly, and store discovered swarm network names from the selected
network. Add feature coverage for empty states, selected-server mounting, and
swarm destination creation.
2026-05-19 12:50:08 +02:00
Andras Bacsai
4ff3e4b2be
feat(deployments): track application configuration diffs (#10183) 2026-05-13 10:49:53 +02:00
Andras Bacsai
1522c510cf fix(api-tokens): mark expiration warning after notification
Ensure failed token expiration warning notifications do not persist the warning marker, allowing the job to retry later.
2026-05-13 10:28:32 +02:00
Andras Bacsai
df4d9f8069 fix(applications): use preview environment variable query
Call the preview environment variable relationship as a query when building the legacy configuration hash, and cover preview deployments with a regression test.
2026-05-13 10:28:18 +02:00
Andras Bacsai
3911a0305c fix(api-tokens): persist expiration warning state
Track when expiration warnings are sent on personal access tokens so repeated job runs or cache flushes do not send duplicate notifications.
2026-05-13 10:11:40 +02:00
Andras Bacsai
0ecd488d6a fix(applications): refresh pending configuration changes
Dispatch configuration change events after saving application source and advanced settings, and refresh the configuration checker before showing redeploy diffs.
2026-05-13 10:04:17 +02:00
Andras Bacsai
f8849aba73 feat(deployments): track application configuration diffs
Store deployment configuration snapshots on application deployment queues and compare them against the current application state. Surface grouped pending changes in the configuration checker and use build-impact diffs to decide when an existing image can skip the build step.
2026-05-13 09:58:58 +02:00
Andras Bacsai
63c2d31ca0 feat(applications): add configurable stop grace period
Add centralized stop grace period resolution for application settings and use it across manual stops, preview stops, and deployments. Validate the Livewire advanced setting against shared min/max constants and cover persistence, fillable creation, and fallback behavior with tests.
2026-05-11 23:43:53 +02:00
Andras Bacsai
d1220895d9 Merge remote-tracking branch 'origin/next' into feat/configurable-stop-grace-period 2026-05-11 23:20:31 +02:00
Andras Bacsai
6f3bb47682
fix(applications): decode custom nginx API payloads (#10067) 2026-05-11 22:24:55 +02:00
Andras Bacsai
a42613168d fix(applications): store custom nginx config from API correctly
Decode base64 custom_nginx_configuration before model assignment so it is not double-encoded, and allow null values when clearing the setting. Add API coverage for create, update, invalid input, and clearing behavior.
2026-05-11 22:22:01 +02:00
Andras Bacsai
9bb40f3ccb fix(deployment): avoid shared preview tags for HEAD commits
Use the deployment UUID when preview deployments are built from HEAD so each deployment gets distinct production and build image tags.
2026-05-11 22:11:08 +02:00
Andras Bacsai
2253c40e01 fix(deployment): include commit in preview image tags
Generate pull request preview image tags with both the PR id and commit
so different commits on the same PR do not reuse the same image tag. Sanitize
and truncate generated tags to stay within Docker tag limits.
2026-05-11 22:05:07 +02:00
Andras Bacsai
94c7968c4f style(railpack): add return type to deploy method 2026-05-11 17:33:12 +02:00
Andras Bacsai
ab1958d741 fix(railpack): fail fast when buildx is unavailable
Require Docker buildx before Railpack builds, normalize environment
variable keys before validation, and align private deploy key API docs with
the supported dockerfile build pack.
2026-05-11 17:31:29 +02:00
Andras Bacsai
0f904d792b Merge remote-tracking branch 'origin/next' into feat/railpack 2026-05-11 17:03:25 +02:00
Andras Bacsai
ff149b8daa fix(stripe): ignore missing subscriptions in webhook jobs
Avoid failing Stripe webhook processing when local subscriptions are missing, and cover ignored invoice/payment/subscription events with feature tests.
2026-05-11 16:56:00 +02:00