-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
v4.0.0-beta.435 #6758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4.0.0-beta.435 #6758
Changes from 45 commits
3020ad3
ee7daca
d2254f6
ac40a65
e17fbd3
0e02eff
590de8c
7d99d6a
41a8ea8
9107fb2
4b08ac9
f0fbed8
fb7af48
0bc7283
b4cfb78
4cf6004
c144973
158747c
4b947a0
06dfcff
ad4a733
5b2d54b
239ecd4
17505aa
dd93f93
bac6f4d
acf2d5f
141199b
a05a233
26bc6ed
31beb0f
ae64f8c
83a3715
2d37189
cef3d3a
a031768
806b98a
70d0ae2
eb1f16b
8b22155
9962b69
981f46c
1a42187
bc8cf8e
2c64136
fbbaab5
6183787
201e30e
b19e8d6
5e711fb
fc7e317
d7bee48
a39bd8c
747c764
58d4bdf
62134ae
704e016
0cddee6
adf5bbd
318f092
9a7d3ab
d752ee2
0bc57f7
e8b2ef0
91d5a48
afd1004
2e6e07b
6f086d2
3323302
640f753
c548013
b803a13
503da6d
c1bcc41
bdd078e
0a5987a
354eadd
2fb7a6f
ee6b8c9
42f671c
215301f
d837aa1
61e688a
c9e6418
704ddf2
231ad85
da93a52
2f12459
8d5ac0d
3241bd2
4a38497
f85a4f0
bf5c08d
f4e5c19
d16b6e9
77dcabe
bbaef03
513f6b5
32b53d7
00cb061
2bca220
5362952
9c152fd
bd88bbc
2e21d87
ee21152
ac3af8a
ac26fbe
8e954a3
2787937
a90236e
b28875c
3c74620
840c162
4834ff2
655e5a0
606b3b5
eb9305d
9481247
53d1ad4
eea372d
22ef6c8
22153c4
729c891
413dee5
dc15bee
556d93e
769d2ec
4b5c641
7069236
0603acf
bdffa47
bd6b597
9c2ef0a
084e65f
3501d20
e256e76
36573ec
0303f52
fe42773
b48db99
2cf4058
7061eac
c009c97
05bd57e
e4bf8ab
6c0840d
e055c3b
ad7479b
b31b080
5463f4d
231de5d
6c5adce
ff69bf1
64c4ce2
f502011
2ce3052
ff889e6
a17b105
a3cecff
88bbf14
4b34a7d
d93a13e
9c21304
7ad7247
a7b9e78
821aa6a
fc9f59b
6e08af6
052ef19
95fe04c
ccdbf95
635af44
737ec52
6297ac6
b7af8ce
7a008c8
1902ef8
0462559
de24489
ecdeed7
a15ab54
8d280b4
3dfef0b
acc5dbe
6879ba8
400746f
78031b9
174c212
df77a99
bb9ddd0
a1916c9
3e5fb4a
6098a58
42e3908
f8f4c04
cdfc991
a1fa49e
3c3ac8c
70ab263
591d495
4092100
e875fed
7443b26
a1dfb31
0681f4d
fe91c25
8d403cc
777cdc9
473fe6f
009ac82
ea58490
9c79e2b
d4b9b61
b911d2b
baabbc9
03d4dd5
ce12c94
ff054cf
1cdd6fb
040e2b4
8408faf
2aef2c3
bf00405
893093f
74c70b4
a3d9ca5
1aea813
123c849
f254af0
e20327b
652f523
941afa3
91e070b
ebfc877
b81baff
2692ef8
933a676
7bdd53b
a9d8993
f9f1d87
375aecc
81455b1
6d3c996
3e2f124
d1379f6
20b4288
66cff9d
7383705
23c1184
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,11 +41,9 @@ class ApplicationDeploymentQueue extends Model | |
| { | ||
| protected $guarded = []; | ||
|
|
||
| public function application(): Attribute | ||
| public function application() | ||
| { | ||
| return Attribute::make( | ||
| get: fn () => Application::find($this->application_id), | ||
| ); | ||
| return $this->belongsTo(Application::class); | ||
| } | ||
|
Comment on lines
+44
to
47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add the Swapping the accessor to a real relation is awesome, but without a +use Illuminate\Database\Eloquent\Relations\BelongsTo;
@@
- public function application()
+ public function application(): BelongsTo
{
return $this->belongsTo(Application::class);
}As per coding guidelines π€ Prompt for AI Agents |
||
|
|
||
| public function server(): Attribute | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |||||||||||||||||||||||
| use App\Events\FileStorageChanged; | ||||||||||||||||||||||||
| use Illuminate\Database\Eloquent\Casts\Attribute; | ||||||||||||||||||||||||
| use Illuminate\Database\Eloquent\Factories\HasFactory; | ||||||||||||||||||||||||
| use Symfony\Component\Yaml\Yaml; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| class LocalFileVolume extends BaseModel | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
|
|
@@ -192,4 +193,61 @@ public function scopeWherePlainMountPath($query, $path) | |||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| return $query->get()->where('plain_mount_path', $path); | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // Check if this volume is read-only by parsing the docker-compose content | ||||||||||||||||||||||||
| public function isReadOnlyVolume(): bool | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||
| // Only check for services | ||||||||||||||||||||||||
| $service = $this->service; | ||||||||||||||||||||||||
| if (! $service || ! method_exists($service, 'service')) { | ||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| $actualService = $service->service; | ||||||||||||||||||||||||
| if (! $actualService || ! $actualService->docker_compose_raw) { | ||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // Parse the docker-compose content | ||||||||||||||||||||||||
| $compose = Yaml::parse($actualService->docker_compose_raw); | ||||||||||||||||||||||||
| if (! isset($compose['services'])) { | ||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // Find the service that this volume belongs to | ||||||||||||||||||||||||
| $serviceName = $service->name; | ||||||||||||||||||||||||
| if (! isset($compose['services'][$serviceName]['volumes'])) { | ||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| $volumes = $compose['services'][$serviceName]['volumes']; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // Check each volume to find a match | ||||||||||||||||||||||||
| foreach ($volumes as $volume) { | ||||||||||||||||||||||||
| // Volume can be string like "host:container:ro" or "host:container" | ||||||||||||||||||||||||
| if (is_string($volume)) { | ||||||||||||||||||||||||
| $parts = explode(':', $volume); | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // Check if this volume matches our fs_path and mount_path | ||||||||||||||||||||||||
| if (count($parts) >= 2) { | ||||||||||||||||||||||||
| $hostPath = $parts[0]; | ||||||||||||||||||||||||
| $containerPath = $parts[1]; | ||||||||||||||||||||||||
| $options = $parts[2] ?? null; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // Match based on fs_path and mount_path | ||||||||||||||||||||||||
| if ($hostPath === $this->fs_path && $containerPath === $this->mount_path) { | ||||||||||||||||||||||||
| return $options === 'ro'; | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
Comment on lines
+238
to
+241
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hasta la vista, read-only detection bug If a self-hosting legend mounts with - if ($hostPath === $this->fs_path && $containerPath === $this->mount_path) {
- return $options === 'ro';
- }
+ if ($hostPath === $this->fs_path && $containerPath === $this->mount_path) {
+ $mode = $options ?? '';
+ $modeParts = array_map('trim', explode(',', $mode));
+
+ return in_array('ro', $modeParts, true);
+ }π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||
| } catch (\Throwable $e) { | ||||||||||||||||||||||||
| ray($e->getMessage(), 'Error checking read-only volume'); | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use Illuminate\Database\Eloquent\Casts\Attribute; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use Illuminate\Database\Eloquent\Model; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| use Symfony\Component\Yaml\Yaml; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| class LocalPersistentVolume extends Model | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -48,4 +49,69 @@ protected function hostPath(): Attribute | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Check if this volume is read-only by parsing the docker-compose content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public function isReadOnlyVolume(): bool | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Get the resource (can be application, service, or database) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $resource = $this->resource; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (! $resource) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Only check for services | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (! method_exists($resource, 'service')) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $actualService = $resource->service; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (! $actualService || ! $actualService->docker_compose_raw) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Parse the docker-compose content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $compose = Yaml::parse($actualService->docker_compose_raw); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (! isset($compose['services'])) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Find the service that this volume belongs to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $serviceName = $resource->name; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (! isset($compose['services'][$serviceName]['volumes'])) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $volumes = $compose['services'][$serviceName]['volumes']; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Check each volume to find a match | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| foreach ($volumes as $volume) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Volume can be string like "host:container:ro" or "host:container" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (is_string($volume)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $parts = explode(':', $volume); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Check if this volume matches our mount_path | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (count($parts) >= 2) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $containerPath = $parts[1]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $options = $parts[2] ?? null; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Match based on mount_path | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Remove leading slash from mount_path if present for comparison | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $mountPath = str($this->mount_path)->ltrim('/')->toString(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $containerPathClean = str($containerPath)->ltrim('/')->toString(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if ($mountPath === $containerPathClean || $this->mount_path === $containerPath) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return $options === 'ro'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+88
to
+107
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix read-only detection when compose adds extra options Skynet spotted a sneaky bug: we only flag read-only when the mode is exactly Letβs normalize the mode flags (split on commas) and handle the array syntax so any read-only declaration still trips the alarm. - foreach ($volumes as $volume) {
- // Volume can be string like "host:container:ro" or "host:container"
- if (is_string($volume)) {
- $parts = explode(':', $volume);
-
- // Check if this volume matches our mount_path
- if (count($parts) >= 2) {
- $containerPath = $parts[1];
- $options = $parts[2] ?? null;
-
- // Match based on mount_path
- // Remove leading slash from mount_path if present for comparison
- $mountPath = str($this->mount_path)->ltrim('/')->toString();
- $containerPathClean = str($containerPath)->ltrim('/')->toString();
-
- if ($mountPath === $containerPathClean || $this->mount_path === $containerPath) {
- return $options === 'ro';
- }
- }
- }
- }
+ foreach ($volumes as $volume) {
+ // Short syntax: "source:target[:mode]"
+ if (is_string($volume)) {
+ $parts = explode(':', $volume);
+ if (count($parts) >= 2) {
+ $containerPath = $parts[1];
+ $options = $parts[2] ?? '';
+ $mountPath = str($this->mount_path)->ltrim('/')->toString();
+ $containerPathClean = str($containerPath)->ltrim('/')->toString();
+
+ if ($mountPath === $containerPathClean || $this->mount_path === $containerPath) {
+ $flags = array_filter(array_map('trim', explode(',', (string) $options)));
+ if (in_array('ro', $flags, true)) {
+ return true;
+ }
+ }
+ }
+ }
+
+ // Long syntax: ['target' => '/data', 'read_only' => true, ...]
+ if (is_array($volume)) {
+ $containerPath = $volume['target'] ?? $volume['destination'] ?? $volume['dst'] ?? null;
+ if (! $containerPath) {
+ continue;
+ }
+
+ $mountPath = str($this->mount_path)->ltrim('/')->toString();
+ $containerPathClean = str($containerPath)->ltrim('/')->toString();
+
+ if ($mountPath === $containerPathClean || $this->mount_path === $containerPath) {
+ $readOnly = $volume['read_only'] ?? $volume['readOnly'] ?? null;
+ if ($readOnly === true || (is_string($readOnly) && str_contains($readOnly, 'ro'))) {
+ return true;
+ }
+ }
+ }
+ }π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } catch (\Throwable $e) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ray($e->getMessage(), 'Error checking read-only persistent volume'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.