From 345e3be212330e1812d4b8164a3fbd7ac9cc953e Mon Sep 17 00:00:00 2001 From: Thomas Flament Date: Thu, 26 Mar 2026 09:24:14 +0100 Subject: [PATCH] fix(ci): wait for operator reconciliation in bucket website test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "Bucket Website CRUD" test was flaky in CI (ctst-end2end-sharded): after adding a website endpoint to the overlay, the test immediately tried to fetch the website within a 60-second retry window. However, the overlay change triggers a zenko-operator reconciliation cascade (rolling restarts of ops-scuba → ops-scuba-external-api → connector-cloudserver → ingress creation), which takes 60-95 seconds. The test was racing the reconciliation and often lost. Wait for the operator to finish reconciling before attempting to fetch, using waitForZenkoToStabilize (waits for DeploymentInProgress=True then Available=True) and waitForDataServicesToStabilize (waits for dependent deployments to roll out). This matches the pattern already used by the azure archive tests after overlay changes. The cucumber step timeout is raised from the default 100s to 15 minutes to accommodate the wait functions, consistent with the azure archive step timeouts. Also fix a stale assertion message ("after 20 tries" → "after 60 tries"). Issue: ZENKO-5245 --- tests/ctst/steps/website/website.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/ctst/steps/website/website.ts b/tests/ctst/steps/website/website.ts index 023ec014d2..68c7826dc9 100644 --- a/tests/ctst/steps/website/website.ts +++ b/tests/ctst/steps/website/website.ts @@ -2,6 +2,7 @@ import assert from 'assert'; import { Given, When, Then } from '@cucumber/cucumber'; import Zenko from '../../world/Zenko'; import { putObject } from '../utils/utils'; +import { waitForZenkoToStabilize, waitForDataServicesToStabilize } from '../utils/kubernetes'; import { S3, Utils } from 'cli-testing'; const pageMessage = Utils.randomString(); @@ -29,9 +30,12 @@ When('the user puts the bucket website configuration', async function (this: Zen }); }); -When('the {string} endpoint is added to the overlay', async function (this: Zenko, endpoint: string) { - await this.addWebsiteEndpoint(endpoint); -}); +When('the {string} endpoint is added to the overlay', { timeout: 15 * 60 * 1000 }, + async function (this: Zenko, endpoint: string) { + await this.addWebsiteEndpoint(endpoint); + await waitForZenkoToStabilize(this, true); + await waitForDataServicesToStabilize(this); + }); When('the user creates an S3 Bucket policy granting public read access', async function (this: Zenko) { const policy = { @@ -82,5 +86,5 @@ Then('the user should be able to load the index.html file from the {string} endp await Utils.sleep(1000); } } - assert.fail('Failed to fetch the bucket website after 20 tries'); + assert.fail('Failed to fetch the bucket website after 60 tries'); });