Skip to content

Commit 218026c

Browse files
committed
S3UTILS-207: Strip v1 format Master key prefix from scuba metrics keys
Remove \x7fM from bucket keys before extracting canonical IDs.
1 parent 5f25b40 commit 218026c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

service-level-sidecar/bucketd.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ async function* listBuckets(log) {
5252
log.debug('got list of buckets from bucketd', { length: res.length });
5353

5454
yield res.map(data => {
55-
const { key, value } = data;
55+
const { value, key: rawKey } = data;
56+
let key = rawKey;
57+
if (key.startsWith('\x7fM')) {
58+
key = key.slice(2);
59+
}
5660
const [account, name] = key.split(mdKeySplitter);
5761
return {
5862
account,

0 commit comments

Comments
 (0)