AI core review changes

This commit is contained in:
Matej Bačo
2026-01-05 10:32:03 +01:00
parent da5b68490c
commit 226bb6b830
5 changed files with 9 additions and 5 deletions
+5
View File
@@ -253,6 +253,11 @@ App::post('/v1/mock/time-travels')
/** @var Database $dbForProject */
$dbForProject = $getProjectDB($project);
$resource = $dbForProject->getDocument($collection, $resourceId);
if ($resource->isEmpty()) {
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Resource not found');
}
$update = new Document([
'$createdAt' => $createdAt,
]);
@@ -90,7 +90,7 @@ class Create extends Base
Config::getParam('specifications', []),
System::getEnv('_APP_COMPUTE_CPUS', 0),
System::getEnv('_APP_COMPUTE_MEMORY', 0)
), 'Runtime specification for the function SSR executions.', true, ['plan'])
), 'Runtime specification for the SSR executions.', true, ['plan'])
->param('deploymentRetention', 0, new Range(0, APP_COMPUTE_DEPLOYMENT_MAX_RETENTION), 'Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.', true)
->inject('response')
->inject('dbForProject')
@@ -94,7 +94,7 @@ class Update extends Base
Config::getParam('specifications', []),
System::getEnv('_APP_COMPUTE_CPUS', 0),
System::getEnv('_APP_COMPUTE_MEMORY', 0)
), 'Runtime specification for the function SSR executions.', true, ['plan'])
), 'Runtime specification for the SSR executions.', true, ['plan'])
->param('deploymentRetention', 0, new Range(0, APP_COMPUTE_DEPLOYMENT_MAX_RETENTION), 'Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.', true)
->inject('request')
->inject('response')
+2 -2
View File
@@ -907,7 +907,7 @@ class Deletes extends Action
$deploymentIds = [];
$this->deleteByGroup('deployments', [
Query::equal('resourceInternalId', [$siteInternalId]),
Query::equal('resourceType', ['site']),
Query::equal('resourceType', ['sites']),
Query::orderAsc()
], $dbForProject, function (Document $document) use ($project, $certificates, $deviceForSites, $deviceForBuilds, $deviceForFiles, $dbForPlatform, &$deploymentInternalIds) {
$deploymentInternalIds[] = $document->getSequence();
@@ -995,7 +995,7 @@ class Deletes extends Action
$deploymentInternalIds = [];
$this->deleteByGroup('deployments', [
Query::equal('resourceInternalId', [$functionInternalId]),
Query::equal('resourceType', ['function']),
Query::equal('resourceType', ['functions']),
Query::orderAsc()
], $dbForProject, function (Document $document) use ($dbForPlatform, $project, $certificates, $deviceForFunctions, $deviceForBuilds, &$deploymentInternalIds) {
$deploymentInternalIds[] = $document->getSequence();
@@ -3057,7 +3057,6 @@ class SitesCustomServerTest extends Scope
$this->assertEventually(function () use ($siteId, $deploymentId) {
$deployment = $this->getDeployment($siteId, $deploymentId);
\var_dump($deployment['body']['buildLogs']);
$this->assertStringContainsString('2048:2', $deployment['body']['buildLogs']);
}, 10000, 500);