diff --git a/.github/actions/deploy/action.yaml b/.github/actions/deploy/action.yaml index e9f12b93ca..aeab947981 100644 --- a/.github/actions/deploy/action.yaml +++ b/.github/actions/deploy/action.yaml @@ -29,6 +29,9 @@ runs: key: ${{ runner.os }}-helm-${{ hashFiles('.github/scripts/end2end/install-kind-dependencies.sh') }} restore-keys: | ${{ runner.os }}-helm- + - name: Generate MongoDB database name + shell: bash + run: echo "ZENKO_MONGODB_DATABASE=$(cat /proc/sys/kernel/random/uuid)" >> "$GITHUB_ENV" - name: Install kind cluster dependencies shell: bash run: bash install-kind-dependencies.sh diff --git a/.github/scripts/end2end/configs/zenko.yaml b/.github/scripts/end2end/configs/zenko.yaml index 6000bf1b14..b05db06c76 100644 --- a/.github/scripts/end2end/configs/zenko.yaml +++ b/.github/scripts/end2end/configs/zenko.yaml @@ -38,7 +38,7 @@ spec: userSecretName: mongodb-db-creds usernameKey: mongodb-username passwordKey: mongodb-password - databaseName: datadb + databaseName: ${ZENKO_MONGODB_DATABASE} ${ZENKO_MONGODB_CONFIG} redis: provider: Zenko diff --git a/.github/scripts/end2end/deploy-zenko.sh b/.github/scripts/end2end/deploy-zenko.sh index da222abe11..0c984abfcb 100755 --- a/.github/scripts/end2end/deploy-zenko.sh +++ b/.github/scripts/end2end/deploy-zenko.sh @@ -43,6 +43,7 @@ if [ "${ZENKO_MONGODB_SHARDED}" = 'true' ]; then else export ZENKO_MONGODB_ENDPOINT="dev-db-mongodb-primary-0.dev-db-mongodb-headless.default.svc.cluster.local:27017" fi +export ZENKO_MONGODB_DATABASE="${ZENKO_MONGODB_DATABASE:-'datadb'}" if [ "${TIME_PROGRESSION_FACTOR}" -gt 1 ]; then export ZENKO_ANNOTATIONS="${ZENKO_ANNOTATIONS:-annotations:} diff --git a/.github/scripts/end2end/install-kind-dependencies.sh b/.github/scripts/end2end/install-kind-dependencies.sh index 685f328ce4..144962cda3 100755 --- a/.github/scripts/end2end/install-kind-dependencies.sh +++ b/.github/scripts/end2end/install-kind-dependencies.sh @@ -22,7 +22,7 @@ MONGODB_ROOT_USERNAME=root MONGODB_ROOT_PASSWORD=rootpass MONGODB_APP_USERNAME=data MONGODB_APP_PASSWORD=datapass -MONGODB_APP_DATABASE=datadb +MONGODB_APP_DATABASE="${ZENKO_MONGODB_DATABASE:-'datadb'}" MONGODB_RS_KEY=0123456789abcdef # force a 4.0 image as that's what artesca uses DEPS_FILE="$DIR/../../../solution-base/deps.yaml" diff --git a/solution/deps.yaml b/solution/deps.yaml index 1cbd2abc7a..b205f58ee1 100644 --- a/solution/deps.yaml +++ b/solution/deps.yaml @@ -6,7 +6,7 @@ backbeat: dashboard: backbeat-dashboards image: backbeat policy: backbeat-policies - tag: 8.6.33 + tag: 8.6.34 envsubst: BACKBEAT_TAG busybox: image: busybox @@ -93,7 +93,7 @@ vault: zenko-operator: sourceRegistry: registry.scality.com/zenko-operator image: zenko-operator - tag: 1.5.39 + tag: 1.5.40 envsubst: ZENKO_OPERATOR_TAG zenko-ui: sourceRegistry: registry.scality.com/zenko-ui diff --git a/tests/zenko_tests/node_tests/backbeat/tests/ingestion/ingestionS3C.js b/tests/zenko_tests/node_tests/backbeat/tests/ingestion/ingestionS3C.js index a82f373444..f7ad35fedd 100644 --- a/tests/zenko_tests/node_tests/backbeat/tests/ingestion/ingestionS3C.js +++ b/tests/zenko_tests/node_tests/backbeat/tests/ingestion/ingestionS3C.js @@ -16,7 +16,7 @@ let OBJ_KEY; describe('Ingesting existing data from RING S3C bucket', () => { beforeEach(() => { - INGESTION_DEST_BUCKET = `ingestion-dest-bucket-${uuid()}`; + INGESTION_DEST_BUCKET = `ingestion-${uuid()}`; KEY_PREFIX = `${ingestionSrcBucket}-${uuid()}`; OBJ_KEY = `${KEY_PREFIX}/object-to-ingest-${uuid()}`; }); diff --git a/tests/zenko_tests/node_tests/backbeat/tests/ingestion/ingestionS3CPauseResume.js b/tests/zenko_tests/node_tests/backbeat/tests/ingestion/ingestionS3CPauseResume.js index 5820fb95b2..7c79187916 100644 --- a/tests/zenko_tests/node_tests/backbeat/tests/ingestion/ingestionS3CPauseResume.js +++ b/tests/zenko_tests/node_tests/backbeat/tests/ingestion/ingestionS3CPauseResume.js @@ -23,7 +23,7 @@ describe('Ingestion pause resume', function () { this.timeout(INGESTION_TIMEOUT); beforeEach(done => { - INGESTION_DEST_BUCKET = `ingestion-dest-bucket-${uuid()}`; + INGESTION_DEST_BUCKET = `ingestion-${uuid()}`; KEY_PREFIX = `${ingestionSrcBucket}-${uuid()}`; OBJ_KEY1 = `${KEY_PREFIX}/object-to-ingest-${uuid()}`; OBJ_KEY2 = `${KEY_PREFIX}/object-to-ingest-${uuid()}`; diff --git a/tests/zenko_tests/node_tests/backbeat/tests/ingestion/oobS3C.js b/tests/zenko_tests/node_tests/backbeat/tests/ingestion/oobS3C.js index d45e12fdd4..0758d166e8 100644 --- a/tests/zenko_tests/node_tests/backbeat/tests/ingestion/oobS3C.js +++ b/tests/zenko_tests/node_tests/backbeat/tests/ingestion/oobS3C.js @@ -15,7 +15,7 @@ let OBJ_KEY; describe('OOB updates for RING S3C bucket', () => { beforeEach(done => { - INGESTION_DEST_BUCKET = `ingestion-dest-bucket-${uuid()}`; + INGESTION_DEST_BUCKET = `ingestion-${uuid()}`; OBJ_KEY = `${KEY_PREFIX}/object-to-ingest-${uuid()}`; return scalityUtils.createIngestionBucket(INGESTION_DEST_BUCKET, location, done); }); diff --git a/tests/zenko_tests/node_tests/backbeat/tests/lifecycle/expiration.js b/tests/zenko_tests/node_tests/backbeat/tests/lifecycle/expiration.js index eaf92676de..a26c8e16dd 100644 --- a/tests/zenko_tests/node_tests/backbeat/tests/lifecycle/expiration.js +++ b/tests/zenko_tests/node_tests/backbeat/tests/lifecycle/expiration.js @@ -121,7 +121,7 @@ describe('Lifecycle Expiration', function () { this.timeout(360000); describe('behavior: should not delete objects', () => { - const bucketName = getBucketName('exp-disabled-'); + const bucketName = getBucketName('exp-dis-'); const objectKey = getObjectKey('exp-disabled-'); before(done => async.series([ @@ -201,7 +201,7 @@ describe('Lifecycle Expiration', function () { [4, 6, 0, 0], ], ].forEach(([description, rules, expected]) => describe(description, () => { - const bucketName = getBucketName('exp-bucket-'); + const bucketName = getBucketName('exp-'); before(done => async.series([ next => utils.createVersionedBucket(bucketName, next), @@ -237,7 +237,7 @@ describe('Lifecycle Expiration', function () { [4, 6, 0, 0], ], ].forEach(([description, rules, expected]) => describe(description, () => { - const bucketName = getBucketName('exp-tagged-bucket-'); + const bucketName = getBucketName('exp-tagged-'); before(done => async.series([ next => utils.createVersionedBucket(bucketName, next), @@ -273,7 +273,7 @@ describe('Lifecycle Expiration', function () { [2, 3, 1, 0], ], ].forEach(([description, rules, expected]) => describe(description, () => { - const bucketName = getBucketName('exp-bucket-'); + const bucketName = getBucketName('exp-'); const objectKey = getObjectKey(targetObjectPrefix); const notTargetKey = getObjectKey(notTargetObjectPrefix); @@ -312,7 +312,7 @@ describe('Lifecycle Expiration', function () { [0, 0, 0, 1], ], ].forEach(([description, rules, expected]) => describe(description, () => { - const bucketName = getBucketName('exp-bucket-'); + const bucketName = getBucketName('exp-'); const objectKey = getObjectKey(targetObjectPrefix); const notTargetKey = getObjectKey(notTargetObjectPrefix); @@ -347,7 +347,7 @@ describe('Lifecycle Expiration', function () { [0, 4, 2, 0], ], ].forEach(([description, mode, expected]) => describe(description, () => { - const bucketName = getBucketName('object-lock-bucket-'); + const bucketName = getBucketName('objectlock-'); const objectKeyPrefix = 'locked-key-'; const rules = [ // should delete current @@ -370,7 +370,7 @@ describe('Lifecycle Expiration', function () { })); describe('with legal-hold defined', () => { - const bucketName = getBucketName('object-lock-bucket-'); + const bucketName = getBucketName('objectlock-'); const objectKeyPrefix = 'legal-hold-key-'; const rules = [ // should delete current diff --git a/tests/zenko_tests/node_tests/backbeat/tests/lifecycle/transition.js b/tests/zenko_tests/node_tests/backbeat/tests/lifecycle/transition.js index b04d761199..dbcef287ed 100644 --- a/tests/zenko_tests/node_tests/backbeat/tests/lifecycle/transition.js +++ b/tests/zenko_tests/node_tests/backbeat/tests/lifecycle/transition.js @@ -90,7 +90,7 @@ const testsToRun = [{ testsToRun.forEach(test => { // eslint-disable-next-line prefer-arrow-callback describe(`Lifecycle transition from ${test.from} to ${test.to}`, function () { - const srcBucket = `transition-bucket-${uuid()}`; + const srcBucket = `transition-${uuid()}`; const keyPrefix = uuid(); const cloudServer = new LifecycleUtility(scalityS3Client) .setBucket(srcBucket) diff --git a/tests/zenko_tests/node_tests/cloudserver/bucketGetV2/tests/bucketGetV2.js b/tests/zenko_tests/node_tests/cloudserver/bucketGetV2/tests/bucketGetV2.js index c905e616eb..a4b14a61b4 100644 --- a/tests/zenko_tests/node_tests/cloudserver/bucketGetV2/tests/bucketGetV2.js +++ b/tests/zenko_tests/node_tests/cloudserver/bucketGetV2/tests/bucketGetV2.js @@ -4,7 +4,7 @@ const uuidV4 = require('uuid/v4'); const s3 = require('../../../s3SDK').scalityS3Client; -const bucket = `get-v2-bucket-${uuidV4()}`; +const bucket = `list-v2-${uuidV4()}`; function putObjects(cb) { async.times(10, (n, next) => { diff --git a/tests/zenko_tests/node_tests/cloudserver/bucketPolicy/tests/bucketPolicy.js b/tests/zenko_tests/node_tests/cloudserver/bucketPolicy/tests/bucketPolicy.js index 63ccb9504b..0fda02e1eb 100644 --- a/tests/zenko_tests/node_tests/cloudserver/bucketPolicy/tests/bucketPolicy.js +++ b/tests/zenko_tests/node_tests/cloudserver/bucketPolicy/tests/bucketPolicy.js @@ -8,7 +8,7 @@ const uuidV4 = require('uuid/v4'); const { scalityS3Client, altScalityS3Client } = require('../../../s3SDK'); const testUtils = require('../../../utils/testUtils'); -const bucket = `bpolicy-bucket-${uuidV4()}`; +const bucket = `bpolicy-${uuidV4()}`; const bParam = { Bucket: bucket }; const objKey = 'bucket-pol-key'; const oParam = { Bucket: bucket, Key: objKey }; diff --git a/tests/zenko_tests/node_tests/cloudserver/locationQuota/tests/locationQuota.js b/tests/zenko_tests/node_tests/cloudserver/locationQuota/tests/locationQuota.js index 92631eaae5..189f613873 100644 --- a/tests/zenko_tests/node_tests/cloudserver/locationQuota/tests/locationQuota.js +++ b/tests/zenko_tests/node_tests/cloudserver/locationQuota/tests/locationQuota.js @@ -7,7 +7,7 @@ const { scalityS3Client } = require('../../../s3SDK'); const QuotaUtility = require('../QuotaUtility'); const TEN_MB_BYTES = 10485760; -const bucket = `quota-bucket-${uuidV4()}`; +const bucket = `quota-${uuidV4()}`; const scalityS3 = new QuotaUtility(scalityS3Client);