Skip to content

test: Handle errors relate network in port-fowarding #12937

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 2 commits into from
Sep 14, 2022
Merged

Conversation

utam0k
Copy link
Contributor

@utam0k utam0k commented Sep 14, 2022

Description

test: Handle errors relate network in port-fowarding

Related Issue(s)

Relates #12248

How to test

Run the test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@utam0k utam0k requested a review from jenting September 14, 2022 02:37
@jenting jenting added the team: workspace Issue belongs to the Workspace team label Sep 14, 2022
Copy link
Contributor

@jenting jenting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.
But from my testing recent days, I did not encounter the port-forward error.
So I think should we need to enhance the port-forward error again because you have enhanced it in the last PR already.

Comment on lines +89 to +90
if count < connectFailureMaxTries {
return err.Error() == errorDialingBackendEOF
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check if the error is errorDialingBackendEOF, then retry?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen you change this. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jenting
Sorry, I may misunderstand. Can I ask you to rephrase?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, my thought was the same logic

        if err.Error() == errorDialingBackendEOF && count < connectFailureMaxTries {
		return true
	}
        return false

@utam0k
Copy link
Contributor Author

utam0k commented Sep 14, 2022

Thanks for the PR.
But from my testing recent days, I did not encounter the port-forward error.
So I think should we need to enhance the port-forward error again because you have enhanced it in the last PR already.

Have you ran all tests from werft?

@jenting
Copy link
Contributor

jenting commented Sep 14, 2022

Thanks for the PR.
But from my testing recent days, I did not encounter the port-forward error.
So I think should we need to enhance the port-forward error again because you have enhanced it in the last PR already.

Have you ran all tests from werft?

Yes, about five times.

@utam0k
Copy link
Contributor Author

utam0k commented Sep 14, 2022

Thanks for the PR.
But from my testing recent days, I did not encounter the port-forward error.
So I think should we need to enhance the port-forward error again because you have enhanced it in the last PR already.

Have you ran all tests from werft?

Yes, about five times.

@jenting
This appears to be an error in port-forwarding. May I ask you to tell me what your job is?
https://werft.gitpod-dev.com/job/gitpod-workspace-run-integration-tests-main.118/raw

@jenting
Copy link
Contributor

jenting commented Sep 14, 2022

Thanks for the PR.
But from my testing recent days, I did not encounter the port-forward error.
So I think should we need to enhance the port-forward error again because you have enhanced it in the last PR already.

Have you ran all tests from werft?

Yes, about five times.

@jenting This appears to be an error in port-forwarding. May I ask you to tell me what your job is? https://werft.gitpod-dev.com/job/gitpod-workspace-run-integration-tests-main.118/raw

🤔 I might be wrong. I did not check the lastest workspace integration tests result.

@utam0k
Copy link
Contributor Author

utam0k commented Sep 14, 2022

@jenting At least, around these codes often get failed when I run it from my local

if err != nil {
return nil, nil, nil, fmt.Errorf("Could not run exec operation: %v", err)
}

--- FAIL: TestCreateBucket (5.78s)
    --- FAIL: TestCreateBucket/DaemonAgent.CreateBucket (5.78s)
        --- FAIL: TestCreateBucket/DaemonAgent.CreateBucket/it_should_create_a_bucket (5.78s)
            storage_test.go:32: Could not run copy operation: error dialing backend: EOF

@utam0k utam0k force-pushed the to/test-integration branch from 9d4d690 to 5ad85b0 Compare September 14, 2022 06:12
@utam0k utam0k requested a review from jenting September 14, 2022 06:12
@utam0k
Copy link
Contributor Author

utam0k commented Sep 14, 2022

@jenting Thanks for your review. PTAL

@roboquat roboquat merged commit 5dedcaa into main Sep 14, 2022
@roboquat roboquat deleted the to/test-integration branch September 14, 2022 09:17
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none size/L team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants