Skip to content
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

ci: Tune network #488

Merged
merged 2 commits into from
Feb 23, 2024
Merged

ci: Tune network #488

merged 2 commits into from
Feb 23, 2024

Conversation

tienvx
Copy link
Contributor

@tienvx tienvx commented Feb 22, 2024

Try to fix flaky network by using https://github.com/smorimoto/tune-github-hosted-runner-network.

  • Hope it help fixing bellow errors (happen mostly on Windows).
  • There 2 errors still happen, but I reported them:
    • Script phpunit --no-coverage handling the test event returned with error code -1073741819
    • ERROR ThreadId(01) pact_ffi::plugins: Could not load plugin - Plugin process did not output the correct startup message in 60 seconds: timed out waiting on channel
Verifying a pact between jsonConsumer and jsonProvider

  A get request to /hello/{name} (0s loading, 5s 389ms verification)
      Request Failed - error sending request for url (http://localhost:50807/hello/Bob): operation timed out

  A get request to /goodbye/{name} (0s loading, 5s 49ms verification)
     Given Get Goodbye
      Request Failed - One or more of the setup state change handlers has failed

Verifying a pact between binaryConsumer and binaryProvider

  A get request to /image.jpg (0s loading, 5s 31ms verification)
     Given Image file image.jpg exists
      Request Failed - error sending request for url (http://localhost:49597/image.jpg): operation timed out

 2024-02-17T07:39:45.104502Z DEBUG ThreadId(01) verify_interaction{interaction="Person message sent"}: pact_verifier::provider_client: State change request failed with error error sending request for url (http://localhost:60194/pact-change-state): error trying to connect: tcp connect error: No connection could be made because the target machine actively refused it. (os error 10061)

Verifying a pact between protobufAsyncMessageConsumer and protobufAsyncMessageProvider

  Person message sent (0s loading, 3s 218ms verification)
     Given A person with fixed id exists
      Request Failed - One or more of the teardown state change handlers has failed


There was 1 error:

1) GeneratorsProvider\Tests\PactVerifyTest::testPactVerifyConsumer
Symfony\Component\Process\Exception\ProcessTimedOutException: The process "'php' '-S' '127.0.0.1:49292' '-t' '/Users/runner/work/pact-php/pact-php/example/generators/provider/tests/../public/'" exceeded the timeout of 60 seconds.

/Users/runner/work/pact-php/pact-php/vendor/symfony/process/Process.php:1156
/Users/runner/work/pact-php/pact-php/vendor/symfony/process/Process.php:464
/Users/runner/work/pact-php/pact-php/tests/PhpPact/Helper/AbstractProcess.php:36
/Users/runner/work/pact-php/pact-php/example/generators/provider/tests/PactVerifyTest.php:18

Verifying a pact between protobufAsyncMessageConsumer and protobufAsyncMessageProvider

  Person message sent (0s loading, 861ms verification)
     Given A person with fixed id exists
      Request Failed - error sending request for url (http://localhost:51222/): connection error: An existing connection was forcibly closed by the remote host. (os error 10054)

@Lewiscowles1986
Copy link
Collaborator

I'd sooner have the commands inlined from https://github.com/smorimoto/tune-github-hosted-runner-network/blob/main/action.yml if possible.

@tienvx
Copy link
Contributor Author

tienvx commented Feb 23, 2024

Updated

Copy link
Collaborator

@Lewiscowles1986 Lewiscowles1986 left a comment

Choose a reason for hiding this comment

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

I'd have thought there would be three, but in the interest of not taking too much more of your time, I'll trust you made this determination based on something I cannot see.

@tienvx
Copy link
Contributor Author

tienvx commented Feb 23, 2024

These kind of errors happen mostly on Windows, so I only copy Windows's part to make our workflow file smaller.

@tienvx tienvx merged commit af0e06e into pact-foundation:ffi Feb 23, 2024
30 checks passed
@tienvx tienvx deleted the tune-network branch February 23, 2024 02:37
@tienvx
Copy link
Contributor Author

tienvx commented Feb 24, 2024

Look like this script is not working well:

2024-02-24T16:29:31.592880Z DEBUG ThreadId(01) verify_interaction{interaction="A get request to /generators"}: pact_verifier::provider_client: State change request failed with error error sending request for url (http://localhost:50266/pact-change-state): operation timed out

Verifying a pact between generatorsConsumer and generatorsProvider

  A get request to /generators (0s loading, 5s 48ms verification)
     Given Get Generators
      Request Failed - One or more of the setup state change handlers has failed

Also, the timeout error happen on MacOS 12:

https://github.com/pact-foundation/pact-php/actions/runs/8031806839/job/21940523922?pr=489

There was 1 error:

1) PhpPactTest\Standalone\ProviderVerifier\VerifierTest::testVerify
Symfony\Component\Process\Exception\ProcessTimedOutException: The process "'php' '-S' '127.0.0.1:49240' '-t' '/Users/runner/work/pact-php/pact-php/tests/PhpPact/Standalone/ProviderVerifier/../../../_public/'" exceeded the timeout of 60 seconds.

/Users/runner/work/pact-php/pact-php/vendor/symfony/process/Process.php:1156
/Users/runner/work/pact-php/pact-php/vendor/symfony/process/Process.php:464
/Users/runner/work/pact-php/pact-php/tests/PhpPact/Helper/AbstractProcess.php:28
/Users/runner/work/pact-php/pact-php/tests/PhpPact/Standalone/ProviderVerifier/VerifierTest.php:17

@tienvx tienvx mentioned this pull request Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants