Skip to content

ISSUE-922: chore(tests/containers): implement retry if port-forwarding fails #987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

jiridanek
Copy link
Member

@jiridanek jiridanek commented Mar 21, 2025

Fixes #922

Description

There were two issues.

First, that socket.accept() would block, and sometimes the script got blocked on it.

Second, that sometimes the proxy would RST the connection if the pod was not yet ready.

How Has This Been Tested?

-------------------------------- live log call ---------------------------------
2025-03-21 15:19:09 INFO Waiting for: readiness of all Pods matching app=notebook-tests-pod in Namespace test-ns-notebook-tests-pod
2025-03-21 15:19:19 INFO Pods matching test-ns-notebook-tests-pod/app=notebook-tests-pod are ready
2025-03-21 15:19:19 INFO Proxy listening on localhost:0
2025-03-21 15:19:19 INFO Waiting for: Connecting to pod succeeds
2025-03-21 15:19:19 INFO Accepted connection from 127.0.0.1:55462
2025-03-21 15:19:20 INFO Accepted connection from 127.0.0.1:55478
2025-03-21 15:19:21 INFO Accepted connection from 127.0.0.1:55562
2025-03-21 15:19:21 INFO Reading from remote socket failed, client ('127.0.0.1', 55562) has been disconnected
2025-03-21 15:19:22 INFO Accepted connection from 127.0.0.1:55568
PASSED                                                                   [100%]

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@jstourac
Copy link
Member

/lgtm

thanks for investigating this and for the fix, Jiri!

@jiridanek
Copy link
Member Author

/approve

Copy link
Contributor

openshift-ci bot commented Mar 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jiridanek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit d5f7f83 into opendatahub-io:main Mar 24, 2025
7 checks passed
@jiridanek jiridanek deleted the jd_fix_proxy__ branch March 24, 2025 08:02
@jiridanek
Copy link
Member Author

thanks for investigating this and for the fix, Jiri!

well, I did it wrong the first time

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.

root:socket_proxy.py:88 Proxying failed to listen
2 participants