tomaustin700 / YAML-Pipeline-Validator-VS-Code-Extension

Azure DevOps YAML Pipeline Validator Extension for VS Code
https://marketplace.visualstudio.com/items?itemName=TomAustin.azure-devops-yaml-pipeline-validator
2 stars 5 forks source link

Extension indicate valid yaml but it is not #6

Closed micheleissa closed 3 years ago

micheleissa commented 3 years ago

Describe the bug I'm trying to test the extension after the latest changes and intentionally have an incorrect indentation in one of script tasks in pipeline but when executing the extension via the shortcut it indicates Valid pipeline but the same pipeline on AZDO is not valid and shows the exact error line.

To Reproduce Just put an incorrect indentation in a task e.g. bash task like below

Expected behavior Minimum a generic error message or a detailed one because the API indicates the error and line number.

Screenshots Error message from AZDO image

Incorrect message from extension image

**Example yaml

- task: Bash@3
  inputs:
    targetType: 'inline'
    script: |
    echo 'Hello world'

Additional context Add any other context about the problem here.

micheleissa commented 3 years ago

@tomaustin700 thank you again for such prompt responses to the issues.

tomaustin700 commented 3 years ago

Hi @micheleissa, I'll take a look at this tomorrow. If you put the yaml into https://yamlpipelinesvalidator.dev/ does it state it's valid?

micheleissa commented 3 years ago

Hi @micheleissa, I'll take a look at this tomorrow. If you put the yaml into https://yamlpipelinesvalidator.dev/ does it state it's valid?

Unfortunately my work organization's proxy/firewall causing the site not to behave correctly so when I click validate nothing happens. I've forked the code and I see that the Valid Pipeline message shows up no matter what happens inside the call, I think the result should be inspected to check if anything comes back then based on it display the proper message.

tomaustin700 commented 3 years ago

Hi @micheleissa, I have detected an issue where if any of yamlpipelinesvalidator.builddefinitionid , yamlpipelinesvalidator.projecturl and yamlpipelinesvalidator.pat are invalid this could occur. I will patch this in the API so that it returns the correct error and add some handling to the extension that informs the user of what the problem is.

tomaustin700 commented 3 years ago

Updated API to report errors better. This seems to occur when a setting is invalid and message should now inform of that.