Skip to content

fix: reconnect port forwarding if pod is restarted (crw-11119)#314

Draft
adietish wants to merge 6 commits into
redhat-developer:mainfrom
adietish:crw-11119
Draft

fix: reconnect port forwarding if pod is restarted (crw-11119)#314
adietish wants to merge 6 commits into
redhat-developer:mainfrom
adietish:crw-11119

Conversation

@adietish

@adietish adietish commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 764c0578-6e37-46b8-a3b5-ff96864aedaa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

codecov-commenter commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 36.76471% with 301 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.89%. Comparing base (71098f6) to head (404a163).
⚠️ Report is 358 commits behind head on main.

Files with missing lines Patch % Lines
...com/redhat/devtools/gateway/DevSpacesConnection.kt 5.06% 146 Missing and 4 partials ⚠️
...hat/devtools/gateway/openshift/DevWorkspacePods.kt 60.00% 16 Missing and 10 partials ⚠️
...dhat/devtools/gateway/util/ProgressCancellation.kt 0.00% 16 Missing ⚠️
...auth/OpenShiftCredentialsAuthenticationStrategy.kt 0.00% 15 Missing ⚠️
...com/redhat/devtools/gateway/ThinClientReconnect.kt 81.33% 5 Missing and 9 partials ⚠️
...view/steps/auth/RedHatSSOAuthenticationStrategy.kt 0.00% 13 Missing ⚠️
...steps/auth/OpenShiftOAuthAuthenticationStrategy.kt 0.00% 12 Missing ⚠️
...ps/auth/ClientCertificateAuthenticationStrategy.kt 0.00% 9 Missing ⚠️
...way/view/steps/auth/TokenAuthenticationStrategy.kt 0.00% 9 Missing ⚠️
...in/com/redhat/devtools/gateway/util/PodIdentity.kt 46.15% 1 Missing and 6 partials ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##            main     #314       +/-   ##
==========================================
+ Coverage   0.00%   25.89%   +25.89%     
==========================================
  Files          4      108      +104     
  Lines         26     4465     +4439     
  Branches       0      833      +833     
==========================================
+ Hits           0     1156     +1156     
- Misses        26     3144     +3118     
- Partials       0      165      +165     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adietish adietish force-pushed the crw-11119 branch 4 times, most recently from 580461c to 5f8f48e Compare June 22, 2026 19:59
adietish and others added 5 commits June 22, 2026 22:01
Signed-off-by: Andre Dietisheim <adietish@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Andre Dietisheim <adietish@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…pod roll

- Add retry loop (maxRetries, retryDelay) for transient failures during
  pod roll reconnect; permanent failures fail immediately.
- Distinguish TimeoutCancellationException from cancellation exceptions:
  retry it, propagate cancellation exceptions.
- Updated logging to reflect retry attempt count and omit stack trace
  for timeout failures.
- Rename readyTimeout -> READY_TIMEOUT (constant), double value 60->120s.
- Add cachePod() to seed cache without cluster query during pod roll.
- Update findFirstRunning() to return newest pod by creationTimestamp
  and exclude terminating pods (deletionTimestamp).
- Add comprehensive tests for retry, timeout, permanent failure, and
  cancellation scenarios.
Signed-off-by: Andre Dietisheim <adietish@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
coroutineScope waited for launchCancelWatcher to exit; progress stayed
open until the user cancelled. Stop the watcher when auth completes.

Signed-off-by: Andre Dietisheim <adietish@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@adietish adietish force-pushed the crw-11119 branch 3 times, most recently from ee9f641 to f0d35ec Compare June 23, 2026 19:19
Signed-off-by: Andre Dietisheim <adietish@redhat.com>
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.

2 participants