You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, CLI allows duplicated names but "sees" only last one (it is listed by bitrise workflows and run by bitrise run).
Triggers validation is already there (e.g. error is thrown immediately if non-existent workflow is triggered), so it seems that workflow names can also be validated.
The text was updated successfully, but these errors were encountered:
This is unfortunately due to how the YAML lib works. We don't get any errors or indication, only a hash, and as a hash can contain a key at a level only once one of those workflows are just lost before the CLI gets the data (hash).
I think a regex based workaround could be applied, but I don't think we'll have the time in the near future. If anyone wants to send a PR we'd be glad to review it!
OK, indeed it seems that YAML parser should be responsible for validating this.
There are even (at least) 2 open PRs for that: go-yaml/yaml#248 and go-yaml/yaml#186
Moreover according to this issue: go-yaml/yaml#154 current behavior is invalid and first (not last) mapping should be chosen.
current behavior is invalid and first (not last) mapping should be chosen.
to be honest I don't think it should drop either, or at least it should definitely return an error so that the caller side (e.g. our CLI) can decide whether it's a critical issue (we definitely would consider this an error / validation fail)
Inspired by bitrise-io/bitrise-workflow-editor#172 and bitrise-io/bitrise-workflow-editor#173 (comment).
Currently, CLI allows duplicated names but "sees" only last one (it is listed by
bitrise workflows
and run bybitrise run
).Triggers validation is already there (e.g. error is thrown immediately if non-existent workflow is triggered), so it seems that workflow names can also be validated.
The text was updated successfully, but these errors were encountered: