Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
25b2644
fix #17637
Nov 3, 2025
5f83910
Because workflow lineage only retains the current version, deleting h…
Nov 3, 2025
06b7a82
Optimize workflow deletion logic to ensure compatibility with histori…
Nov 4, 2025
f4ab8a2
spotless
Nov 4, 2025
22e3d5e
fix #17637
Nov 3, 2025
53fc596
Because workflow lineage only retains the current version, deleting h…
Nov 3, 2025
dd2e35a
Optimize workflow deletion logic to ensure compatibility with histori…
Nov 4, 2025
0dd946d
spotless
Nov 4, 2025
0fa45db
add ut test
Nov 6, 2025
0e5a084
:Merge branch 'dev' of github.com:det101/dolphinscheduler into dev
Nov 6, 2025
e5945a6
Merge branch 'dev' into dev
det101 Nov 7, 2025
65b75d8
Merge branch 'dev' into dev
det101 Nov 7, 2025
72ef4a6
Merge branch 'dev' into dev
caishunfeng Nov 11, 2025
b362233
Merge branch 'apache:dev' into dev
det101 Nov 12, 2025
9d4783f
fix #17638
Nov 12, 2025
019f277
Merge branch 'dev' into dev
SbloodyS Nov 14, 2025
26ba2d7
Merge branch 'dev' into dev
ruanwenjun Nov 18, 2025
2f907cb
Simplify the logic of WorkflowDefinitionService.saveWorkflowLineage().
Nov 19, 2025
b0c60b2
Merge branch 'dev' into dev
ruanwenjun Nov 20, 2025
5a63d8e
fix #17704
Nov 24, 2025
c471533
Merge branch 'apache:dev' into dev
det101 Nov 24, 2025
78e3bcc
Update dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/ma…
det101 Nov 26, 2025
5124616
Merge branch 'dev' into dev
SbloodyS Nov 27, 2025
7d4019d
Merge branch 'dev' into dev
SbloodyS Nov 28, 2025
b8c30ce
Merge branch 'dev' into dev
det101 Dec 3, 2025
a061d9c
Merge branch 'dev' into dev
det101 Dec 4, 2025
513756c
Merge branch 'dev' into dev
Gallardot Dec 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@

OkHttpResponse httpResponse = sendRequest();

taskExecutionContext.setVarPool(httpParameters.getVarPool());

validateResponse(httpResponse.getBody(), httpResponse.getStatusCode());
}

Expand Down Expand Up @@ -204,7 +206,7 @@
.filter(httpProperty -> httpProperty.getHttpParametersType() != null)
.filter(httpProperty -> httpProperty.getHttpParametersType().equals(HttpParametersType.HEADERS)
&& !httpProperty.getProp().equalsIgnoreCase(HttpConstants.CONTENT_TYPE))
.peek((httpProperty) -> {

Check warning on line 209 in dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/main/java/org/apache/dolphinscheduler/plugin/task/http/HttpTask.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this use of "Stream.peek".

See more on https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&issues=AZr74O_kJrG_ThQMEFB4&open=AZr74O_kJrG_ThQMEFB4&pullRequest=17716
httpProperty.setProp(ParameterUtils.convertParameterPlaceholders(httpProperty.getProp(),
ParameterUtils.convert(taskExecutionContext.getPrepareParamsMap())));
httpProperty.setValue(ParameterUtils.convertParameterPlaceholders(httpProperty.getValue(),
Expand Down Expand Up @@ -237,7 +239,7 @@

return httpParameters.getHttpRequestParams().stream()
.filter(httpProperty -> httpProperty.getHttpParametersType().equals(HttpParametersType.PARAMETER))
.peek((httpProperty) -> {

Check warning on line 242 in dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/main/java/org/apache/dolphinscheduler/plugin/task/http/HttpTask.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this use of "Stream.peek".

See more on https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&issues=AZr74O_kJrG_ThQMEFB5&open=AZr74O_kJrG_ThQMEFB5&pullRequest=17716
httpProperty.setProp(ParameterUtils.convertParameterPlaceholders(httpProperty.getProp(),
ParameterUtils.convert(taskExecutionContext.getPrepareParamsMap())));
httpProperty.setValue(ParameterUtils.convertParameterPlaceholders(httpProperty.getValue(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,39 @@
Assertions.assertEquals(response, property.getValue());
}

@Test
public void testHandleSetsVarPoolToTaskExecutionContext() throws Exception {

Check warning on line 185 in dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/test/java/org/apache/dolphinscheduler/plugin/task/http/HttpTaskTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this 'public' modifier.

See more on https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&issues=AZrDMeCAoxAzld-1xRSM&open=AZrDMeCAoxAzld-1xRSM&pullRequest=17716
String responseBody = "{\"status\": \"success\", \"data\": \"test\"}";
String taskName = "testHttpTask";

TaskExecutionContext taskExecutionContext = Mockito.mock(TaskExecutionContext.class);
Mockito.when(taskExecutionContext.getTaskName()).thenReturn(taskName);

String url = withMockWebServer(DEFAULT_MOCK_PATH, HttpStatus.SC_OK, responseBody);
String paramData = generateHttpParameters(url, HttpRequestMethod.GET, "",
new ArrayList<>(), HttpCheckCondition.STATUS_CODE_DEFAULT, "");
Mockito.when(taskExecutionContext.getTaskParams()).thenReturn(paramData);

HttpTask httpTask = new HttpTask(taskExecutionContext);
httpTask.init();
httpTask.handle(null);

Mockito.verify(taskExecutionContext, Mockito.times(1)).setVarPool(Mockito.anyList());

Mockito.verify(taskExecutionContext).setVarPool(Mockito.argThat(varPool -> {
if (varPool == null || varPool.isEmpty()) {
return false;
}
Property property = varPool.get(0);
return property.getProp().equals(taskName + ".response")
&& property.getDirect() == Direct.OUT
&& property.getType() == DataType.VARCHAR
&& property.getValue().contains("status");
}));

Assertions.assertEquals(EXIT_CODE_SUCCESS, httpTask.getExitStatusCode());
}

private String withMockWebServer(String path, int actualResponseCode,
String actualResponseBody) throws IOException {
MockWebServer server = new MockWebServer();
Expand Down
Loading