csurong opened a new pull request, #18688:
URL: https://github.com/apache/dolphinscheduler/pull/18688

   ## Was this PR generated or assisted by AI?
   
   YES. AI assisted with investigation, the code change, regression tests, and 
this description. The contributor reviewed the scope and approved submission.
   
   ## Purpose of the pull request
   
   HTTP tasks currently replace response bodies for non-200 statuses with an 
error string containing a Java object reference. A POST returning 201 can pass 
custom status validation while losing its JSON output, and a 202 response can 
fail a matching body-content check.
   
   Fixes #18687
   
   ## Brief change log
   
   - Read the actual response body whenever it exists, regardless of status 
code. Keep status validation in the callers.
   - Add HTTP task regression tests for 201 output preservation, 202 body 
validation, default status rejection for 201/400, and an empty 204 response.
   
   ## Verify this pull request
   
   The two reproductions failed before the fix. After the fix, all 15 
HttpTaskTest tests and 3 OkHttpUtilsTest tests passed using Java 11:
   
   ```sh
   mvn -B -ntp -o -pl dolphinscheduler-task-plugin/dolphinscheduler-task-http 
-am -Dtest=HttpTaskTest,OkHttpUtilsTest -Dsurefire.failIfNoSpecifiedTests=false 
clean test
   ```
   
   Spotless apply/check passed for dolphinscheduler-common and 
dolphinscheduler-task-http; git diff --check passed.
   
   Tests use a local MockWebServer HTTP connection and a mocked task execution 
context. A full deployed workflow was not tested.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to