Azure-pipelines-tasks: Parsing error when overriding test run parameters in Multi-agent release

Created on 27 Mar 2019  路  3Comments  路  Source: microsoft/azure-pipelines-tasks

Note

Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo

For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

If you have an issue or request for the Azure Pipelines service, use developer community instead:

https://developercommunity.visualstudio.com/spaces/21/index.html )

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: here
Visual Studio Test

list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment

  • Server - Azure Pipelines or TFS on-premises?
    Azure Pipelines

    • If using TFS on-premises, provide the version:

    • If using Azure Pipelines, provide the account name, team project name, build definition name/build number:

  • Agent - Hosted or Private:
    Hosted

    • If using Hosted agent, provide agent queue name:
      Pool:
      Hosted VS2017
      Agent: Hosted VS2017 18
    • If using private agent, provide the OS of the machine running the agent and the agent version:

Issue Description

I got an error when configuring the agent in multi-agent mode on VSTS.
I am overwriting my test arguments with values coming from keyVault.
The same task and setup works when the agent is configured with parallel being "none".
When I want to run my tests in parallel by switching the "Parallelism" to "Multi-agent", I starts to see the error below from all agents.

[Include task name(s), screenshots and any other relevant details]

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

2019-03-27T05:04:14.4883649Z ##[debug]Processed: ##vso[task.logissue type=warning;]Unable to parse the override run parameters string: -Key1 value1PlainText -Key2 value2PlainText -kEY3 * -Key4DbConnectionString -key5 **
2019-03-27T05:04:14.6537738Z ##[error]SettingsUpdation.Run : Exception occurred during the updation of run settings: System.FormatException: Error encountered while overriding test run parameters. Please check the test run parameteres provided.
[Insert error from the logs here for a quick overview]

bug route

Most helpful comment

For me that workaround of moving the "Data Source=" is not really acceptable since that connection string is also written in the web.config. For me adding quotes around the connection string parameter value has done the trick.

Thanks you @ferrydeboer this has assisted me. I was having trouble with a binary location, example: c:\Program Files (x86)\Microsoft\Edge Beta\Application\msedge.exe within Azure DevOps and adding the quotes seems to have sorted it for me:

image

All 3 comments

Turns out to be an issue parsing db connection string.
If I have "Data Source=" in the db connection string variable, and pass it as a overwritten variable, it will have this problem. It skips all the values after the space, and only "data" is overwritten to the variable value.

The workaround I had was moving "Data Source=" to the code, and only pass the part that does not have a space in the release variable.

For me that workaround of moving the "Data Source=" is not really acceptable since that connection string is also written in the web.config. For me adding quotes around the connection string parameter value has done the trick.

For me that workaround of moving the "Data Source=" is not really acceptable since that connection string is also written in the web.config. For me adding quotes around the connection string parameter value has done the trick.

Thanks you @ferrydeboer this has assisted me. I was having trouble with a binary location, example: c:\Program Files (x86)\Microsoft\Edge Beta\Application\msedge.exe within Azure DevOps and adding the quotes seems to have sorted it for me:

image

Was this page helpful?
0 / 5 - 0 ratings