Page MenuHomePhabricator

Remove preq and use node fetch
Closed, ResolvedPublic

Description

Currently cxserver uses https://github.com/wikimedia/preq library for http(s) requests. However, preq is an unmaintained library. It is a wrapper over other deprecated or unmaintained libraries. preq also brings two high severity security issues as per npm audit checks(T309772: npm audit reports several security issues with Service runner).

cxserver recently upgraded to Node 18. Node 18 has native fetch. So we can start replacing preq with fetch. Since cxserver depends on service-runner, we cannot fully remove the usage of preq. service-runner uses bluebird and preq(T293853: Service-runner depends on preq, a wrapper of request, which is deprecated )

Details

SubjectRepoBranchLines +/-
operations/deployment-chartsmaster+1 -1
mediawiki/services/cxservermaster+154 -762
operations/deployment-chartsmaster+3 -3
mediawiki/services/cxservermaster+141 -75
operations/deployment-chartsmaster+1 -1
mediawiki/services/cxservermaster+16 -28
operations/deployment-chartsmaster+1 -1
mediawiki/services/cxservermaster+38 -26
operations/deployment-chartsmaster+1 -1
mediawiki/services/cxservermaster+64 -31
operations/deployment-chartsmaster+1 -1
mediawiki/services/cxservermaster+57 -27
operations/deployment-chartsmaster+1 -1
mediawiki/services/cxservermaster+102 -52
operations/deployment-chartsmaster+1 -1
mediawiki/services/cxservermaster+44 -28
operations/deployment-chartsmaster+1 -1
mediawiki/services/cxservermaster+35 -28
Show related patches Customize query in gerrit

Event Timeline

Change 972727 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/services/cxserver@master] MinT: use node native fetch instead of preq

https://gerrit.wikimedia.org/r/972727

santhosh changed the task status from Open to In Progress.Nov 8 2023, 10:58 AM
santhosh triaged this task as Medium priority.

Change 972727 merged by jenkins-bot:

[mediawiki/services/cxserver@master] MinT: use node native fetch instead of preq

https://gerrit.wikimedia.org/r/972727

Change 979487 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2023-12-04-055024-production

https://gerrit.wikimedia.org/r/979487

Change 979487 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2023-12-04-055024-production

https://gerrit.wikimedia.org/r/979487

I do not believe this task is completed and ready for review. The usage of the "preq" library has only been replaced for Mint MT client, but the library is still in use for a lot of cases in cxserver codebase. Moving this back to priority backlog.

Change 1005645 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/services/cxserver@master] LingoCloud: Migrate from preq to native fetch

https://gerrit.wikimedia.org/r/1005645

Change 1005646 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/services/cxserver@master] Yandex: Migrate from preq to native fetch

https://gerrit.wikimedia.org/r/1005646

Change 1005648 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/services/cxserver@master] Elia: Migrate from preq to native fetch

https://gerrit.wikimedia.org/r/1005648

Change 1005651 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/services/cxserver@master] Apertium: Migrate from preq to native fetch

https://gerrit.wikimedia.org/r/1005651

Change 1005717 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/services/cxserver@master] Google: Use native fetch API instead of preq

https://gerrit.wikimedia.org/r/1005717

Change 1005757 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/services/cxserver@master] Remove preq usage, use native fetch

https://gerrit.wikimedia.org/r/1005757

Change 1005651 merged by jenkins-bot:

[mediawiki/services/cxserver@master] Apertium: Migrate from preq to native fetch

https://gerrit.wikimedia.org/r/1005651

Change 1008119 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2024-03-04-023843-production

https://gerrit.wikimedia.org/r/1008119

Change 1008119 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2024-03-04-023843-production

https://gerrit.wikimedia.org/r/1008119

