huserben / TfsExtensions

Extensions for TFS 2015+ such as custom Widgets (require TFS 2017) and Build Tasks
MIT License
44 stars 22 forks source link

TriggerBuild@3 suddenly fails on Error message: Error: Could not queue the build because there were validation errors or warnings. #227

Closed Sageatahan closed 1 year ago

Sageatahan commented 1 year ago

The task has worked very well for over a year suddenly I am receiving Error message: Error: Could not queue the build because there were validation errors or warnings. i have the below setting for the task. which should not cause the issue. authenticationMethod: 'OAuth Token' password: '$(System.AccessToken)' please help

huserben commented 1 year ago

Hi @Sageatahan

can you post some details from your configuration (or the exactly yaml if you have it)? Did anything change in the build that is being triggered? Are you using variables that you set via the trigger build task?

venkatest commented 1 year ago

we have the same problem in our pipelines. we are calling a pipeline with a parameters example "target_env:test". it was working fine till last week and now it is failing wit the error: Could not queue the build because there were validation errors or warnings.. (Note: we checked the PAT token and it is valid also the target pipeline is not changed)

We create a dummy pipelines and it works without build parameters and failing with build parameters. we are using the Version : 4.1.1. it worked in version 4.1.0

Could you please fix it ?

huserben commented 1 year ago

Hi @venkatest

have you made sure that you've set the variables on the triggered build as "overridable" by users?

image

The error "Could not queue the build because there were validation errors or warnings" is coming from the API and not from the task, so it means there seems to be a generic problem. I believe Microsoft might have changed something with the variables and I've seen that you must set the variables as "overridable" that it does not give you a validation error...

Could you try that? I have not changed any code of the task so I believe it's an environment problem rather than one with the task itself.

venkatest commented 1 year ago

@huserben : We were using variables declared in the pipeline and it was possible to override it. also we were passing variable which was not known to the target pipeline and it worked. like you mentioned/guessed something changed by Microsoft, it started failing.

We added those variable as pipeline variable in UI and set the override option, it works now. we will continue using it like this.

thanks for your help.

huserben commented 1 year ago

Thanks for checking & confirming @venkatest

@Sageatahan does the same apply to you? Would you be able to check and see if you can fix your issue the same way?

huserben commented 1 year ago

Closed due to inactivity