From d4e43bcee8e73ababdfc8a0c49234913d982a872 Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Mon, 13 Apr 2026 12:40:31 +0200 Subject: [PATCH 1/3] Parametro para poder elegir una restauracion completa o solo actualizar cache en el procedimiento RestaurarImagen --- CHANGELOG.md | 5 +++++ src/Controller/OgAgent/DeployImageAction.php | 4 +++- src/Dto/Input/DeployImageInput.php | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39571c2..481baa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Changelog + +## [1.4.1] - 2026-04-08 +### Added +- En el comando RestaurarImagen se añade el parámetros "update-cache" o "deploy" para realizar el despliegue completo o sólo la actualización de la cache + ## [1.4.0] - 2026-04-08 ### Added - Entidad Partition: Añadido el campo deployDate expuesto mediante el DTO para registrar la fecha exacta de despliegue de imagen. diff --git a/src/Controller/OgAgent/DeployImageAction.php b/src/Controller/OgAgent/DeployImageAction.php index 5d12823..9677a38 100644 --- a/src/Controller/OgAgent/DeployImageAction.php +++ b/src/Controller/OgAgent/DeployImageAction.php @@ -61,6 +61,8 @@ class DeployImageAction extends AbstractOgAgentController $repository = $imageImageRepository->getRepository(); + $nfn = ($input->deployMode === 'update-cache') ? 'ActualizarCache' : 'RestaurarImagen'; + $data = [ 'dsk' => (string) $input->diskNumber, 'par' => (string) $input->partitionNumber, @@ -68,7 +70,7 @@ class DeployImageAction extends AbstractOgAgentController 'idi' => $image->getUuid(), 'nci' => $imageImageRepository->getName(), 'ipr' => $repository->getIp(), - 'nfn' => 'RestaurarImagen', + 'nfn' => $nfn, 'ptc' => $ptcValue, 'ids' => '0' ]; diff --git a/src/Dto/Input/DeployImageInput.php b/src/Dto/Input/DeployImageInput.php index e76d77e..59762fd 100644 --- a/src/Dto/Input/DeployImageInput.php +++ b/src/Dto/Input/DeployImageInput.php @@ -74,4 +74,8 @@ class DeployImageInput #[Groups(['image-image-repository:write'])] #[ApiProperty(description: 'Whether to queue the deployment', example: false)] public bool $queue = false; + + #[Groups(['image-image-repository:write'])] + #[ApiProperty(description: 'Deploy mode: full deploy or cache-only update', example: 'deploy')] + public ?string $deployMode = 'deploy'; // 'deploy' | 'update-cache' } From 140283a2a8bca359f51a1c0993cd68691ad7790a Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Mon, 13 Apr 2026 14:02:33 +0200 Subject: [PATCH 2/3] =?UTF-8?q?fichero=20de=20migracion=20de=20doctrine=20?= =?UTF-8?q?con=20el=20cambio=20para=20a=C3=B1adir=20fecha=20de=20despliegu?= =?UTF-8?q?e=20de=20imagen=20en=20particion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ migrations/Version20260413114545.php | 31 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 migrations/Version20260413114545.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 481baa1..39d73b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [1.4.2] - 2026-04-13 +### Fixed +- Añadido fichero de migración con el cambio en la base de datos para añadir la fecha de despliegue de una partición. + ## [1.4.1] - 2026-04-08 ### Added - En el comando RestaurarImagen se añade el parámetros "update-cache" o "deploy" para realizar el despliegue completo o sólo la actualización de la cache diff --git a/migrations/Version20260413114545.php b/migrations/Version20260413114545.php new file mode 100644 index 0000000..53b03c2 --- /dev/null +++ b/migrations/Version20260413114545.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE `partition` ADD deploy_date DATETIME DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE `partition` DROP deploy_date'); + } +} From 195af87db67cbe584a6086c568929efb4a0a35b0 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 14 Apr 2026 12:19:39 +0200 Subject: [PATCH 3/3] update framework to use just one certificate --- config/packages/framework.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index b6cfd9e..5bc08c3 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -5,6 +5,13 @@ framework: annotations: false http_method_override: false handle_all_throwables: true + trusted_proxies: '127.0.0.1' + trusted_headers: + - x-forwarded-for + - x-forwarded-host + - x-forwarded-proto + - x-forwarded-port + - x-forwarded-prefix # Enables session support. Note that the session will ONLY be started if you read or write from it. # Remove or comment this section to explicitly disable session support.