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

Template workflows not failing when issue validation is failing #144

Open
npalm opened this issue Sep 14, 2022 · 1 comment
Open

Template workflows not failing when issue validation is failing #144

npalm opened this issue Sep 14, 2022 · 1 comment

Comments

@npalm
Copy link
Contributor

npalm commented Sep 14, 2022

Describe the bug

When the issue is not validated correct by the action, thw workflow still continues and tries to process all the steps.

To Reproduce

Setup the repo as described

  1. Create ticket without ticket field, or a typo in the target org
  2. Submit issue, and wacht the promotion workflow
  3. Validation step is marked ok, details will contain errors.

Expected behavior

Should the validate not error the worklfow in case of a failure?

@stebje
Copy link
Contributor

stebje commented Sep 20, 2022

Hi @npalm, agreed: if there's an error in a step then we should set an error message using core.setFailed. The workflow step can then still be allowed to continue if the user wants that using continue-on-error: true if needed.

Right now it seems that the cli only validates that the input parameters are present, not that they are valid.

Three options as I see it:

  1. Validate the integrity of the parsed issue data during parsing
  2. Add additional logic to the executor
  3. Implement separate class or module for validation that is called by either the executor or parse action

I'd be in favour of adding this logic independently from the issue-parser, as it makes sense to validate the data as early as possible also if the cli tool is used standalone.

Thoughts? 💡

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

No branches or pull requests

2 participants