-
Notifications
You must be signed in to change notification settings - Fork 219
State machine definition validation using asl-validator #90
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
State machine definition validation using asl-validator #90
Conversation
|
Tests in Node 4.4 and 5.5 are failing however I don't think it is related to this PR (otherwise error message is not really helpful...) Stack traceLet me know if I'm wrong |
|
Thank you for sending PR @ChristopheBougere 👍 However, I'm not sure whether |
|
@horike37 Yep I first wanted to avoid the ambiguity between step function and state machine, but I think |
I found the cause. Any ideas for a workaround? |
|
@horike37 Thanks, I thought |
Sounds great 😄 |
|
@horike37 Tests are passing now :) |
|
Awesome @ChristopheBougere! Then I tested it locally but an invalid error was detected on even right setting 🤔 Any ideas why? |
|
@horike37 This looks like an incompatibility with |
|
https://github.com/svdgraaf/serverless-pseudo-parameters/blob/master/lib/index.js#L12 By the way, I think that |
|
Thank you for taking a look into it @ChristopheBougere 😄
Yup, you are right. |
|
I think this is the only way to keep the ARN validation with |
|
@ChristopheBougere now that we don't need pseudo-parameters anymore, maybe it's time to bring this back? |
|
Good catch @theburningmonk, I'll rebase and give a try soon |
|
@theburningmonk @horike37 |
Hi !
I have added a validation command for the state machine definition. All the logic is handled in asl-validator package.
It can help saving a lot of time avoiding failed deployment because of a wrong state machine definition,
You can use it like this:
sls validate-state-machines [--name <stepfunctionname>].I also plan to add it in the
deploycommand, but I'd like it to happen at the beginning (before packaging everything). Let me know what you think about it, and if you have some thoughts about when exactly running validation.Some output examples:
Valid definition
State machine does not exists
Invalid defintion (missing StartAt property)