Skip to content

Commit

Permalink
Merge branches 'development/2.7' and 'improvement/ZENKO-4941' into tm…
Browse files Browse the repository at this point in the history
…p/octopus/w/2.7/improvement/ZENKO-4941
  • Loading branch information
bert-e committed Jan 9, 2025
3 parents 9f97cb9 + 0885ae7 + 87ea053 commit ce51622
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION="2.7.68"
VERSION="2.7.69"

VERSION_SUFFIX=

Expand Down
6 changes: 3 additions & 3 deletions solution/deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ backbeat:
dashboard: backbeat/backbeat-dashboards
image: backbeat
policy: backbeat/backbeat-policies
tag: 8.6.53
tag: 8.6.54
envsubst: BACKBEAT_TAG
busybox:
image: busybox
Expand All @@ -16,7 +16,7 @@ cloudserver:
sourceRegistry: ghcr.io/scality
dashboard: cloudserver/cloudserver-dashboards
image: cloudserver
tag: 8.8.38
tag: 8.8.39
envsubst: CLOUDSERVER_TAG
drctl:
sourceRegistry: ghcr.io/scality
Expand Down Expand Up @@ -131,7 +131,7 @@ vault:
dashboard: vault2/vault-dashboards
policy: vault2/vault-policies
image: vault2
tag: 8.8.9
tag: 8.8.10
envsubst: VAULT_TAG
zenko-operator:
sourceRegistry: ghcr.io/scality
Expand Down
3 changes: 2 additions & 1 deletion tests/ctst/common/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,9 @@ When('the user tries to perform the current S3 action on the bucket {int} times
this.addToSaved('copyObject', `objectrepeatcopy-${Utils.randomString()}`);
}
await runActionAgainstBucket(this, this.getSaved<ActionPermissionsType>('currentAction').action);
if (this.getResult().err) {
if (this.getResult().err && this.getResult().retryable?.throttling !== true) {
this.logger.debug('Error during repeated action', { error: this.getResult().err });
break;
}
await Utils.sleep(delay);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ctst/common/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

const { atMostOnePicklePerTag } = parallelCanAssignHelpers;
const noParallelRun = atMostOnePicklePerTag(['@AfterAll', '@PRA', '@ColdStorage', '@Utilization']);
const noParallelRun = atMostOnePicklePerTag(['@AfterAll', '@PRA', '@ColdStorage']);

setParallelCanAssign(noParallelRun);

Expand Down
1 change: 1 addition & 0 deletions tests/ctst/features/CountItems/CountItems.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Feature: CountItems measures the utilization metrics
@PreMerge
@CronJob
@CountItems
@Utilization
Scenario Outline: Countitems runs without error and compute utilization metrics
Given an existing bucket "" "without" versioning, "without" ObjectLock "without" retention mode
And an object "" that "exists"
Expand Down
4 changes: 2 additions & 2 deletions tests/ctst/features/quotas/Quotas.feature
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ Feature: Quota Management for APIs
Given an action "DeleteObject"
And a permission to perform the "PutObject" action
And a STORAGE_MANAGER type
And a bucket quota set to <uploadSize> B
And a bucket quota set to <bucketQuota> B
And an account quota set to <accountQuota> B
And an upload size of <bucketQuota> B for the object "obj-1"
And an upload size of <uploadSize> B for the object "obj-1"
And a <userType> type
And an environment setup for the API
And an "existing" IAM Policy that "applies" with "ALLOW" effect for the current API
Expand Down
2 changes: 1 addition & 1 deletion tests/ctst/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@aws-sdk/client-s3": "^3.583.0",
"@aws-sdk/client-sts": "^3.583.0",
"@eslint/compat": "^1.1.1",
"cli-testing": "github:scality/cli-testing.git#1.2.3",
"cli-testing": "github:scality/cli-testing.git#1.2.4",
"eslint": "^9.9.1",
"eslint-config-scality": "scality/Guidelines#8.3.0",
"typescript-eslint": "^8.4.0"
Expand Down
38 changes: 18 additions & 20 deletions tests/ctst/steps/utils/kubernetes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import fs from 'fs';
import * as path from 'path';
import lockFile from 'proper-lockfile';
import { KubernetesHelper, Utils } from 'cli-testing';
import Zenko from 'world/Zenko';
import {
Expand Down Expand Up @@ -83,24 +82,27 @@ export async function createJobAndWaitForCompletion(
const watchClient = createKubeWatchClient(world);

const lockFilePath = path.join('/tmp', `${jobName}.lock`);
let releaseLock: (() => Promise<void>) | false = false;

if (!fs.existsSync(lockFilePath)) {
fs.writeFileSync(lockFilePath, '');
let lockAquired = false;
let tries = 600;
while (!lockAquired && tries > 0) {
try {
fs.writeFileSync(lockFilePath, 'lock', {
flag: 'wx',
});
lockAquired = true;
} catch {
world.logger.debug(`Failed to acquire lock for job: ${jobName}`, {
tries,
});
}
tries--;
if (!lockAquired) {
await Utils.sleep(1000);
}
}

try {
releaseLock = await lockFile.lock(lockFilePath, {
// Expect the jobs in the queue does not take more than 5 minutes to complete
stale: 10 * 60 * 1000,
// use a linear backoff strategy
retries: {
retries: 610,
factor: 1,
minTimeout: 1000,
maxTimeout: 1000,
},
});
world.logger.debug(`Acquired lock for job: ${jobName}`);

// Read the cron job and prepare the job spec
Expand Down Expand Up @@ -159,11 +161,7 @@ export async function createJobAndWaitForCompletion(
});
throw err;
} finally {
// Ensure the lock is released
if (releaseLock) {
await releaseLock();
world.logger.debug(`Released lock for job: ${jobName}`);
}
fs.unlinkSync(lockFilePath);
}
}

Expand Down
6 changes: 3 additions & 3 deletions tests/ctst/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4527,9 +4527,9 @@ cli-table3@^0.6.0:
optionalDependencies:
"@colors/colors" "1.5.0"

"cli-testing@github:scality/cli-testing.git#1.2.3":
version "1.2.3"
resolved "git+ssh://[email protected]/scality/cli-testing.git#d6712d412dd7cd56cdf89a812203637d1ebab210"
"cli-testing@github:scality/cli-testing.git#1.2.4":
version "1.2.4"
resolved "git+ssh://[email protected]/scality/cli-testing.git#687c3bdb5d684c5de4082a5dd9f9c00e94ec104c"
dependencies:
"@aws-crypto/sha256-universal" "^5.2.0"
"@aws-sdk/client-iam" "^3.637.0"
Expand Down

0 comments on commit ce51622

Please sign in to comment.