-
Notifications
You must be signed in to change notification settings - Fork 160
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
AIDM-529: Ensuring latest version of composer package are tested #3041
Conversation
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. If you need to update snapshots, please refer to CONTRIBUTING.md 1 occurrences of : - "error.message": "Uncaught OpenAI\\Exceptions\\ErrorException: The server had an error while processing your request. Sorry about that! in /home/circleci/app/tests/Integrations/OpenAI/vendor/openai-php/client/src/Responses/StreamResponse.php:60"
- "error.stack": "#0 [internal function]: OpenAI\\Responses\\StreamResponse->getIterator()\n#1 /home/circleci/app/src/DDTrace/Integrations/OpenAI/OpenAIIntegration.php(1079): Generator->valid()\n#2 /home/circleci/app/src/DDTrace/Integrations/OpenAI/OpenAIIntegration.php(1033): DDTrace\\Integrations\\OpenAI\\OpenAIIntegration::readAndStoreStreamedResponse()\n#3 /home/circleci/app/src/DDTrace/Integrations/OpenAI/OpenAIIntegration.php(204): DDTrace\\Integrations\\OpenAI\\OpenAIIntegration::handleStreamedResponse()\n#4 /home/circleci/app/tests/Integrations/OpenAI/vendor/openai-php/client/src/Resources/Chat.php(54): OpenAI\\Resources\\Chat->DDTrace\\Integrations\\OpenAI\\{closure}()\n#5 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(100): OpenAI\\Resources\\Chat->createStreamed()\n#6 /home/circleci/app/tests/Common/SnapshotTestTrait.php(347): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->DDTrace\\Tests\\Integrations\\OpenAI\\{closure}()\n#7 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(93): DDTrace\\Tests\\Common\\IntegrationTestCase->isolateTracerSnapshot()\n#8 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(455): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->callStreamed()\n#9 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1617): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->testCreateChatCompletionStreamWithError()\n#10 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1223): PHPUnit\\Framework\\TestCase->runTest()\n#11 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestResult.php(729): PHPUnit\\Framework\\TestCase->runBare()\n#12 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(973): PHPUnit\\Framework\\TestResult->run()\n#13 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestCase->run()\n#14 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestSuite->run()\n#15 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\\Framework\\TestSuite->run()\n#16 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(146): PHPUnit\\TextUI\\TestRunner->run()\n#17 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(99): PHPUnit\\TextUI\\Command->run()\n#18 /home/circleci/app/tests/vendor/phpunit/phpunit/phpunit(107): PHPUnit\\TextUI\\Command::main()\n#19 /home/circleci/app/tests/vendor/bin/phpunit(122): include()\n#20 {main}"
+ "error.message": "Uncaught OpenAI\\Exceptions\\ErrorException: The server had an error while processing your request. Sorry about that! in /home/circleci/app/tests/Integrations/OpenAI/Latest/vendor/openai-php/client/src/Responses/StreamResponse.php:60"
+ "error.stack": "#0 [internal function]: OpenAI\\Responses\\StreamResponse->getIterator()\n#1 /home/circleci/app/src/DDTrace/Integrations/OpenAI/OpenAIIntegration.php(1079): Generator->valid()\n#2 /home/circleci/app/src/DDTrace/Integrations/OpenAI/OpenAIIntegration.php(1033): DDTrace\\Integrations\\OpenAI\\OpenAIIntegration::readAndStoreStreamedResponse()\n#3 /home/circleci/app/src/DDTrace/Integrations/OpenAI/OpenAIIntegration.php(204): DDTrace\\Integrations\\OpenAI\\OpenAIIntegration::handleStreamedResponse()\n#4 /home/circleci/app/tests/Integrations/OpenAI/Latest/vendor/openai-php/client/src/Resources/Chat.php(54): OpenAI\\Resources\\Chat->DDTrace\\Integrations\\OpenAI\\{closure}()\n#5 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(100): OpenAI\\Resources\\Chat->createStreamed()\n#6 /home/circleci/app/tests/Common/SnapshotTestTrait.php(347): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->DDTrace\\Tests\\Integrations\\OpenAI\\{closure}()\n#7 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(93): DDTrace\\Tests\\Common\\IntegrationTestCase->isolateTracerSnapshot()\n#8 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(455): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->callStreamed()\n#9 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1617): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->testCreateChatCompletionStreamWithError()\n#10 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1223): PHPUnit\\Framework\\TestCase->runTest()\n#11 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestResult.php(729): PHPUnit\\Framework\\TestCase->runBare()\n#12 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(973): PHPUnit\\Framework\\TestResult->run()\n#13 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestCase->run()\n#14 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestSuite->run()\n#15 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\\Framework\\TestSuite->run()\n#16 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(146): PHPUnit\\TextUI\\TestRunner->run()\n#17 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(99): PHPUnit\\TextUI\\Command->run()\n#18 /home/circleci/app/tests/vendor/phpunit/phpunit/phpunit(107): PHPUnit\\TextUI\\Command::main()\n#19 /home/circleci/app/tests/vendor/bin/phpunit(122): include()\n#20 {main}"
1 occurrences of : - "error.message": "Uncaught OpenAI\\Exceptions\\ErrorException: Invalid schema for function 'get_current_weather':\nIn context=('properties', 'location'), array schema missing items in /home/circleci/app/tests/Integrations/OpenAI/vendor/openai-php/client/src/Transporters/HttpTransporter.php:133"
- "error.stack": "#0 /home/circleci/app/tests/Integrations/OpenAI/vendor/openai-php/client/src/Transporters/HttpTransporter.php(57): OpenAI\\Transporters\\HttpTransporter->throwIfJsonError()\n#1 /home/circleci/app/tests/Integrations/OpenAI/vendor/openai-php/client/src/Resources/Completions.php(33): OpenAI\\Transporters\\HttpTransporter->requestObject()\n#2 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(81): OpenAI\\Resources\\Completions->create()\n#3 /home/circleci/app/tests/Common/SnapshotTestTrait.php(347): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->DDTrace\\Tests\\Integrations\\OpenAI\\{closure}()\n#4 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(76): DDTrace\\Tests\\Common\\IntegrationTestCase->isolateTracerSnapshot()\n#5 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(468): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->call()\n#6 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1617): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->testCreateCompletionsWithMultipleErrorMessages()\n#7 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1223): PHPUnit\\Framework\\TestCase->runTest()\n#8 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestResult.php(729): PHPUnit\\Framework\\TestCase->runBare()\n#9 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(973): PHPUnit\\Framework\\TestResult->run()\n#10 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestCase->run()\n#11 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestSuite->run()\n#12 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\\Framework\\TestSuite->run()\n#13 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(146): PHPUnit\\TextUI\\TestRunner->run()\n#14 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(99): PHPUnit\\TextUI\\Command->run()\n#15 /home/circleci/app/tests/vendor/phpunit/phpunit/phpunit(107): PHPUnit\\TextUI\\Command::main()\n#16 /home/circleci/app/tests/vendor/bin/phpunit(122): include()\n#17 {main}"
+ "error.message": "Uncaught OpenAI\\Exceptions\\ErrorException: Invalid schema for function 'get_current_weather':\nIn context=('properties', 'location'), array schema missing items in /home/circleci/app/tests/Integrations/OpenAI/Latest/vendor/openai-php/client/src/Transporters/HttpTransporter.php:133"
+ "error.stack": "#0 /home/circleci/app/tests/Integrations/OpenAI/Latest/vendor/openai-php/client/src/Transporters/HttpTransporter.php(57): OpenAI\\Transporters\\HttpTransporter->throwIfJsonError()\n#1 /home/circleci/app/tests/Integrations/OpenAI/Latest/vendor/openai-php/client/src/Resources/Completions.php(33): OpenAI\\Transporters\\HttpTransporter->requestObject()\n#2 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(81): OpenAI\\Resources\\Completions->create()\n#3 /home/circleci/app/tests/Common/SnapshotTestTrait.php(347): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->DDTrace\\Tests\\Integrations\\OpenAI\\{closure}()\n#4 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(76): DDTrace\\Tests\\Common\\IntegrationTestCase->isolateTracerSnapshot()\n#5 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(468): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->call()\n#6 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1617): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->testCreateCompletionsWithMultipleErrorMessages()\n#7 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1223): PHPUnit\\Framework\\TestCase->runTest()\n#8 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestResult.php(729): PHPUnit\\Framework\\TestCase->runBare()\n#9 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(973): PHPUnit\\Framework\\TestResult->run()\n#10 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestCase->run()\n#11 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestSuite->run()\n#12 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\\Framework\\TestSuite->run()\n#13 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(146): PHPUnit\\TextUI\\TestRunner->run()\n#14 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(99): PHPUnit\\TextUI\\Command->run()\n#15 /home/circleci/app/tests/vendor/phpunit/phpunit/phpunit(107): PHPUnit\\TextUI\\Command::main()\n#16 /home/circleci/app/tests/vendor/bin/phpunit(122): include()\n#17 {main}"
1 occurrences of : - "error.message": "Uncaught OpenAI\\Exceptions\\ErrorException: Incorrect API key provided: foo. You can find your API key at https://platform.openai.com. in /home/circleci/app/tests/Integrations/OpenAI/vendor/openai-php/client/src/Transporters/HttpTransporter.php:133"
- "error.stack": "#0 /home/circleci/app/tests/Integrations/OpenAI/vendor/openai-php/client/src/Transporters/HttpTransporter.php(57): OpenAI\\Transporters\\HttpTransporter->throwIfJsonError()\n#1 /home/circleci/app/tests/Integrations/OpenAI/vendor/openai-php/client/src/Resources/Models.php(28): OpenAI\\Transporters\\HttpTransporter->requestObject()\n#2 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(83): OpenAI\\Resources\\Models->list()\n#3 /home/circleci/app/tests/Common/SnapshotTestTrait.php(347): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->DDTrace\\Tests\\Integrations\\OpenAI\\{closure}()\n#4 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(76): DDTrace\\Tests\\Common\\IntegrationTestCase->isolateTracerSnapshot()\n#5 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(463): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->call()\n#6 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1617): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->testListModelsWithError()\n#7 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1223): PHPUnit\\Framework\\TestCase->runTest()\n#8 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestResult.php(729): PHPUnit\\Framework\\TestCase->runBare()\n#9 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(973): PHPUnit\\Framework\\TestResult->run()\n#10 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestCase->run()\n#11 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestSuite->run()\n#12 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\\Framework\\TestSuite->run()\n#13 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(146): PHPUnit\\TextUI\\TestRunner->run()\n#14 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(99): PHPUnit\\TextUI\\Command->run()\n#15 /home/circleci/app/tests/vendor/phpunit/phpunit/phpunit(107): PHPUnit\\TextUI\\Command::main()\n#16 /home/circleci/app/tests/vendor/bin/phpunit(122): include()\n#17 {main}"
+ "error.message": "Uncaught OpenAI\\Exceptions\\ErrorException: Incorrect API key provided: foo. You can find your API key at https://platform.openai.com. in /home/circleci/app/tests/Integrations/OpenAI/Latest/vendor/openai-php/client/src/Transporters/HttpTransporter.php:133"
+ "error.stack": "#0 /home/circleci/app/tests/Integrations/OpenAI/Latest/vendor/openai-php/client/src/Transporters/HttpTransporter.php(57): OpenAI\\Transporters\\HttpTransporter->throwIfJsonError()\n#1 /home/circleci/app/tests/Integrations/OpenAI/Latest/vendor/openai-php/client/src/Resources/Models.php(28): OpenAI\\Transporters\\HttpTransporter->requestObject()\n#2 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(83): OpenAI\\Resources\\Models->list()\n#3 /home/circleci/app/tests/Common/SnapshotTestTrait.php(347): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->DDTrace\\Tests\\Integrations\\OpenAI\\{closure}()\n#4 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(76): DDTrace\\Tests\\Common\\IntegrationTestCase->isolateTracerSnapshot()\n#5 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(463): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->call()\n#6 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1617): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->testListModelsWithError()\n#7 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1223): PHPUnit\\Framework\\TestCase->runTest()\n#8 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestResult.php(729): PHPUnit\\Framework\\TestCase->runBare()\n#9 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(973): PHPUnit\\Framework\\TestResult->run()\n#10 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestCase->run()\n#11 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestSuite->run()\n#12 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\\Framework\\TestSuite->run()\n#13 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(146): PHPUnit\\TextUI\\TestRunner->run()\n#14 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(99): PHPUnit\\TextUI\\Command->run()\n#15 /home/circleci/app/tests/vendor/phpunit/phpunit/phpunit(107): PHPUnit\\TextUI\\Command::main()\n#16 /home/circleci/app/tests/vendor/bin/phpunit(122): include()\n#17 {main}"
1 occurrences of : - "error.message": "Uncaught OpenAI\\Exceptions\\ErrorException: You exceeded your current quota, please check in /home/circleci/app/tests/Integrations/OpenAI/vendor/openai-php/client/src/Transporters/HttpTransporter.php:133"
- "error.stack": "#0 /home/circleci/app/tests/Integrations/OpenAI/vendor/openai-php/client/src/Transporters/HttpTransporter.php(57): OpenAI\\Transporters\\HttpTransporter->throwIfJsonError()\n#1 /home/circleci/app/tests/Integrations/OpenAI/vendor/openai-php/client/src/Resources/Models.php(28): OpenAI\\Transporters\\HttpTransporter->requestObject()\n#2 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(83): OpenAI\\Resources\\Models->list()\n#3 /home/circleci/app/tests/Common/SnapshotTestTrait.php(347): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->DDTrace\\Tests\\Integrations\\OpenAI\\{closure}()\n#4 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(76): DDTrace\\Tests\\Common\\IntegrationTestCase->isolateTracerSnapshot()\n#5 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(473): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->call()\n#6 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1617): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->testListModelsWithNullErrorType()\n#7 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1223): PHPUnit\\Framework\\TestCase->runTest()\n#8 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestResult.php(729): PHPUnit\\Framework\\TestCase->runBare()\n#9 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(973): PHPUnit\\Framework\\TestResult->run()\n#10 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestCase->run()\n#11 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestSuite->run()\n#12 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\\Framework\\TestSuite->run()\n#13 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(146): PHPUnit\\TextUI\\TestRunner->run()\n#14 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(99): PHPUnit\\TextUI\\Command->run()\n#15 /home/circleci/app/tests/vendor/phpunit/phpunit/phpunit(107): PHPUnit\\TextUI\\Command::main()\n#16 /home/circleci/app/tests/vendor/bin/phpunit(122): include()\n#17 {main}"
+ "error.message": "Uncaught OpenAI\\Exceptions\\ErrorException: You exceeded your current quota, please check in /home/circleci/app/tests/Integrations/OpenAI/Latest/vendor/openai-php/client/src/Transporters/HttpTransporter.php:133"
+ "error.stack": "#0 /home/circleci/app/tests/Integrations/OpenAI/Latest/vendor/openai-php/client/src/Transporters/HttpTransporter.php(57): OpenAI\\Transporters\\HttpTransporter->throwIfJsonError()\n#1 /home/circleci/app/tests/Integrations/OpenAI/Latest/vendor/openai-php/client/src/Resources/Models.php(28): OpenAI\\Transporters\\HttpTransporter->requestObject()\n#2 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(83): OpenAI\\Resources\\Models->list()\n#3 /home/circleci/app/tests/Common/SnapshotTestTrait.php(347): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->DDTrace\\Tests\\Integrations\\OpenAI\\{closure}()\n#4 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(76): DDTrace\\Tests\\Common\\IntegrationTestCase->isolateTracerSnapshot()\n#5 /home/circleci/app/tests/Integrations/OpenAI/OpenAITest.php(473): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->call()\n#6 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1617): DDTrace\\Tests\\Integrations\\OpenAI\\OpenAITest->testListModelsWithNullErrorType()\n#7 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(1223): PHPUnit\\Framework\\TestCase->runTest()\n#8 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestResult.php(729): PHPUnit\\Framework\\TestCase->runBare()\n#9 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestCase.php(973): PHPUnit\\Framework\\TestResult->run()\n#10 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestCase->run()\n#11 /home/circleci/app/tests/vendor/phpunit/phpunit/src/Framework/TestSuite.php(685): PHPUnit\\Framework\\TestSuite->run()\n#12 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\\Framework\\TestSuite->run()\n#13 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(146): PHPUnit\\TextUI\\TestRunner->run()\n#14 /home/circleci/app/tests/vendor/phpunit/phpunit/src/TextUI/Command.php(99): PHPUnit\\TextUI\\Command->run()\n#15 /home/circleci/app/tests/vendor/phpunit/phpunit/phpunit(107): PHPUnit\\TextUI\\Command::main()\n#16 /home/circleci/app/tests/vendor/bin/phpunit(122): include()\n#17 {main}"
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3041 +/- ##
============================================
- Coverage 74.79% 74.77% -0.02%
Complexity 2787 2787
============================================
Files 112 112
Lines 11033 11033
============================================
- Hits 8252 8250 -2
- Misses 2781 2783 +2
Flags with carried forward coverage won't be shown. Click here to find out more. see 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
…IDM-529_testing-latest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Just a few comments :)
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpicky but do you need to checkout the entire history?
1
is the default and just grabs the latest
title: "chore: update latest versions" | ||
branch: "update-latest-versions" | ||
base: "master" | ||
draft: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming that will be removed at a future date to become a non-draft PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch
class PackageUpdater | ||
{ | ||
private const INTEGRATIONS_DIR = __DIR__ . '/Integrations'; | ||
private const PACKAGIST_API_URL = 'https://repo.packagist.org/p2/%s.json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading through their API documentation I don't see much mention of a hard rate limit, have you ran into anything locally? Just curious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing this in their documentation:
If you do scheduled jobs, avoid running things at midnight or once an hour at XX:00. Most people do so and we do see traffic peaks every hour. Pick a "random" time by hand for your cron jobs, or even better (if you can) is to make it run on a really randomized schedule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice to have thought about that 👍
tests/PackageUpdater.php
Outdated
$latestVersion = $this->getLatestVersion($library); | ||
if (!$latestVersion) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: does this mean that in the case of rate limits / timeouts from the PACKAGIST_API_URL
it does nothing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently yes... Perhaps you're considering throwing an exception there so that we're more easily aware?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, maybe some logging / exception throwing for awareness (that we aren't updating the library because we got a non-OK
response)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I reviewed the tests/PackageUpdater.php
and update_latest_versions.yml
files
Description
Because of the amount of changes associated with this PR, I’ll describe below as exhaustively as I can all the changes worth considering:
MAIN CHANGES
tests/Common/IntegrationTestCase.php
A new method has been introduced:
getTestedLibrary
.By default, this method looks at the location of the test file for a
composer.json
. This is the case for integration tests. It will use the first required package as the tested library if it finds one.This method is meant to be overridden by test cases in other cases where the tested library is not as easily found. For instance, for web tests, and where applicable, this method has been overridden to return the tested library (e.g.,
laravel/framework
).In the future, when creating a new test case:
getTestedLibrary
will have to be overridden with the relevant library.tests/PackageUpdater.php
This file is responsible for:
composer.json
files and libraries to be updatedcomposer.json
if it is differentThis file is used in the Github Action job (see below -
update_latest_versions.yml
) to create the PR and update the pins.Sample Script Logs
.github/workflows/update_latest_versions.yml
This file contains the Github Action job that will be run weekly on Sunday at Midnight (or manually).
This file will execute this aforementioned package updater script and create a PR in case of changes. This PR will effectively update the test suite to be tested against the latest version available.
Here is a sample job: link
Here is a sample PR created by the script: #3054
tests/**/Latest/**
The
tests/
folder architecture has been slightly modified. All composer-based libraries/frameworks will now contain aLatest/
folder. Under the latter, the test suite will be run against the latest pinned version.This means that the versions of the currently tested packages that were executed against the latest (e.g.,
tests/Frameworks/Laravel/Version_11_x
) have been moved to aLatest/
folder (e.g.,tests/Frameworks/Laravel/Latest
). The same goes for the test suite.Let’s suppose that tomorrow, Laravel V12 will be released. Because of composers’ version constraints, the
test_web_laravel_latest
will fail. At that point, it will be our duty to take manual action and:tests/Framework/Laravel/Version_11_x
folder with the V11 of the framework;test_web_laravel_11x
rule.OTHER CHANGES
tests/Common/WebFrameworkTestCase.php
The visibility of
getAppIndexScript
has changed fromprotected
topublic
. This change allows it to be used intests/PackageUpdater.php
to automatically retrieve the relevantcomposer.json
file without further intervention.Makefile
Now, there will be a
test_.*_latest
rule (e.g.,test_web_laravel_latest
). This rule will, therefore, test the latest pinned version.Because 1. this version is pinned, and 2. not all libraries follow semantic versioning, some PHP runtime-breaking changes occurred in some libraries. When this happened, a new test case was added as a regression.
tests/snapshots/**
Because paths have been modified by being moved under
Latest/
, some snapshots needed to be modified accordingly.Reviewer checklist