Skip to content

Commit 7b08d7b

Browse files
authored
Merge branch 'dev' into Improvement-15009
2 parents 623bbe8 + f2d1466 commit 7b08d7b

File tree

67 files changed

+773
-2108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+773
-2108
lines changed

.github/workflows/docs.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,13 @@ jobs:
7070
- style
7171
- img-check
7272
- dead-link
73-
if: success()
73+
if: always()
7474
steps:
75-
- name: success
75+
- name: Status
7676
run: |
77-
echo "Docs check success"
78-
exit 0
77+
if [[ ${{ contains(needs.*.result, 'failure') }} == 'true' || ${{ contains(needs.*.result, 'cancelled') }} == 'true' ]]; then
78+
echo "Build Failed!"
79+
exit 1
80+
else
81+
echo "Build Success!"
82+
fi

docs/docs/en/architecture/cache.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

docs/docs/zh/architecture/cache.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

docs/img/cache-evict.png

-54.9 KB
Binary file not shown.

dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/main/java/org/apache/dolphinscheduler/plugin/alert/http/HttpAlertChannelFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.apache.dolphinscheduler.alert.api.AlertChannel;
2121
import org.apache.dolphinscheduler.alert.api.AlertChannelFactory;
2222
import org.apache.dolphinscheduler.alert.api.AlertInputTips;
23+
import org.apache.dolphinscheduler.spi.params.base.DataType;
2324
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
2425
import org.apache.dolphinscheduler.spi.params.base.Validate;
2526
import org.apache.dolphinscheduler.spi.params.input.InputParam;
@@ -84,6 +85,7 @@ public List<PluginParams> params() {
8485
InputNumberParam.newBuilder(HttpAlertConstants.NAME_TIMEOUT, HttpAlertConstants.TIMEOUT)
8586
.setValue(HttpAlertConstants.DEFAULT_TIMEOUT)
8687
.addValidate(Validate.newBuilder()
88+
.setType(DataType.NUMBER.getDataType())
8789
.setRequired(false)
8890
.build())
8991
.build();

dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/aspect/CacheEvictAspect.java

Lines changed: 0 additions & 159 deletions
This file was deleted.

dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoginController.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.apache.dolphinscheduler.common.enums.UserType;
3535
import org.apache.dolphinscheduler.common.utils.JSONUtils;
3636
import org.apache.dolphinscheduler.common.utils.OkHttpUtils;
37+
import org.apache.dolphinscheduler.dao.entity.Session;
3738
import org.apache.dolphinscheduler.dao.entity.User;
3839

3940
import org.apache.commons.lang3.StringUtils;
@@ -160,20 +161,13 @@ public Result ssoLogin(HttpServletRequest request) {
160161
return Result.success();
161162
}
162163

163-
/**
164-
* sign out
165-
*
166-
* @param loginUser login user
167-
* @param request request
168-
* @return sign out result
169-
*/
170164
@Operation(summary = "signOut", description = "SIGNOUT_NOTES")
171165
@PostMapping(value = "/signOut")
172166
@ApiException(SIGN_OUT_ERROR)
173167
public Result signOut(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
174168
HttpServletRequest request) {
175169
String ip = getClientIpAddress(request);
176-
sessionService.signOut(ip, loginUser);
170+
sessionService.expireSession(loginUser.getId());
177171
// clear session
178172
request.removeAttribute(Constants.SESSION_USER);
179173
return success();
@@ -244,13 +238,10 @@ public void loginByAuth2(@RequestParam String code, @RequestParam String provide
244238
if (user == null) {
245239
user = usersService.createUser(UserType.GENERAL_USER, username, null);
246240
}
247-
String sessionId = sessionService.createSession(user, null);
248-
if (sessionId == null) {
249-
log.error("Failed to create session, userName:{}.", user.getUserName());
250-
}
241+
Session session = sessionService.createSessionIfAbsent(user);
251242
response.setStatus(HttpStatus.SC_MOVED_TEMPORARILY);
252243
response.sendRedirect(String.format("%s?sessionId=%s&authType=%s", oAuth2ClientProperties.getCallbackUrl(),
253-
sessionId, "oauth2"));
244+
session.getId(), "oauth2"));
254245
} catch (Exception ex) {
255246
log.error(ex.getMessage(), ex);
256247
response.setStatus(HttpStatus.SC_MOVED_TEMPORARILY);

0 commit comments

Comments
 (0)