Merge branch '1.9.x' into fix/vcs-stale-project-deployments

This commit is contained in:
Harsh Mahajan
2026-05-07 12:38:48 +05:30
committed by harsh mahajan
4 changed files with 106 additions and 58 deletions
Generated
+12 -12
View File
@@ -3850,16 +3850,16 @@
},
{
"name": "utopia-php/database",
"version": "5.4.1",
"version": "5.4.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "688d9422b5ff42ac2ecc29397d94891cfd772e93"
"reference": "a1bb3e2a4fba13032ea625b21a21039c43cffeda"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/688d9422b5ff42ac2ecc29397d94891cfd772e93",
"reference": "688d9422b5ff42ac2ecc29397d94891cfd772e93",
"url": "https://api.github.com/repos/utopia-php/database/zipball/a1bb3e2a4fba13032ea625b21a21039c43cffeda",
"reference": "a1bb3e2a4fba13032ea625b21a21039c43cffeda",
"shasum": ""
},
"require": {
@@ -3903,9 +3903,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/5.4.1"
"source": "https://github.com/utopia-php/database/tree/5.4.2"
},
"time": "2026-04-29T07:32:59+00:00"
"time": "2026-04-30T09:59:57+00:00"
},
{
"name": "utopia-php/detector",
@@ -4530,16 +4530,16 @@
},
{
"name": "utopia-php/migration",
"version": "1.9.5",
"version": "1.9.6",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/migration.git",
"reference": "952a4dfe232702f80e45c35129466a8d8cb4c599"
"reference": "b164631404ec759f8c368fe2321f44c22bc258ab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/migration/zipball/952a4dfe232702f80e45c35129466a8d8cb4c599",
"reference": "952a4dfe232702f80e45c35129466a8d8cb4c599",
"url": "https://api.github.com/repos/utopia-php/migration/zipball/b164631404ec759f8c368fe2321f44c22bc258ab",
"reference": "b164631404ec759f8c368fe2321f44c22bc258ab",
"shasum": ""
},
"require": {
@@ -4579,9 +4579,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/migration/issues",
"source": "https://github.com/utopia-php/migration/tree/1.9.5"
"source": "https://github.com/utopia-php/migration/tree/1.9.6"
},
"time": "2026-04-29T11:19:13+00:00"
"time": "2026-04-30T08:11:07+00:00"
},
{
"name": "utopia-php/mongo",
@@ -544,18 +544,28 @@ trait Deployment
if ($e->getType() === Exception::PROJECT_NOT_FOUND) {
Console::warning("Skipping repository '{$repositoryId}': project '{$projectId}' not found");
} else {
$errors[] = $e->getMessage();
$errors[] = $e;
}
} catch (\Throwable $e) {
Span::add("{$logBase}.error", $e->getMessage());
$errors[] = $e->getMessage();
$errors[] = $e;
}
}
$queueForBuilds->reset(); // prevent shutdown hook from triggering again
if (!empty($errors)) {
throw new Exception(Exception::GENERAL_UNKNOWN, \implode("\n", $errors));
foreach ($errors as $error) {
if ($error instanceof Exception && $error->getCode() >= 500) {
throw $error;
}
}
foreach ($errors as $error) {
if ($error instanceof Exception && $error->getCode() >= 400) {
throw $error;
}
}
throw new Exception(Exception::GENERAL_UNKNOWN);
}
}
+31 -1
View File
@@ -163,6 +163,12 @@ class Specs extends Action
'description' => 'Your secret dev API key',
'in' => 'header',
],
'Cookie' => [
'type' => 'apiKey',
'name' => 'Cookie',
'description' => 'The user cookie to authenticate with. Used by SDKs that forward an incoming Cookie header in server-side runtimes.',
'in' => 'header',
],
'ImpersonateUserId' => [
'type' => 'apiKey',
'name' => 'X-Appwrite-Impersonate-User-Id',
@@ -219,6 +225,18 @@ class Specs extends Action
'description' => 'The user agent string of the client that made the request',
'in' => 'header',
],
'DevKey' => [
'type' => 'apiKey',
'name' => 'X-Appwrite-Dev-Key',
'description' => 'Your secret dev API key',
'in' => 'header',
],
'Cookie' => [
'type' => 'apiKey',
'name' => 'Cookie',
'description' => 'The user cookie to authenticate with. Used by SDKs that forward an incoming Cookie header in server-side runtimes.',
'in' => 'header',
],
'ImpersonateUserId' => [
'type' => 'apiKey',
'name' => 'X-Appwrite-Impersonate-User-Id',
@@ -272,7 +290,19 @@ class Specs extends Action
'Cookie' => [
'type' => 'apiKey',
'name' => 'Cookie',
'description' => 'The user cookie to authenticate with',
'description' => 'The user cookie to authenticate with. Used by SDKs that forward an incoming Cookie header in server-side runtimes.',
'in' => 'header',
],
'Session' => [
'type' => 'apiKey',
'name' => 'X-Appwrite-Session',
'description' => 'The user session to authenticate with',
'in' => 'header',
],
'DevKey' => [
'type' => 'apiKey',
'name' => 'X-Appwrite-Dev-Key',
'description' => 'Your secret dev API key',
'in' => 'header',
],
'ImpersonateUserId' => [
+50 -42
View File
@@ -338,6 +338,55 @@ class Migrations extends Action
);
}
/**
* @return array<string>
*/
protected function getAPIKeyScopes(): array
{
return [
'users.read',
'users.write',
'teams.read',
'teams.write',
'buckets.read',
'buckets.write',
'files.read',
'files.write',
'functions.read',
'functions.write',
'sites.read',
'sites.write',
'tokens.read',
'tokens.write',
'providers.read',
'providers.write',
'topics.read',
'topics.write',
'subscribers.read',
'subscribers.write',
'messages.read',
'messages.write',
'targets.read',
'targets.write',
'webhooks.read',
'webhooks.write',
'project.read',
'project.write',
'keys.read',
'keys.write',
'platforms.read',
'platforms.write',
'oauth2.read',
'oauth2.write',
'mocks.read',
'mocks.write',
'policies.read',
'policies.write',
'templates.read',
'templates.write',
];
}
/**
* @throws Exception
*/
@@ -358,48 +407,7 @@ class Migrations extends Action
METRIC_NETWORK_INBOUND,
METRIC_NETWORK_OUTBOUND,
],
'scopes' => [
'users.read',
'users.write',
'teams.read',
'teams.write',
'buckets.read',
'buckets.write',
'files.read',
'files.write',
'functions.read',
'functions.write',
'sites.read',
'sites.write',
'tokens.read',
'tokens.write',
'providers.read',
'providers.write',
'topics.read',
'topics.write',
'subscribers.read',
'subscribers.write',
'messages.read',
'messages.write',
'targets.read',
'targets.write',
'webhooks.read',
'webhooks.write',
'project.read',
'project.write',
'keys.read',
'keys.write',
'platforms.read',
'platforms.write',
'oauth2.read',
'oauth2.write',
'mocks.read',
'mocks.write',
'policies.read',
'policies.write',
'templates.read',
'templates.write',
]
'scopes' => $this->getAPIKeyScopes(),
]);
return API_KEY_EPHEMERAL . '_' . $apiKey;