-
Notifications
You must be signed in to change notification settings - Fork 221
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
digdag should fail on multiple operators within a task #21
Comments
From how I think about the syntax, I feel multiple identical operators should also fail. Only one primary operator per task (not including the case of _check: & _error: usage, or multiple tasks within a task) |
Yeah, tricky thing is that the yaml parsing happens before validation, and at that point the parser has already discarded all preceding identical keys. |
Turns out though that the yaml parser can, at gunpoint, be persuaded into disallowing duplicate keys by injecting some validation logic. Kind of icky but it gets the job done. |
SnakeYAML should have an option that throws an exception. It's good for all users. SnakeYAML is not on github (BitBucket!) but the author is still active. |
Yeah, let's submit a SnakeYAML PR. |
I opened an issue in the SnakeYAML project to propose adding this validation to SnakeYAML itself: https://bitbucket.org/asomov/snakeyaml/issues/337/option-to-disallow-duplicate-keys Meanwhile, it seems that the very same issue has been addressed in the past by implementing a custom constructor, similarly to what my current PR does: https://jira.spring.io/browse/SPR-12318 Should we go ahead with my PR until we have managed to get unique key validation into SnakeYAML proper? |
Implement WM-1351 enhance /api/projects
I.e., the below workflow definition should fail instead of silently just executing
echo bar
.Also, it might be worth considering if multiple identical keys should fail. In the below workflow definition the second
sh>
operator implicitly overrides the first operator when the yaml is parsed because yaml.The text was updated successfully, but these errors were encountered: