-
Notifications
You must be signed in to change notification settings - Fork 49
Remove deprecated events #826
base: master
Are you sure you want to change the base?
Changes from 4 commits
8743989
0fa12f2
0ecdc24
405aeff
ba49c7f
c24005d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,23 +123,6 @@ private RunState transitionUpdates(Instant instant) { | |
|
|
||
| private class TransitionVisitor implements EventVisitor<RunState> { | ||
|
|
||
| @Deprecated | ||
| @Override | ||
| public RunState timeTrigger(WorkflowInstance workflowInstance) { | ||
| switch (state()) { | ||
| case NEW: | ||
| return state( // for backwards compatibility | ||
| SUBMITTED, | ||
| data().builder() | ||
| .trigger(Trigger.unknown("UNKNOWN")) | ||
| .triggerId("UNKNOWN") // for backwards compatibility | ||
| .build()); | ||
|
|
||
| default: | ||
| throw illegalTransition("timeTrigger"); | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
| public RunState triggerExecution(WorkflowInstance workflowInstance, Trigger trigger, | ||
| TriggerParameters parameters) { | ||
|
|
@@ -158,26 +141,6 @@ public RunState triggerExecution(WorkflowInstance workflowInstance, Trigger trig | |
| } | ||
| } | ||
|
|
||
| @Deprecated | ||
| @Override | ||
| public RunState created(WorkflowInstance workflowInstance, String executionId, | ||
| String dockerImage) { | ||
| switch (state()) { | ||
| case PREPARE: | ||
| case QUEUED: | ||
| return state( | ||
| SUBMITTED, // for backwards compatibility | ||
| data().builder() | ||
| .executionId(executionId) | ||
| .executionDescription(ExecutionDescription.forImage(dockerImage)) | ||
| .tries(data().tries() + 1) | ||
| .build()); | ||
|
|
||
| default: | ||
| throw illegalTransition("created"); | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
| public RunState info(WorkflowInstance workflowInstance, Message message) { | ||
| switch (state()) { | ||
|
|
@@ -249,8 +212,11 @@ public RunState submitted(WorkflowInstance workflowInstance, String executionId, | |
| public RunState started(WorkflowInstance workflowInstance) { | ||
| switch (state()) { | ||
| case SUBMITTED: | ||
| case PREPARE: | ||
| return state(RUNNING); | ||
| case PREPARE: | ||
| return state(RUNNING, data().builder() | ||
| .tries(data().tries() + 1) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @honnix do you know why we allow this transition from PREPARE directly to RUNNING? Is it in case we lose the events in between? fyi, we added this change to keep track of the number of
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know what the reason was. Missing I doubt bypassing My suggestion is we can remove support of this transition.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW there are a few things in this file marked as
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, thanks for the input. I think we'll do that as part of a following PR just to keep this PR limited in scope. |
||
| .build()); | ||
|
|
||
| default: | ||
| throw illegalTransition("started"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be unintended change.