Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

How to fail the step whenever there is a validation error #2

Closed
raflyalk opened this issue Oct 26, 2021 · 0 comments · Fixed by #3
Closed

How to fail the step whenever there is a validation error #2

raflyalk opened this issue Oct 26, 2021 · 0 comments · Fixed by #3

Comments

@raflyalk
Copy link
Contributor

raflyalk commented Oct 26, 2021

Hi there,
I'm making a CI workflow where there is an ADF validation involved. So, suppose that there is a validation error like so:

Execution failed with exit code: 255
(Use `node --trace-uncaught ...` to show where the exception was thrown)
 ERROR === CmdApiApp: Resource 'A' has the following validation error: Execute Pipeline activity 'X' Pipeline is required.
 ERROR === CmdApiApp: Resource 'B' has the following validation error: Execute Pipeline activity 'Y' Pipeline is required.

Go to:
https://adf.azure.com/authoring?factory=/subscriptions/XXX/resourcegroups/YYY/providers/Microsoft.DataFactory/factories/ZZZ
to fix the validation errors.

=====ERROR=====
Error: Command failed: node  /github/workspace/adf/downloads/main.js validate /github/workspace/adf /subscriptions/XXX/resourceGroups/YYY/Microsoft.DataFactory/factories/ZZZ

Execution finished....
Validation completed.

How can we make that the Step fails whenever there is a validation error? Because, so far when I got the error message like above, the step remains successful
image
When I print out the outcome of the step with echo ${{ steps.validate_adf.outcome }}, this prints out 'success'
image

I'd like to know whether this is an expected behavior and how can I achieve such objective with this Action

Thank you!

cc @fedeoliv @microsoftopensource

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant