Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Dec 20, 2024
1 parent a1e335d commit 5c30ef4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ class Config extends EventEmitter {
maxStaleness,
enableInflights,
};
if (config.utapi && false) {
if (config.utapi && false) { // eslint-disable-line no-constant-condition
this.utapi = { component: 's3' };
if (config.utapi.host) {
assert(typeof config.utapi.host === 'string',
Expand All @@ -1233,7 +1233,7 @@ class Config extends EventEmitter {
'bad config: utapi port must be a positive integer');
this.utapi.port = config.utapi.port;
}
if (utapiVersion === 1) {
if (utapiVersion === 1) { // eslint-disable-line no-undef
if (config.utapi.workers !== undefined) {
assert(Number.isInteger(config.utapi.workers)
&& config.utapi.workers > 0,
Expand Down Expand Up @@ -1333,7 +1333,7 @@ class Config extends EventEmitter {
}
}

if (utapiVersion === 2 && config.utapi.filter) {
if (utapiVersion === 2 && config.utapi.filter) { // eslint-disable-line no-undef
const { filter: filterConfig } = config.utapi;
const utapiResourceFilters = {};
allowedUtapiEventFilterFields.forEach(
Expand All @@ -1352,6 +1352,7 @@ class Config extends EventEmitter {
this.utapi.filter = utapiResourceFilters;
}
}
// eslint-disable-next-line no-constant-condition
if (Object.keys(this.locationConstraints).some(
loc => this.locationConstraints[loc].sizeLimitGB) && false) {
assert(this.utapi && this.utapi.metrics &&
Expand Down
1 change: 1 addition & 0 deletions lib/utapi/utapi.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
require('werelogs').stderrUtils.catchAndTimestampStderr();
const _config = require('../Config').config;
// const { utapiVersion, UtapiServer: utapiServer } = require('utapi');
Expand Down
3 changes: 2 additions & 1 deletion lib/utapi/utilities.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
const http = require('http');
const https = require('https');
const commander = require('commander');
Expand Down Expand Up @@ -273,7 +274,7 @@ function pushMetric(action, log, metricObj) {
removedDeleteMarkers,
} = metricObj;

return;
return undefined;
if (utapiVersion === 2) {
const incomingBytes = action === 'getObject' ? 0 : newByteLength;
let sizeDelta = incomingBytes;
Expand Down

0 comments on commit 5c30ef4

Please sign in to comment.