Skip to content

Commit 7b3d52b

Browse files
committed
recert namespace changes
1 parent daaa28a commit 7b3d52b

File tree

5 files changed

+201
-102
lines changed

5 files changed

+201
-102
lines changed

src/agent/block_store_services/block_store_s3.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class BlockStoreS3 extends BlockStoreBase {
7777
async init() {
7878
try {
7979
if (this.cloud_info.aws_sts_arn) {
80-
this.s3cloud = await cloud_utils.createSTSS3Client(this.cloud_info, this.additionalS3Params);
80+
this.s3cloud = await cloud_utils.createSTSS3SDKv3Client(this.cloud_info, this.additionalS3Params);
8181
}
8282
const res = await this.s3cloud.getObject({
8383
Bucket: this.cloud_info.target_bucket,
@@ -104,7 +104,7 @@ class BlockStoreS3 extends BlockStoreBase {
104104

105105
async _read_block_md(block_md) {
106106
if (this.cloud_info.aws_sts_arn) {
107-
this.s3cloud = await cloud_utils.createSTSS3Client(this.cloud_info, this.additionalS3Params);
107+
this.s3cloud = await cloud_utils.createSTSS3SDKv3Client(this.cloud_info, this.additionalS3Params);
108108
}
109109
const res = await this.s3cloud.headObject({
110110
Bucket: this.cloud_info.target_bucket,
@@ -162,7 +162,7 @@ class BlockStoreS3 extends BlockStoreBase {
162162
async _read_block(block_md) {
163163
try {
164164
if (this.cloud_info.aws_sts_arn) {
165-
this.s3cloud = await cloud_utils.createSTSS3Client(this.cloud_info, this.additionalS3Params);
165+
this.s3cloud = await cloud_utils.createSTSS3SDKv3Client(this.cloud_info, this.additionalS3Params);
166166
}
167167
const res = await this.s3cloud.getObject({
168168
Bucket: this.cloud_info.target_bucket,
@@ -189,7 +189,7 @@ class BlockStoreS3 extends BlockStoreBase {
189189
const encoded_md = this.disable_metadata ? '' : this._encode_block_md(block_md);
190190
dbg.log3('writing block id to cloud:', block_key);
191191
if (this.cloud_info.aws_sts_arn) {
192-
this.s3cloud = await cloud_utils.createSTSS3Client(this.cloud_info, this.additionalS3Params);
192+
this.s3cloud = await cloud_utils.createSTSS3SDKv3Client(this.cloud_info, this.additionalS3Params);
193193
}
194194
await this.s3cloud.putObject({
195195
Bucket: this.cloud_info.target_bucket,
@@ -236,7 +236,7 @@ class BlockStoreS3 extends BlockStoreBase {
236236
async _write_usage_internal() {
237237
const usage_data = this._encode_block_md(this._usage);
238238
if (this.cloud_info.aws_sts_arn) {
239-
this.s3cloud = await cloud_utils.createSTSS3Client(this.cloud_info, this.additionalS3Params);
239+
this.s3cloud = await cloud_utils.createSTSS3SDKv3Client(this.cloud_info, this.additionalS3Params);
240240
}
241241
const res = await this.s3cloud.putObject({
242242
Bucket: this.cloud_info.target_bucket,
@@ -259,7 +259,7 @@ class BlockStoreS3 extends BlockStoreBase {
259259
const endpoint = this.cloud_info.endpoint;
260260
if (cloud_utils.is_aws_endpoint(endpoint)) {
261261
if (this.cloud_info.aws_sts_arn) {
262-
this.s3cloud = await cloud_utils.createSTSS3Client(this.cloud_info, this.additionalS3Params);
262+
this.s3cloud = await cloud_utils.createSTSS3SDKv3Client(this.cloud_info, this.additionalS3Params);
263263
}
264264
// in s3 there is no error for non-existing object
265265
await this.s3cloud.deleteObjectTagging({
@@ -303,7 +303,7 @@ class BlockStoreS3 extends BlockStoreBase {
303303
let key_marker;
304304
let version_marker;
305305
if (this.cloud_info.aws_sts_arn) {
306-
this.s3cloud = await cloud_utils.createSTSS3Client(this.cloud_info, this.additionalS3Params);
306+
this.s3cloud = await cloud_utils.createSTSS3SDKv3Client(this.cloud_info, this.additionalS3Params);
307307
}
308308
while (is_truncated) {
309309
const res = await this.s3cloud.listObjectVersions({
@@ -339,7 +339,7 @@ class BlockStoreS3 extends BlockStoreBase {
339339
let version_marker;
340340
dbg.log0(`cleaning up all objects with prefix ${this.base_path}`);
341341
if (this.cloud_info.aws_sts_arn) {
342-
this.s3cloud = await cloud_utils.createSTSS3Client(this.cloud_info, this.additionalS3Params);
342+
this.s3cloud = await cloud_utils.createSTSS3SDKv3Client(this.cloud_info, this.additionalS3Params);
343343
}
344344
while (!done) {
345345
const list_res = await this.s3cloud.listObjectVersions({
@@ -381,7 +381,7 @@ class BlockStoreS3 extends BlockStoreBase {
381381
// Todo: Assuming that all requested blocks were deleted, which a bit naive
382382
try {
383383
if (this.cloud_info.aws_sts_arn) {
384-
this.s3cloud = await cloud_utils.createSTSS3Client(this.cloud_info, this.additionalS3Params);
384+
this.s3cloud = await cloud_utils.createSTSS3SDKv3Client(this.cloud_info, this.additionalS3Params);
385385
}
386386
const usage = await this._get_blocks_usage(block_ids);
387387
deleted_storage.size -= usage.size;
@@ -419,7 +419,7 @@ class BlockStoreS3 extends BlockStoreBase {
419419
await P.map_with_concurrency(10, block_ids, async block_id => {
420420
try {
421421
if (this.cloud_info.aws_sts_arn) {
422-
this.s3cloud = await cloud_utils.createSTSS3Client(this.cloud_info, this.additionalS3Params);
422+
this.s3cloud = await cloud_utils.createSTSS3SDKv3Client(this.cloud_info, this.additionalS3Params);
423423
}
424424
const res = await this.s3cloud.headObject({
425425
Bucket: this.cloud_info.target_bucket,

0 commit comments

Comments
 (0)