Skip to content
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

[Bug] [Server] Once click online schedule time, task will be automatically scheduled #13092

Merged
merged 4 commits into from
Dec 28, 2022

Conversation

Radeity
Copy link
Member

@Radeity Radeity commented Dec 4, 2022

Purpose of the pull request

Brief change log

Current mis-fire strategy is to process cron job immediately. The strategy will be triggered if setting scheduler’s start time earlier than current time.

  • Add check when creating and updating schedule, set the start time to current time if it's earlier than current time.

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@Radeity Radeity changed the title fix bug that trigger mis-fire strategy when setting start time earlie… [Bug] [Server] Once click online schedule time, task will be automatically scheduled Dec 4, 2022
@EricGao888 EricGao888 added bug Something isn't working priority:high labels Dec 4, 2022
@EricGao888 EricGao888 self-requested a review December 4, 2022 12:13
@codecov-commenter
Copy link

codecov-commenter commented Dec 4, 2022

Codecov Report

Merging #13092 (0c599c6) into dev (7c90bf0) will decrease coverage by 0.01%.
The diff coverage is 28.57%.

@@             Coverage Diff              @@
##                dev   #13092      +/-   ##
============================================
- Coverage     39.31%   39.29%   -0.02%     
- Complexity     4247     4279      +32     
============================================
  Files          1061     1069       +8     
  Lines         40050    40317     +267     
  Branches       4604     4636      +32     
============================================
+ Hits          15746    15844      +98     
- Misses        22524    22687     +163     
- Partials       1780     1786       +6     
Impacted Files Coverage Δ
...heduler/api/service/impl/SchedulerServiceImpl.java 26.79% <23.07%> (+0.01%) ⬆️
.../org/apache/dolphinscheduler/api/enums/Status.java 100.00% <100.00%> (ø)
...uler/api/service/impl/DataAnalysisServiceImpl.java 36.49% <0.00%> (-45.48%) ⬇️
...r/api/service/impl/ProcessInstanceServiceImpl.java 64.28% <0.00%> (-6.10%) ⬇️
...erver/worker/runner/WorkerTaskExecuteRunnable.java 38.51% <0.00%> (-1.23%) ⬇️
...e/dolphinscheduler/remote/NettyRemotingClient.java 52.08% <0.00%> (-0.70%) ⬇️
...apache/dolphinscheduler/service/log/LogClient.java 40.40% <0.00%> (-0.60%) ⬇️
...cheduler/api/service/impl/ExecutorServiceImpl.java 43.40% <0.00%> (-0.34%) ⬇️
...duler/dao/repository/impl/TaskInstanceDaoImpl.java 3.38% <0.00%> (-0.19%) ⬇️
...olphinscheduler/plugin/task/python/PythonTask.java 9.72% <0.00%> (-0.14%) ⬇️
... and 36 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@SbloodyS SbloodyS modified the milestones: 3.1.2, 3.0.3 Dec 5, 2022
@SbloodyS SbloodyS added the 3.0.x label Dec 5, 2022
@Radeity
Copy link
Member Author

Radeity commented Dec 8, 2022

Okay, i'll make some changes that return warning message if setting start time earlier than current time, also change the default start time in front-end to 0:00 of the next day? WDYT.

If no more suggestions, i'll follow the logic mentioned above and finish new code at this weekend.

@github-actions github-actions bot added the UI ui and front end related label Dec 11, 2022
@Radeity Radeity requested review from ruanwenjun and removed request for caishunfeng, SbloodyS, songjianet, EricGao888 and Amy0104 December 11, 2022 06:02
@Radeity Radeity requested review from caishunfeng and ruanwenjun and removed request for ruanwenjun and caishunfeng December 12, 2022 07:39
ruanwenjun
ruanwenjun previously approved these changes Dec 13, 2022
Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no other concern, I will merge this PR.

@ruanwenjun
Copy link
Member

@Radeity Please rebase the upstream dev to solve the dead-link check.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

22.2% 22.2% Coverage
0.0% 0.0% Duplication

@Radeity
Copy link
Member Author

Radeity commented Dec 14, 2022

@Radeity Please rebase the upstream dev to solve the dead-link check.

@ruanwenjun Done, thx!

@zhongjiajie zhongjiajie modified the milestones: 3.0.3, 3.0.4 Dec 19, 2022
@zhongjiajie zhongjiajie merged commit 7497b26 into apache:dev Dec 28, 2022
zhongjiajie pushed a commit that referenced this pull request Dec 28, 2022
…cally scheduled (#13092)

* fix bug that trigger mis-fire strategy when setting start time earlier than current time

* update ut

* add warning msg

* add check start time when set schedule online

(cherry picked from commit 7497b26)
@Radeity Radeity deleted the BUG-13089 branch December 28, 2022 07:48
@ruanwenjun
Copy link
Member

@Radeity Hi, I submit #13285 to fix this kind of problem, I plan to revert this PR, since the check is not needed now.

@Radeity
Copy link
Member Author

Radeity commented Dec 28, 2022

@Radeity Hi, I submit #13285 to fix this kind of problem, I plan to revert this PR, since the check is not needed now.

Okay, anyway, your fix is better, thx!

ruanwenjun added a commit that referenced this pull request Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working priority:high UI ui and front end related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] [Server] Once click online schedule time, task will be automatically scheduled
8 participants