**Project Information **
* Name of tool/project: `@tchin/service-utils`
* Project home page: https://gitlab.wikimedia.org/tchin/service-utils
* Name of team requesting review: #data-engineering
* Primary contact: @tchin
* Target date for deployment: It is currently being used in a POC, with it itself needing a security review so I would say more than a quarter away.
* Link to code repository / patchset: https://gitlab.wikimedia.org/tchin/service-utils
* Link to scc output for general sizing of codebases (https://github.com/boyter/scc):
```
───────────────────────────────────────────────────────────────────────────────
Language Files Lines Blanks Comments Code Complexity
───────────────────────────────────────────────────────────────────────────────
TypeScript 14 1703 141 215 1347 210
JSON 2 4693 0 0 4693 0
YAML 2 22 3 0 19 0
Markdown 1 88 21 0 67 0
gitignore 1 4 0 0 4YAML 1 1 0 0 1 0
───────────────────────────────────────────────────────────────────────────────
Total 2015 65101704 16541 215 61301348 210
───────────────────────────────────────────────────────────────────────────────
Estimated Cost to Develop (organic) $181,312$36,963
Estimated Schedule Effort (organic) 7.193.93 months
Estimated People Required (organic) 2.240.84
───────────────────────────────────────────────────────────────────────────────
Processed 21946148989 bytes, 0.21049 megabytes (SI)
───────────────────────────────────────────────────────────────────────────────
```
**Description of the tool/project: **
`service-utils` is a replacement for an outdated WMF NodeJS library/framework called [[ https://github.com/wikimedia/service-runner | service-runner ]]. `service-runner` makes assumptions on infrastructure that doesn't exist anymore, has features that have been superseded by new infrastructure, and uses libraries that haven't been updated in half a decade.
`service-utils` extracts parts of the code in `service-runner` that are still useful with the objective of modernizing it over time.
**Description of how the tool will be used at WMF:**
It will be used for a NodeJS POC service in the Data Engineering team, and if successful, will be available for everyone at WMF to use if they want to migrate their NodeJS services away from `service-runner`.
**Dependencies**
>List dependencies, or upstream projects that this project relies on.
From the `package.json`
```lang=json
"dependencies": {
"@elastic/ecs-winston-format": "^1.5.3",
"bunyan": "^1.8.15",
"bunyan-syslog-udp": "^0.2.0",
"c12": "^1.10.0",
"gelf-stream": "^1.1.1",
"lodash": "^4.17.21",
"prom-client": "^15.1.0",
"winston": "^3.13.0",
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/bunyan": "^1.8.11",
"@types/express": "^4.17.21",
"@types/lodash": "^4.17.0",
"@types/yargs": "^17.0.32",
"express": "^4.19.2",
"tsup": "^8.0.2",
"vitest": "^1.4.0"
}
```
But some of these dependencies are for `service-runner` compatibility and will be removed when possible
```lang=json
"bunyan": "^1.8.15",
"bunyan-syslog-udp": "^0.2.0",
"gelf-stream": "^1.1.1",
"lodash": "^4.17.21"
```
**Has this project been reviewed before?**
> Please link to tasks or wiki pages of previous reviews.
No
**Working test environment**
>Please link or describe setup process for setting up a test environment.
To install it for use in a NodeJS project:
1. Connect to the WMF GitLab registry
`echo @tchin:registry=https://gitlab.wikimedia.org/api/v4/packages/npm/ >> .npmrc`
2. Install
`npm i @tchin/service-utils`
**Post-deployment**
> Name of team responsible for tool/project after deployment and primary contact.
#data-engineering and @tchin