Commit cd327d7
authored
chore: remove the agent feature in favor of SSH (#365)
* chore: remove the agent feature in favor of SSH
The remote-agent mode (DATABASEMENT_URL + agent:run + on-server polling
agent) never landed cleanly in practice. SSH tunnels already cover the
"reach a private/firewalled database" use case, so the second pathway
adds maintenance cost without unique value.
Removes:
- agent:run command, AgentController, agent API routes & middleware
- Agent/AgentJob models, factories, policy, query, payload builder
- Agent CRUD Livewire pages, layout menu entry, agent_id form field
- DATABASEMENT_URL branches in config/{database,cache,queue,session}.php
- DTO toPayload()/fromPayload() (only consumers were the agent)
The jobs:recover-stuck command keeps its backup-job recovery half
(handles queue worker crashes) — only the agent-lease half is dropped.
Schema cleanup is forward-only: existing migrations are left untouched
(production has already run them). A new drop migration removes the
agents tables and database_servers.agent_id with hasTable/hasColumn
guards so fresh installs and existing prod converge on the same state.
* refactor: simplify the files touched by the agent removal
Light cleanup pass on the three files most affected by the previous
commit:
- TriggerBackupAction: drop the stale @throws ValidationException now
that the method no longer dispatches to an agent or re-throws.
- SetCurrentOrganization::handle: collapse the deeply-nested
`if ($user instanceof User)` block into an early return — the
middleware now only has one branch worth nesting for.
- SaveDatabaseServerRequest: extract the duplicated $backupsEnabled
resolution from rules() and withValidator() into a private helper.1 parent 183ffb8 commit cd327d7
77 files changed
Lines changed: 170 additions & 4057 deletions
File tree
- app
- Console/Commands
- Http
- Controllers/Api/V1
- Middleware
- Requests/Api/V1
- Resources
- Livewire
- Agent
- Concerns
- Configuration
- DatabaseServer
- Forms
- Restore
- Models
- Policies
- Providers
- Queries
- Services
- Agent
- Backup
- DTO
- bootstrap
- config
- database
- factories
- migrations
- docker/php/scripts
- lang
- resources/views
- layouts
- livewire
- agent
- configuration
- database-server
- routes
- tests
- Feature
- Agent
- Configuration
- Console
- DatabaseServer
- Services/Backup
- Unit/Services/Backup/DTO
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 114 | | |
128 | 115 | | |
129 | 116 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 20 | | |
84 | 21 | | |
85 | 22 | | |
| |||
98 | 35 | | |
99 | 36 | | |
100 | 37 | | |
101 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
102 | 41 | | |
103 | 42 | | |
104 | 43 | | |
| |||
109 | 48 | | |
110 | 49 | | |
111 | 50 | | |
112 | | - | |
| 51 | + | |
113 | 52 | | |
114 | 53 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
| |||
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | | - | |
| 18 | + | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
| |||
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
| 47 | + | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
| |||
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
67 | | - | |
| 65 | + | |
68 | 66 | | |
69 | 67 | | |
70 | 68 | | |
| |||
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 74 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 75 | + | |
117 | 76 | | |
118 | 77 | | |
119 | 78 | | |
120 | | - | |
121 | 79 | | |
122 | | - | |
| 80 | + | |
123 | 81 | | |
124 | 82 | | |
0 commit comments