[tests-only][full-ci][k8s] test: run apiSearchContent on k8s deployment (#12959)

test: disable redundant k8s 5xx retries for search requests
This commit is contained in:
isha authored and GitHub committed 2026-09-24 15:08:15 +05:45
1 parent 21dd288ac4
commit 146f08513c
3 files changed
+10 -2

No files matched your search

+1 -1
View File
@@ -52,7 +52,7 @@ jobs:
- suite: apiActivities
- suite: apiSearch1
- suite: apiSearch2
# - suite: apiSearchContent
- suite: apiSearchContent
- suite: apiSharingNgShares
- suite: apiReshare
- suite: apiSharingNgPermissions
@@ -204,6 +204,10 @@ class HttpRequestHelper {
* @param int|null $timeout
* @param Client|null $client
* @param bool|null $isGivenStep
* @param bool $retryOn5xxForK8s Set to false when the caller already has its own
* retry-on-5xx loop (e.g. SearchContext::searchWithRetry),
* so this generic layer doesn't redundantly burn extra
* time retrying inside every one of the caller's attempts.
*
* @return ResponseInterface
*
@@ -223,6 +227,7 @@ class HttpRequestHelper {
?int $timeout = 0,
?Client $client = null,
?bool $isGivenStep = false,
bool $retryOn5xxForK8s = true,
): ResponseInterface {
if ((\getenv('DEBUG_ACCEPTANCE_RESPONSES') !== false) || (\getenv('DEBUG_ACCEPTANCE_API_CALLS') !== false)) {
$debugResponses = true;
@@ -270,7 +275,7 @@ class HttpRequestHelper {
$loopAgain = !$sendExceptionHappened && ($response->getStatusCode() === self::HTTP_TOO_EARLY ||
($response->getStatusCode() === self::HTTP_CONFLICT && $isGivenStep)) &&
$sendCount <= $sendRetryLimit;
if (OcisConfigHelper::isK8s()) {
if ($retryOn5xxForK8s && OcisConfigHelper::isK8s()) {
$loopAgain = $loopAgain || ($response->getStatusCode() >= HttpResponse::HTTP_INTERNAL_SERVER_ERROR &&
$sendCount <= $sendRetryLimit
&& $response->getStatusCode() !== HttpResponse::HTTP_INSUFFICIENT_STORAGE);
@@ -213,6 +213,9 @@ class SearchContext implements Context {
$password,
$headers,
$body,
// this method's own caller (searchWithRetry) already retries on 5xx,
// so the generic k8s 5xx-retry here would just double up the wait
retryOn5xxForK8s: false,
);
}