Skip to content

ROX-30865: increase k8s client timeout > retryable-http#16835

Merged
janisz merged 7 commits intomasterfrom
fix-rox-30865-k8s-client-timeout
Sep 17, 2025
Merged

ROX-30865: increase k8s client timeout > retryable-http#16835
janisz merged 7 commits intomasterfrom
fix-rox-30865-k8s-client-timeout

Conversation

@janisz
Copy link
Contributor

@janisz janisz commented Sep 15, 2025

Fixes ROX-30865 by increasing the REST client context timeout from 8s to 10s to allow proper retry behavior when network issues occur.

The retry configuration uses:

  • 3 retry attempts with exponential backoff (500ms to 2s)
  • 9s individual HTTP timeout per attempt
  • 10s overall context timeout (now updated from 8s)

This ensures the context doesn't expire before retries can complete, addressing TestPod failures with "context deadline exceeded" errors that occurred even after the retry mechanism was introduced.

Previous fixes:

  • Added go-retryablehttp retry client with 3 attempts
  • Configured exponential backoff timing
  • Set 9s individual request timeout

Related:

🤖 Generated with Claude Code

Fixes ROX-30865 by increasing the REST client context timeout from 8s to 10s
to allow proper retry behavior when network issues occur.

The retry configuration uses:
- 3 retry attempts with exponential backoff (500ms to 2s)
- 9s individual HTTP timeout per attempt
- 10s overall context timeout (now updated from 8s)

This ensures the context doesn't expire before retries can complete,
addressing TestPod failures with "context deadline exceeded" errors
that occurred even after the retry mechanism was introduced.

Previous fixes:
- Added go-retryablehttp retry client with 3 attempts
- Configured exponential backoff timing
- Set 9s individual request timeout

Related: commit fdd6300

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@janisz janisz requested a review from parametalol September 15, 2025 15:48
@janisz janisz changed the title ROX-30865: increase k8s client context timeout to 10s ROX-30865: increase k8s client timeout > retryable-http Sep 15, 2025
@janisz janisz requested a review from a team September 15, 2025 15:50
Signed-off-by: Tomasz Janiszewski <tomek@redhat.com>
@rhacs-bot
Copy link
Contributor

rhacs-bot commented Sep 15, 2025

Images are ready for the commit at cf7aead.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.9.x-797-gcf7aead88f.

@janisz janisz requested a review from parametalol September 15, 2025 16:14
Addresses review feedback identifying the real source of 10-minute timeouts.
The namespace creation retry logic was using a 10-minute timeout that
exactly matched the Go test framework timeout, causing tests to hang.

Changes:
- Reduced defaultNamespaceCreateTimeout from 10 minutes to 2 minutes
- Added better error logging when namespace creation times out
- This should prevent the mysterious 10-minute hangs in LoadBalancer tests

Credit: @lvalerom for identifying the actual root cause
@codecov
Copy link

codecov bot commented Sep 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.97%. Comparing base (a29c378) to head (cf7aead).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #16835   +/-   ##
=======================================
  Coverage   48.97%   48.97%           
=======================================
  Files        2691     2691           
  Lines      201486   201486           
=======================================
+ Hits        98674    98676    +2     
+ Misses      95162    95159    -3     
- Partials     7650     7651    +1     
Flag Coverage Δ
go-unit-tests 48.97% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Tomasz Janiszewski <tomek@redhat.com>
@janisz janisz requested a review from parametalol September 16, 2025 09:38
@janisz
Copy link
Contributor Author

janisz commented Sep 16, 2025

/retest

@red-hat-konflux
Copy link
Contributor

Caution

There are some errors in your PipelineRun template.

PipelineRun Error
central-db-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request
main-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request
operator-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request
operator-bundle-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request
retag-collector CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request
retag-scanner-db-slim CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request
retag-scanner-db CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request
retag-scanner-slim CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request
retag-scanner CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request
roxctl-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request
scanner-v4-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request
scanner-v4-db-on-push CEL expression evaluation error: expression "(\n event == \"push\" && target_branch.matches(\"^(master|release-.*|refs/tags/.*)$\")\n) || (\n event == \"pull_request\" && (\n target_branch.startsWith(\"release-\") ||\n source_branch.matches(\"(konflux|renovate|appstudio|rhtap)\") ||\n (has(body.pull_request.labels) && body.pull_request.labels.exists(l, l.name == \"konflux-build\"))\n ) && body.action != \"ready_for_review\"\n)\n" failed to evaluate: no such key: pull_request

@janisz janisz merged commit f7b49bb into master Sep 17, 2025
90 checks passed
@janisz janisz deleted the fix-rox-30865-k8s-client-timeout branch September 17, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants