Skip to content

Commit

Permalink
Only add compensation for states when task in progress
Browse files Browse the repository at this point in the history
Signed-off-by: gabriel-farache <[email protected]>
  • Loading branch information
gabriel-farache committed Nov 20, 2024
1 parent 5d89b53 commit 8204797
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
2 changes: 1 addition & 1 deletion mta-v7.x/mta.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 0 additions & 25 deletions mta-v7.x/mta.sw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ functions:
states:
- name: CreateApplication
type: operation
compensatedBy: reportAbort
actions:
- name: createApplication
actionDataFilter:
Expand All @@ -182,7 +181,6 @@ states:
kind: git
transition: CreateTaskgroup
- name: CreateTaskgroup
compensatedBy: reportAbort
type: operation
actionMode: sequential
actions:
Expand Down Expand Up @@ -259,14 +257,12 @@ states:
defaultCondition:
transition: GetApplicationAnalysis
- name: TaskFailedError
compensatedBy: reportAbort
type: operation
actions:
- name: Fill exitMessage
functionRef: TaskFailedErrorExitMessage
transition: NotifyFailureBackstage
- name: GetApplicationAnalysis
compensatedBy: reportAbort
type: operation
actionMode: sequential
actions:
Expand All @@ -279,7 +275,6 @@ states:
toStateData: ".applicationAnalysis"
transition: CountMandatoriesIncidents
- name: CountMandatoriesIncidents
compensatedBy: reportAbort
type: operation
actionMode: sequential
actions:
Expand All @@ -290,7 +285,6 @@ states:
refName: countMandatoriesIncidents
transition: CountNonMandatoriesIncidents
- name: CountNonMandatoriesIncidents
compensatedBy: reportAbort
type: operation
actionMode: sequential
actions:
Expand All @@ -301,7 +295,6 @@ states:
refName: countNonMandatoriesIncidents
transition: CheckMandatoriesIncidents
- name: CheckMandatoriesIncidents
compensatedBy: reportAbort
type: switch
dataConditions:
- condition: .application.mandatoriesIncidents > 0
Expand All @@ -313,7 +306,6 @@ states:
defaultCondition:
transition: NotifyCompletion
- name: GetTrackers
compensatedBy: reportAbort
type: operation
actions:
- name: GetTrackers
Expand All @@ -323,22 +315,19 @@ states:
toStateData: ".trackers"
transition: TrackersExist
- name: TrackersExist
compensatedBy: reportAbort
type: switch
dataConditions:
- condition: (.trackers != null)
transition: GetTracker
defaultCondition:
transition: TrackersDoesNotExistError
- name: TrackersDoesNotExistError
compensatedBy: reportAbort
type: operation
actions:
- name: Fill exitMessage
functionRef: TrackersDoesNotExistErrorExitMessage
transition: NotifyFailureBackstage
- name: GetTracker
compensatedBy: reportAbort
type: operation
actions:
- condition: .trackers != null
Expand All @@ -350,22 +339,19 @@ states:
toStateData: ".tracker"
transition: TrackerExists
- name: TrackerExists
compensatedBy: reportAbort
type: switch
dataConditions:
- condition: (.tracker != null)
transition: GetTrackerProjects
defaultCondition:
transition: TrackerDoesNotExistError
- name: TrackerDoesNotExistError
compensatedBy: reportAbort
type: operation
actions:
- name: Fill exitMessage
functionRef: TrackerDoesNotExistErrorExitMessage
transition: NotifyFailureBackstage
- name: GetTrackerProjects
compensatedBy: reportAbort
type: operation
actions:
- condition: .tracker != null
Expand All @@ -377,22 +363,19 @@ states:
toStateData: ".trackerProjects"
transition: TrackerProjectsExist
- name: TrackerProjectsExist
compensatedBy: reportAbort
type: switch
dataConditions:
- condition: (.trackerProjects != null)
transition: GetTrackerProject
defaultCondition:
transition: TrackerProjectsDoesNotExistError
- name: TrackerProjectsDoesNotExistError
compensatedBy: reportAbort
type: operation
actions:
- name: Fill exitMessage
functionRef: TrackerProjectsDoesNotExistErrorExitMessage
transition: NotifyFailureBackstage
- name: GetTrackerProject
compensatedBy: reportAbort
type: operation
actions:
- condition: .trackerProjects != null
Expand All @@ -405,22 +388,19 @@ states:
toStateData: ".trackerProject"
transition: TrackerProjectExist
- name: TrackerProjectExist
compensatedBy: reportAbort
type: switch
dataConditions:
- condition: (.trackerProject != null)
transition: GetTrackerProjectIssueTypes
defaultCondition:
transition: TrackerProjectDoesNotExistError
- name: TrackerProjectDoesNotExistError
compensatedBy: reportAbort
type: operation
actions:
- name: Fill exitMessage
functionRef: TrackerProjectDoesNotExistErrorExitMessage
transition: NotifyFailureBackstage
- name: GetTrackerProjectIssueTypes
compensatedBy: reportAbort
type: operation
actions:
- condition: .trackerProject != null
Expand All @@ -433,22 +413,19 @@ states:
toStateData: ".trackerProjectIssueTypes"
transition: TrackerProjectIssueTypesExist
- name: TrackerProjectIssueTypesExist
compensatedBy: reportAbort
type: switch
dataConditions:
- condition: (.trackerProjectIssueTypes != null)
transition: CreateMigrationWave
defaultCondition:
transition: TrackerProjectIssueTypesDoesNotExistError
- name: TrackerProjectIssueTypesDoesNotExistError
compensatedBy: reportAbort
type: operation
actions:
- name: Fill exitMessage
functionRef: TrackerProjectIssueTypesDoesNotExistErrorExitMessage
transition: NotifyFailureBackstage
- name: CreateMigrationWave
compensatedBy: reportAbort
type: operation
actions:
- functionRef:
Expand All @@ -464,7 +441,6 @@ states:
toStateData: ".createdMigrationWave"
transition: CreateJira
- name: CreateJira
compensatedBy: reportAbort
type: operation
actionMode: sequential
actions:
Expand Down Expand Up @@ -493,7 +469,6 @@ states:
toStateData: ".migrationWaveJiraTicket"
transition: CheckMandatoriesIncidentsAfterIssueCreation
- name: CheckMandatoriesIncidentsAfterIssueCreation
compensatedBy: reportAbort
type: switch
dataConditions:
- condition: .application.mandatoriesIncidents > 0
Expand Down

0 comments on commit 8204797

Please sign in to comment.