From cd089b475b5a6bd2ca3efa470e0cc66ef0e16cc3 Mon Sep 17 00:00:00 2001 From: Taylor McKinnon Date: Mon, 12 Jan 2026 11:28:55 -0800 Subject: [PATCH 1/5] bf(CLDSRV-822): Add removedDeleteMarkers when set to numberOfObjects for utapiv1 (cherry picked from commit e7346cd933cd2c3c221af672bfd7cd5ee1bc6895) --- lib/utapi/utilities.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/utapi/utilities.js b/lib/utapi/utilities.js index 69626decab..f7cd672f1a 100644 --- a/lib/utapi/utilities.js +++ b/lib/utapi/utilities.js @@ -331,6 +331,11 @@ function pushMetric(action, log, metricObj) { oldByteLength, numberOfObjects, }; + + if (removedDeleteMarkers) { + utapiObj.numberOfObjects = numberOfObjects + removedDeleteMarkers; + } + // If `authInfo` is included by the API, get the account's canonical ID for // account-level metrics and the shortId for user-level metrics. Otherwise // check if the canonical ID is already provided for account-level metrics. From 13b205bae5787f870e20f5eafd1bcdf20cb9325c Mon Sep 17 00:00:00 2001 From: Taylor McKinnon Date: Wed, 14 Jan 2026 11:07:31 -0800 Subject: [PATCH 2/5] bf(CLDSRV-822): Fix list metric cli utility (cherry picked from commit 4eabaecf6108d7015a41a49a531cb5ecad385473) --- lib/utapi/utilities.js | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/lib/utapi/utilities.js b/lib/utapi/utilities.js index f7cd672f1a..32ea8432ac 100644 --- a/lib/utapi/utilities.js +++ b/lib/utapi/utilities.js @@ -1,6 +1,6 @@ const http = require('http'); const https = require('https'); -const commander = require('commander'); +const { program } = require('commander'); const { auth } = require('arsenal'); const { UtapiClient, utapiVersion } = require('utapi'); const logger = require('../utilities/logger'); @@ -123,7 +123,7 @@ function _listMetrics(host, * @return {undefined} */ function listMetrics(metricType) { - commander + program .version('0.0.1') .option('-a, --access-key ', 'Access key id') .option('-k, --secret-key ', 'Secret access key'); @@ -132,11 +132,11 @@ function listMetrics(metricType) { // bin/list_bucket_metrics.js when prior method of listing bucket metrics is // no longer supported. if (metricType === 'buckets') { - commander + program .option('-b, --buckets ', 'Name of bucket(s) with ' + 'a comma separator if more than one'); } else { - commander + program .option('-m, --metric ', 'Metric type') .option('--buckets ', 'Name of bucket(s) with a comma ' + 'separator if more than one') @@ -146,7 +146,7 @@ function listMetrics(metricType) { 'more than one') .option('--service ', 'Name of service'); } - commander + program .option('-s, --start ', 'Start of time range') .option('-r, --recent', 'List metrics including the previous and ' + 'current 15 minute interval') @@ -157,41 +157,39 @@ function listMetrics(metricType) { .option('-v, --verbose') .parse(process.argv); - const { host, port, accessKey, secretKey, start, end, verbose, recent, - ssl } = - commander; + + const providedOptions = program.opts(); + const { host, port, accessKey, secretKey, start, end, verbose, recent, ssl, metric: metricLvl } = providedOptions; const requiredOptions = { host, port, accessKey, secretKey }; // If not old style bucket metrics, we require usage of the metric option if (metricType !== 'buckets') { - requiredOptions.metric = commander.metric; const validMetrics = ['buckets', 'accounts', 'users', 'service']; - if (validMetrics.indexOf(commander.metric) < 0) { - logger.error('metric must be \'buckets\', \'accounts\', ' + - '\'users\', or \'service\''); - commander.outputHelp(); + if (validMetrics.indexOf(metricLvl) < 0) { + logger.error("metric must be one of 'buckets', 'accounts', 'users', or 'service'"); + program.outputHelp(); process.exit(1); return; } } // If old style bucket metrics, `metricType` will be 'buckets'. Otherwise, - // `commander.metric` should be defined. - const metric = metricType === 'buckets' ? 'buckets' : commander.metric; - requiredOptions[metric] = commander[metric]; + // `metricLvl` should be defined. + const metric = metricType === 'buckets' ? 'buckets' : metricLvl; + requiredOptions[metric] = providedOptions[metric]; // If not recent listing, the start option must be provided if (!recent) { - requiredOptions.start = commander.start; + requiredOptions.start = providedOptions.start; } Object.keys(requiredOptions).forEach(option => { if (!requiredOptions[option]) { logger.error(`missing required option: ${option}`); - commander.outputHelp(); + program.outputHelp(); process.exit(1); } }); - // The string `commander[metric]` is a comma-separated list of resources + // The string `providedOptions[metric]` is a comma-separated list of resources // given by the user. - const resources = commander[metric].split(','); + const resources = providedOptions[metric].split(','); // Validate passed accounts to remove any canonicalIDs if (metric === 'accounts') { @@ -208,7 +206,7 @@ function listMetrics(metricType) { const numStart = Number.parseInt(start, 10); if (!numStart) { logger.error('start must be a number'); - commander.outputHelp(); + program.outputHelp(); process.exit(1); return; } @@ -217,7 +215,7 @@ function listMetrics(metricType) { const numEnd = Number.parseInt(end, 10); if (!numEnd) { logger.error('end must be a number'); - commander.outputHelp(); + program.outputHelp(); process.exit(1); return; } From 182a4f394b9f3dad59ab5e49e1260d61d943629b Mon Sep 17 00:00:00 2001 From: Taylor McKinnon Date: Fri, 16 Jan 2026 09:36:17 -0800 Subject: [PATCH 3/5] bf(CLDSRV-831): Install python3-redis in docker images for utapiv1 reindex (cherry picked from commit 297b624f6ca95e6f0c202de2c3f78d2788e12333) --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1773939a43..858ab5ad1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,10 +38,11 @@ ENV no_proxy=localhost,127.0.0.1 EXPOSE 8000 EXPOSE 8002 -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ jq \ tini \ + python3-redis \ && rm -rf /var/lib/apt/lists/* WORKDIR /usr/src/app From 1489669a2afc09b12566888bc7fe702208fbd749 Mon Sep 17 00:00:00 2001 From: Taylor McKinnon Date: Mon, 19 Jan 2026 08:55:45 -0800 Subject: [PATCH 4/5] bf(CLDSRV-834): Bump UTAPI version to 8.2.4 (cherry picked from commit 2cd039617b6e7a663bc4389093ef2e40565a421e) --- package.json | 2 +- yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2fae5d1c48..4b8007fb07 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "request": "^2.88.2", "scubaclient": "git+https://github.com/scality/scubaclient.git#fb7375a9298bda7df0e9f9ed81d7fc5b363590a9", "sql-where-parser": "^2.2.1", - "utapi": "github:scality/utapi#8.2.3", + "utapi": "github:scality/utapi#8.2.4", "utf-8-validate": "^6.0.5", "utf8": "^3.0.0", "uuid": "^11.0.3", diff --git a/yarn.lock b/yarn.lock index fa723b6f34..65ec817b9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6947,9 +6947,9 @@ url@0.10.3: punycode "1.3.2" querystring "0.2.0" -"utapi@github:scality/utapi#8.2.3": +"utapi@github:scality/utapi#8.2.4": version "8.2.4" - resolved "https://codeload.github.com/scality/utapi/tar.gz/f4366f8a40b3b009cdf016129f79bb13e2655ed2" + resolved "https://codeload.github.com/scality/utapi/tar.gz/0268bc1f00423648a456a633d27972e8c8d70c93" dependencies: "@hapi/joi" "^17.1.1" "@senx/warp10" "^2.0.3" From fce59d7edeb9386a9812078d5a4e59b3446ee447 Mon Sep 17 00:00:00 2001 From: Taylor McKinnon Date: Mon, 19 Jan 2026 12:10:37 -0800 Subject: [PATCH 5/5] Bump version to 9.0.32-1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b8007fb07..8f277636d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zenko/cloudserver", - "version": "9.0.32", + "version": "9.0.32-1", "description": "Zenko CloudServer, an open-source Node.js implementation of a server handling the Amazon S3 protocol", "main": "index.js", "engines": {