kittimzhe opened a new pull request, #18704:
URL: https://github.com/apache/dolphinscheduler/pull/18704
## Was this PR generated or assisted by AI?
YES — issue triage, root-cause analysis, fix and tests were developed with
AI assistance (mechanism verified against the code and pinned by a red→green
test below).
## Purpose of the pull request
Fixes #18696. An HTTP task with method DELETE silently dropped the
parameters configured under HTTP Parameters: `HttpTask#sendDeleteRequest` never
collected the PARAMETER-typed entries, and the `OkHttpUtils.delete` overloads
took no parameter map — so `DELETE /capture?existing=1` with a separate
`jobId=42` parameter reached the server as `DELETE /capture?existing=1`, while
GET sent the same parameter correctly.
## Brief change log
- `OkHttpUtils`: add a `delete` overload accepting `Map<String, Object>
requestParams`, appending them to the url through the same `addUrlParams`
helper the GET path uses; the existing overloads delegate with `null` (behavior
unchanged for other callers).
- `HttpTask#sendDeleteRequest`: collect `getRequestParams()` and pass it to
the new overload, mirroring `sendGetRequest`.
## Verify this pull request
This change added tests and can be verified as follows:
- `HttpTaskTest#testDeleteRequestSendsHttpParameterParamsAsQuery` — a DELETE
task with a `${day}` PARAMETER entry (resolved to `20220812` via
prepareParamsMap) records `GET /test?day=20220812`-style output: `DELETE`
method with path `/test?day=20220812`. Fails on the pre-fix code (`expected:
</test?day=20220812> but was: </test>`).
- Full `HttpTaskTest`: 17/17 green with the fix (JDK 8, `mvn test -pl
dolphinscheduler-task-plugin/dolphinscheduler-task-http -Dtest=HttpTaskTest`).
--
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]