Correction du worflow release : on ne fait plus les tests (évite le doublons de test avec le ci.yml).
Some checks failed
Tests unitaires / Brain (Python · pytest + couverture) (push) Successful in 21s
Tests unitaires / Web (Angular · vitest + couverture) (push) Successful in 30s
Tests unitaires / Core (Java · mvn test + JaCoCo) (push) Successful in 2m22s
Build & Push Images / build (brain) (push) Successful in 1m16s
E2E Tests / e2e (push) Failing after 5m24s
Build & Push Images / build (core) (push) Successful in 3m5s
Build & Push Images / build-switcher (push) Successful in 50s
Build & Push Images / build (web) (push) Successful in 1m56s
Some checks failed
Tests unitaires / Brain (Python · pytest + couverture) (push) Successful in 21s
Tests unitaires / Web (Angular · vitest + couverture) (push) Successful in 30s
Tests unitaires / Core (Java · mvn test + JaCoCo) (push) Successful in 2m22s
Build & Push Images / build (brain) (push) Successful in 1m16s
E2E Tests / e2e (push) Failing after 5m24s
Build & Push Images / build (core) (push) Successful in 3m5s
Build & Push Images / build-switcher (push) Successful in 50s
Build & Push Images / build (web) (push) Successful in 1m56s
Correction de tests coté java + config Suppression de classes inutilisées coté Angular
This commit is contained in:
@@ -225,7 +225,7 @@ public class BrainRulesImportClient implements RulesPdfImporter {
|
||||
private Map<String, String> toStringMap(JsonNode object) {
|
||||
Map<String, String> out = new LinkedHashMap<>();
|
||||
if (object != null && object.isObject()) {
|
||||
object.fields().forEachRemaining(e -> out.put(e.getKey(), e.getValue().asText()));
|
||||
object.properties().forEach(e -> out.put(e.getKey(), e.getValue().asText()));
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ public class RestTemplateConfig {
|
||||
@Value("${brain.timeout-seconds}") long timeoutSeconds,
|
||||
@Value("${brain.internal-secret}") String internalSecret) {
|
||||
return builder
|
||||
.setConnectTimeout(Duration.ofSeconds(10))
|
||||
.setReadTimeout(Duration.ofSeconds(timeoutSeconds))
|
||||
.connectTimeout(Duration.ofSeconds(10))
|
||||
.readTimeout(Duration.ofSeconds(timeoutSeconds))
|
||||
.additionalInterceptors((request, body, execution) -> {
|
||||
if (internalSecret != null && !internalSecret.isBlank()) {
|
||||
request.getHeaders().set(INTERNAL_SECRET_HEADER, internalSecret);
|
||||
@@ -61,8 +61,8 @@ public class RestTemplateConfig {
|
||||
@Value("${brain.import-timeout-seconds:600}") long importTimeoutSeconds,
|
||||
@Value("${brain.internal-secret}") String internalSecret) {
|
||||
return builder
|
||||
.setConnectTimeout(Duration.ofSeconds(10))
|
||||
.setReadTimeout(Duration.ofSeconds(importTimeoutSeconds))
|
||||
.connectTimeout(Duration.ofSeconds(10))
|
||||
.readTimeout(Duration.ofSeconds(importTimeoutSeconds))
|
||||
.additionalInterceptors((request, body, execution) -> {
|
||||
if (internalSecret != null && !internalSecret.isBlank()) {
|
||||
request.getHeaders().set(INTERNAL_SECRET_HEADER, internalSecret);
|
||||
|
||||
@@ -50,8 +50,8 @@ public class DesktopUpdateService {
|
||||
@Value("${desktop.update.releases-api-url:https://api.github.com/repos/IGMLcreation/LoreMind/releases/latest}") String releasesApiUrl,
|
||||
@Nullable BuildProperties buildProperties) {
|
||||
this.http = builder
|
||||
.setConnectTimeout(Duration.ofSeconds(5))
|
||||
.setReadTimeout(Duration.ofSeconds(10))
|
||||
.connectTimeout(Duration.ofSeconds(5))
|
||||
.readTimeout(Duration.ofSeconds(10))
|
||||
.build();
|
||||
this.enabled = enabled;
|
||||
this.releasesApiUrl = releasesApiUrl;
|
||||
|
||||
@@ -40,8 +40,8 @@ public class HttpLicenseRelay implements LicenseRelay {
|
||||
RestTemplateBuilder builder,
|
||||
@Value("${licensing.relay.base-url:}") String baseUrl) {
|
||||
this.http = builder
|
||||
.setConnectTimeout(Duration.ofSeconds(5))
|
||||
.setReadTimeout(Duration.ofSeconds(15))
|
||||
.connectTimeout(Duration.ofSeconds(5))
|
||||
.readTimeout(Duration.ofSeconds(15))
|
||||
.build();
|
||||
this.baseUrl = stripTrailingSlash(baseUrl);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.loremind.domain.licensing.RegistryCredentials;
|
||||
import com.loremind.domain.licensing.ports.DockerConfigWriter;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -25,6 +26,8 @@ import java.util.Optional;
|
||||
* la plupart du temps.
|
||||
*/
|
||||
@Component
|
||||
// Desactivable (ex: tests) : sans cette propriete (prod), le daemon tourne.
|
||||
@ConditionalOnProperty(name = "licensing.refresh.enabled", matchIfMissing = true)
|
||||
public class LicenseRefreshDaemon {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(LicenseRefreshDaemon.class);
|
||||
|
||||
@@ -4,6 +4,8 @@ import io.minio.BucketExistsArgs;
|
||||
import io.minio.MakeBucketArgs;
|
||||
import io.minio.MinioClient;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -24,6 +26,8 @@ import org.springframework.context.annotation.Configuration;
|
||||
@ConditionalOnProperty(name = "storage.backend", havingValue = "minio", matchIfMissing = true)
|
||||
public class MinioConfig {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(MinioConfig.class);
|
||||
|
||||
@Value("${minio.endpoint}")
|
||||
private String endpoint;
|
||||
|
||||
@@ -66,12 +70,11 @@ public class MinioConfig {
|
||||
boolean exists = client.bucketExists(BucketExistsArgs.builder().bucket(bucket).build());
|
||||
if (!exists) {
|
||||
client.makeBucket(MakeBucketArgs.builder().bucket(bucket).build());
|
||||
System.out.println("[MinIO] Bucket '" + bucket + "' cree.");
|
||||
log.info("[MinIO] Bucket '{}' cree.", bucket);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.err.println("[MinIO] Initialisation impossible (endpoint=" + endpoint
|
||||
+ "). Les uploads d'images echoueront tant que MinIO n'est pas joignable. "
|
||||
+ "Cause : " + e.getMessage());
|
||||
log.warn("[MinIO] Initialisation impossible (endpoint={}). Les uploads d'images "
|
||||
+ "echoueront tant que MinIO n'est pas joignable. Cause : {}", endpoint, e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@ public class UpdateCheckService {
|
||||
LicenseService licenseService,
|
||||
@Nullable BuildProperties buildProperties) {
|
||||
this.http = builder
|
||||
.setConnectTimeout(Duration.ofSeconds(5))
|
||||
.setReadTimeout(Duration.ofSeconds(15))
|
||||
.connectTimeout(Duration.ofSeconds(5))
|
||||
.readTimeout(Duration.ofSeconds(15))
|
||||
.build();
|
||||
this.registry = normalizeRegistry(registry);
|
||||
this.images = parseImages(imagesCsv);
|
||||
|
||||
@@ -29,6 +29,9 @@ spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
|
||||
spring.jpa.hibernate.ddl-auto=validate
|
||||
spring.jpa.show-sql=true
|
||||
spring.jpa.properties.hibernate.format_sql=true
|
||||
# Fixe explicitement open-in-view (defaut Spring = true) : meme comportement,
|
||||
# mais supprime l'avertissement "spring.jpa.open-in-view is enabled by default".
|
||||
spring.jpa.open-in-view=true
|
||||
|
||||
# ============================================================================
|
||||
# Flyway : migrations de schema versionnees (src/main/resources/db/migration).
|
||||
|
||||
Reference in New Issue
Block a user