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

Changed Retry.Multiplier, OnError.Transition, OnError.End to pointer #49

Merged
merged 2 commits into from
Aug 15, 2022
Merged

Conversation

globalflea
Copy link
Contributor

@globalflea globalflea commented Dec 21, 2021

Many thanks for submitting your Pull Request ❤️!

What this PR does / why we need it:
Changed Retry.Multiplier to pointer and changed min=1 (instead of min=0)

in the struct Retry.Multiplier which is a floatstr.Float32OrString, there's no way to distinguish this field as not defined. In the spec, this is supposed to be an optional field. The default struct of Float32OrString will be Type Float and the zero value of FloatVal will be a 0.0 - which will be value if the workflow json/yaml left this out.

Also, minimum of 0 does not make sense

Changed OnError.Transition & OnError.End to pointers for the same reason
Special notes for reviewers:

Additional information (if needed):

@globalflea globalflea changed the title Changed Multiplier to pointer Changed Retry.Multiplier, OnError.Transition, OnError.End to pointer Dec 21, 2021
Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

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

@globalflea many thanks!

Can I ask you to sign your commit and add a test case? You will find an example here: https://github.com/serverlessworkflow/sdk-go/blob/main/parser/parser_test.go

@ricardozanini ricardozanini linked an issue Dec 22, 2021 that may be closed by this pull request
@globalflea
Copy link
Contributor Author

@globalflea many thanks!

Can I ask you to sign your commit and add a test case? You will find an example here: https://github.com/serverlessworkflow/sdk-go/blob/main/parser/parser_test.go

Sure, need some time as i am not doing much during this holiday season

@ricardozanini
Copy link
Member

@globalflea, can you rebase? I'd like to include this PR in the next release.

@ricardozanini ricardozanini merged commit 8fd2e70 into serverlessworkflow:main Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retry.Multiplier - no way to know if its undefined
2 participants