From 03964c49c237524a50fe4a19fa3c49551cea72cf Mon Sep 17 00:00:00 2001 From: LVerneyEC Date: Mon, 17 Nov 2025 15:03:02 +0100 Subject: [PATCH 1/3] Fix http(s)-proxy-agent imports in htmlOnlyFetcher --- CHANGELOG.md | 11 +++++++++++ src/archivist/fetcher/htmlOnlyFetcher.js | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83b148ed9..4761fd82d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All changes that impact users of this module are documented in this file, in the [Common Changelog](https://common-changelog.org) format with some additional specifications defined in the CONTRIBUTING file. This codebase adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +_Full changeset and discussions: [#1206](https://github.com/OpenTermsArchive/engine/pull/1206)._ + +> Development of this release was supported by the [European Commission](https://commission.europa.eu/) for its [VLOPs/VLOSEs instance](https://code.europa.eu/dsa/terms-and-conditions-database/vlops-and-vloses/). + +### Fixed + +- Fixed improper import of `http-proxy-agent` / `https-proxy-agent` in the `htmlOnlyFetch`. + + ## 9.2.0 - 2025-11-05 _Full changeset and discussions: [#1173](https://github.com/OpenTermsArchive/engine/pull/1173)._ diff --git a/src/archivist/fetcher/htmlOnlyFetcher.js b/src/archivist/fetcher/htmlOnlyFetcher.js index e3e581c44..2a25f28c6 100644 --- a/src/archivist/fetcher/htmlOnlyFetcher.js +++ b/src/archivist/fetcher/htmlOnlyFetcher.js @@ -1,7 +1,7 @@ import AbortController from 'abort-controller'; import convertBody from 'fetch-charset-detection'; // eslint-disable-line import/no-unresolved -import HttpProxyAgent from 'http-proxy-agent'; -import HttpsProxyAgent from 'https-proxy-agent'; +import { HttpProxyAgent } from 'http-proxy-agent'; +import { HttpsProxyAgent } from 'https-proxy-agent'; import nodeFetch, { AbortError } from 'node-fetch'; import { resolveProxyConfiguration } from './proxyUtils.js'; From c2b347b5a5c00a33d861f60a8082afa8ad93e6ac Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Wed, 19 Nov 2025 09:49:12 +0100 Subject: [PATCH 2/3] Update changelog entry --- CHANGELOG.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4761fd82d..b5ce6f4b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,16 +2,13 @@ All changes that impact users of this module are documented in this file, in the [Common Changelog](https://common-changelog.org) format with some additional specifications defined in the CONTRIBUTING file. This codebase adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased - -_Full changeset and discussions: [#1206](https://github.com/OpenTermsArchive/engine/pull/1206)._ +## Unreleased [patch] > Development of this release was supported by the [European Commission](https://commission.europa.eu/) for its [VLOPs/VLOSEs instance](https://code.europa.eu/dsa/terms-and-conditions-database/vlops-and-vloses/). ### Fixed -- Fixed improper import of `http-proxy-agent` / `https-proxy-agent` in the `htmlOnlyFetch`. - +- Fix tracking when proxy configuration is provided ## 9.2.0 - 2025-11-05 From 18378f98b26bed5a3649ab76393306bed511638b Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Wed, 19 Nov 2025 10:13:20 +0100 Subject: [PATCH 3/3] Fix random tests failures on windows --- src/archivist/recorder/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/archivist/recorder/index.js b/src/archivist/recorder/index.js index eb65e0632..c532d5cc9 100644 --- a/src/archivist/recorder/index.js +++ b/src/archivist/recorder/index.js @@ -12,8 +12,11 @@ export default class Recorder { return Promise.all([ this.versionsRepository.initialize(), this.snapshotsRepository.initialize() ]); } - finalize() { - return Promise.all([ this.versionsRepository.finalize(), this.snapshotsRepository.finalize() ]); + async finalize() { + // Close repositories sequentially to avoid race conditions when both repositories use the same MongoDB connection (same server/database). + // Parallel closing can cause "Operation interrupted because client was closed" errors, especially on Windows. + await this.versionsRepository.finalize(); + await this.snapshotsRepository.finalize(); } getLatestSnapshot(terms, sourceDocumentId) {