Skip to content

Commit

Permalink
IWF-106: Fix typo IdReusePolicy of ALLOW_IF_PREVIOUS_EXISTS_ABNORMALLY (
Browse files Browse the repository at this point in the history
  • Loading branch information
stevo89519 authored Sep 25, 2024
1 parent 0fea84a commit 6c47f1b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion gen/iwfidl/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,8 @@ components:
type: string
IDReusePolicy:
enum:
- ALLOW_IF_PREVIOUS_EXISTS_ABNORMALLY
- ALLOW_IF_PREVIOUS_EXISTS_ABNORMALLY # Keeping typo enum for backwards compatibility
- ALLOW_IF_PREVIOUS_EXITS_ABNORMALLY
- ALLOW_IF_NO_RUNNING
- DISALLOW_REUSE
- ALLOW_TERMINATE_IF_RUNNING
Expand Down
4 changes: 3 additions & 1 deletion gen/iwfidl/docs/IDReusePolicy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

## Enum


# Keeping typo enum for backwards compatibility
* `ALLOW_IF_PREVIOUS_EXISTS_ABNORMALLY` (value: `"ALLOW_IF_PREVIOUS_EXISTS_ABNORMALLY"`)

* `ALLOW_IF_PREVIOUS_EXITS_ABNORMALLY` (value: `"ALLOW_IF_PREVIOUS_EXITS_ABNORMALLY"`)

* `ALLOW_IF_NO_RUNNING` (value: `"ALLOW_IF_NO_RUNNING"`)

* `DISALLOW_REUSE` (value: `"DISALLOW_REUSE"`)
Expand Down
6 changes: 4 additions & 2 deletions gen/iwfidl/model_id_reuse_policy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion service/common/compatibility/workflowStartOptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ func GetWorkflowIdReusePolicy(options iwfidl.WorkflowStartOptions) *iwfidl.Workf
switch newType {
case iwfidl.ALLOW_IF_NO_RUNNING:
return iwfidl.ALLOW_DUPLICATE.Ptr()
case iwfidl.ALLOW_IF_PREVIOUS_EXISTS_ABNORMALLY:
case iwfidl.ALLOW_IF_PREVIOUS_EXISTS_ABNORMALLY, iwfidl.ALLOW_IF_PREVIOUS_EXITS_ABNORMALLY:
// Keeping typo enum for backwards compatibility. Both old and corrected enums return the same result.
return iwfidl.ALLOW_DUPLICATE_FAILED_ONLY.Ptr()
case iwfidl.DISALLOW_REUSE:
return iwfidl.REJECT_DUPLICATE.Ptr()
Expand Down

0 comments on commit 6c47f1b

Please sign in to comment.