aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/lib/activitypub/context.ts1
-rw-r--r--server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts4
-rw-r--r--server/lib/opentelemetry/metrics.ts2
-rw-r--r--server/tests/api/videos/resumable-upload.ts8
4 files changed, 8 insertions, 7 deletions
diff --git a/server/lib/activitypub/context.ts b/server/lib/activitypub/context.ts
index 5d6aee315..5308d32fe 100644
--- a/server/lib/activitypub/context.ts
+++ b/server/lib/activitypub/context.ts
@@ -24,6 +24,7 @@ const contextStore: { [ id in ContextType ]: (string | { [ id: string ]: string
24 subtitleLanguage: 'sc:subtitleLanguage', 24 subtitleLanguage: 'sc:subtitleLanguage',
25 sensitive: 'as:sensitive', 25 sensitive: 'as:sensitive',
26 language: 'sc:inLanguage', 26 language: 'sc:inLanguage',
27 identifier: 'sc:identifier',
27 28
28 // TODO: remove in a few versions, introduced in 4.2 29 // TODO: remove in a few versions, introduced in 4.2
29 icons: 'as:icon', 30 icons: 'as:icon',
diff --git a/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts b/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts
index 473015e91..781722108 100644
--- a/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts
+++ b/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts
@@ -2,8 +2,8 @@ import { readdir } from 'fs-extra'
2import { constants, PerformanceObserver } from 'perf_hooks' 2import { constants, PerformanceObserver } from 'perf_hooks'
3import * as process from 'process' 3import * as process from 'process'
4import { Meter, ObservableResult } from '@opentelemetry/api-metrics' 4import { Meter, ObservableResult } from '@opentelemetry/api-metrics'
5import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics-base' 5import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics'
6import { View } from '@opentelemetry/sdk-metrics-base/build/src/view/View' 6import { View } from '@opentelemetry/sdk-metrics/build/src/view/View'
7import { logger } from '@server/helpers/logger' 7import { logger } from '@server/helpers/logger'
8 8
9// Thanks to https://github.com/siimon/prom-client 9// Thanks to https://github.com/siimon/prom-client
diff --git a/server/lib/opentelemetry/metrics.ts b/server/lib/opentelemetry/metrics.ts
index ba33c9505..fc1666604 100644
--- a/server/lib/opentelemetry/metrics.ts
+++ b/server/lib/opentelemetry/metrics.ts
@@ -1,7 +1,7 @@
1import { Application, Request, Response } from 'express' 1import { Application, Request, Response } from 'express'
2import { Meter, metrics } from '@opentelemetry/api-metrics' 2import { Meter, metrics } from '@opentelemetry/api-metrics'
3import { PrometheusExporter } from '@opentelemetry/exporter-prometheus' 3import { PrometheusExporter } from '@opentelemetry/exporter-prometheus'
4import { MeterProvider } from '@opentelemetry/sdk-metrics-base' 4import { MeterProvider } from '@opentelemetry/sdk-metrics'
5import { logger } from '@server/helpers/logger' 5import { logger } from '@server/helpers/logger'
6import { CONFIG } from '@server/initializers/config' 6import { CONFIG } from '@server/initializers/config'
7import { MVideoImmutable } from '@server/types/models' 7import { MVideoImmutable } from '@server/types/models'
diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts
index 0625828a1..0cf1e6675 100644
--- a/server/tests/api/videos/resumable-upload.ts
+++ b/server/tests/api/videos/resumable-upload.ts
@@ -169,11 +169,11 @@ describe('Test resumable upload', function () {
169 it('Should not accept more chunks than expected with an invalid content length/content range', async function () { 169 it('Should not accept more chunks than expected with an invalid content length/content range', async function () {
170 const uploadId = await prepareUpload({ size: 1500 }) 170 const uploadId = await prepareUpload({ size: 1500 })
171 171
172 // Content length check seems to have changed in v16 172 // Content length check can be different depending on the node version
173 if (process.version.startsWith('v16')) { 173 try {
174 await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentLength: 1000 }) 174 await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentLength: 1000 })
175 await checkFileSize(uploadId, 1000) 175 await checkFileSize(uploadId, 0)
176 } else { 176 } catch {
177 await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.BAD_REQUEST_400, contentLength: 1000 }) 177 await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.BAD_REQUEST_400, contentLength: 1000 })
178 await checkFileSize(uploadId, 0) 178 await checkFileSize(uploadId, 0)
179 } 179 }