Mentioned in SAL (#wikimedia-operations) [2024-03-04T07:08:41Z] <kart_> Updated cxserver to 2024-03-04-023843-production (T350773)

Change 1005645 merged by jenkins-bot:

[mediawiki/services/cxserver@master] LingoCloud: Migrate from preq to native fetch

https://gerrit.wikimedia.org/r/1005645

Change 1008420 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2024-03-04-113412-production

https://gerrit.wikimedia.org/r/1008420

Change 1008420 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2024-03-04-113412-production

https://gerrit.wikimedia.org/r/1008420

Mentioned in SAL (#wikimedia-operations) [2024-03-05T05:15:46Z] <kart_> Updated cxserver to 2024-03-04-113412-production (T350773)

Change 1005646 merged by jenkins-bot:

[mediawiki/services/cxserver@master] Yandex: Migrate from preq to native fetch

https://gerrit.wikimedia.org/r/1005646

Change 1008836 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2024-03-05-082211-production

https://gerrit.wikimedia.org/r/1008836

Change 1008836 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2024-03-05-082211-production

https://gerrit.wikimedia.org/r/1008836

Change 1005648 merged by jenkins-bot:

[mediawiki/services/cxserver@master] Elia: Migrate from preq to native fetch

https://gerrit.wikimedia.org/r/1005648

Change 1009941 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2024-03-11-035839-production

https://gerrit.wikimedia.org/r/1009941

Change 1009941 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2024-03-11-035839-production

https://gerrit.wikimedia.org/r/1009941

Mentioned in SAL (#wikimedia-operations) [2024-03-11T04:52:28Z] <kart_> Updated cxserver to 2024-03-11-035839-production (T350773)

Change 1005717 merged by jenkins-bot:

[mediawiki/services/cxserver@master] Google: Use native fetch API instead of preq

https://gerrit.wikimedia.org/r/1005717

Change 1010169 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2024-03-11-120258-production

https://gerrit.wikimedia.org/r/1010169

Change 1010169 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2024-03-11-120258-production

https://gerrit.wikimedia.org/r/1010169

Mentioned in SAL (#wikimedia-operations) [2024-03-12T05:11:34Z] <kart_> Updated cxserver to 2024-03-11-120258-production (T350773)

Change 1010449 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/services/cxserver@master] Set the proxy to dispatcher option of fetch API

https://gerrit.wikimedia.org/r/1010449

Change 1010498 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/services/cxserver@master] Update tests to use node fetch, remove preq dependency

https://gerrit.wikimedia.org/r/1010498

Change 1010449 merged by jenkins-bot:

[mediawiki/services/cxserver@master] Set the proxy to dispatcher option of fetch API

https://gerrit.wikimedia.org/r/1010449

Change 1010508 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2024-03-12-113634-production

https://gerrit.wikimedia.org/r/1010508

Change 1010508 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2024-03-12-113634-production

https://gerrit.wikimedia.org/r/1010508

Change 1005757 merged by jenkins-bot:

[mediawiki/services/cxserver@master] MW API requests: Remove preq usage, use native fetch

https://gerrit.wikimedia.org/r/1005757

Change 1011033 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2024-03-14-053505-production

https://gerrit.wikimedia.org/r/1011033

Change 1011033 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2024-03-14-053505-production

https://gerrit.wikimedia.org/r/1011033

Mentioned in SAL (#wikimedia-operations) [2024-03-14T07:15:43Z] <kart_> Updated cxserver to 2024-03-14-065833-production (T350773)

Change 1010498 merged by jenkins-bot:

[mediawiki/services/cxserver@master] Update tests to use node fetch, remove preq dependency

https://gerrit.wikimedia.org/r/1010498

Change 1012130 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2024-03-18-053939-production

https://gerrit.wikimedia.org/r/1012130

Change 1012130 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2024-03-18-053939-production

https://gerrit.wikimedia.org/r/1012130

Mentioned in SAL (#wikimedia-operations) [2024-03-18T06:25:20Z] <kart_> Updated cxserver to 2024-03-18-053939-production (T350773)