ci: Fix intermittent build issue (#20460)

This commit is contained in:
Iván Ovejero 2025-10-07 10:38:43 +02:00 committed by GitHub
parent cfaf1270ca
commit e67fac66f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -956,11 +956,13 @@ export class SourceControlImportService {
overriddenKeys.splice(overriddenKeys.indexOf(variable.key), 1);
}
try {
// @ts-ignore Workaround for intermittent typecheck issue with _QueryDeepPartialEntity
await this.variablesRepository.upsert({ ...variable }, ['id']);
} catch (errorUpsert) {
if (isUniqueConstraintError(errorUpsert as Error)) {
this.logger.debug(`Variable ${variable.key} already exists, updating instead`);
try {
// @ts-ignore Workaround for intermittent typecheck issue with _QueryDeepPartialEntity
await this.variablesRepository.update({ key: variable.key }, { ...variable });
} catch (errorUpdate) {
this.logger.debug(`Failed to update variable ${variable.key}, skipping`);

View File

@ -44,6 +44,7 @@ export class McpServerApiKeyService {
label: API_KEY_LABEL,
});
// @ts-ignore Workaround for intermittent typecheck issue with _QueryDeepPartialEntity
await manager.insert(ApiKey, apiKeyEntity);
return await manager.findOneByOrFail(ApiKey, { apiKey });