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

Workflow validations #156

Merged
merged 8 commits into from
Mar 13, 2023
Merged

Workflow validations #156

merged 8 commits into from
Mar 13, 2023

Conversation

ribeiromiranda
Copy link
Collaborator

Workflow parameters validations

Issue: #153

model/workflow.go Outdated Show resolved Hide resolved
parser/parser_test.go Outdated Show resolved Hide resolved
model/states.go Show resolved Hide resolved
@ricardozanini
Copy link
Member

@ribeiromiranda I need you to sign the DCO and your commits. Many thanks for this! I'll review it later.

@ribeiromiranda ribeiromiranda force-pushed the validators branch 2 times, most recently from b22bdad to 7b4c2e2 Compare March 9, 2023 11:15
model/states.go Outdated Show resolved Hide resolved
parser/parser_test.go Outdated Show resolved Hide resolved
workflow parameters validations:
* id and key: add required_without
* start: required, create a custom validator to check if state exists on the workflow states

Others:
* Workflow.Start: if the start is not defined, use the first workflow state
* State.UnmarshalJSON: removed return from switch not need
* State.UnmarshalJSON: when state type is nil return a error message

Signed-off-by: André R. de Miranda <andre@galgo.tech>
Signed-off-by: André R. de Miranda <andre@galgo.tech>
Signed-off-by: André R. de Miranda <andre@galgo.tech>
…rom parser/parser_test.go

Signed-off-by: André R. de Miranda <andre@galgo.tech>
@ricardozanini
Copy link
Member

@ribeiromiranda can u take a look at the CI errors?

model/states.go Outdated Show resolved Hide resolved
… and "end" validator: add to BaseState; fix failed unit tests; refactor SwitchState validator.

Signed-off-by: André R. de Miranda <andre@galgo.tech>
Signed-off-by: André R. de Miranda <andre@galgo.tech>
…equired in the `Transition` struct field.

Signed-off-by: André R. de Miranda <andre@galgo.tech>
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.

Just a few non-blocking comments. Well done!!

model/util_validator.go Outdated Show resolved Hide resolved
model/delay_state_test.go Show resolved Hide resolved
Signed-off-by: André R. de Miranda <andre@galgo.tech>
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.

@spolti wanna take a final look at it?

@ribeiromiranda
Copy link
Collaborator Author

@spolti wanna take a final look at it?

Yes

@spolti
Copy link
Member

spolti commented Mar 13, 2023

Many thanks @ribeiromiranda.

@spolti spolti merged commit 6a4e16c into serverlessworkflow:main Mar 13, 2023
@ribeiromiranda ribeiromiranda deleted the validators branch May 4, 2023 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants