johanclasson / vso-agent-tasks

Build and Release Tasks for Visual Studio Online and Team Foundation Server
MIT License
20 stars 16 forks source link

Support execution timeout #48

Closed uchitha closed 5 years ago

uchitha commented 5 years ago

DB up migrations by default run with a 30 second timeout. This might not be sufficient sometimes. However db up API provides a nice way to configure this.

var upgrader = DeployChanges.To.SqlDatabase(connectionString) .WithExecutionTimeout(TimeSpan.FromSeconds(180)).Build();

Would be useful to surface this up as a setting on the task.

Thank You.

johanclasson commented 5 years ago

I have used an (older) feature to dissable timout, and you can use the Timeout under Control Options for making the task time out.

I am closing this issue. Please reopen if your intended use case is different.

snavarropino commented 4 years ago

Hi, I am also suffering the timeout. Sometimes my scripts need more than 30 seconds to finish. @johanclasson you said: "I have used an (older) feature to disable timout". Is it released?

If I have understood well, the dbup task will not finish by timeout anymore. Am I wrong?

thanks!

johanclasson commented 4 years ago

DbUp will not timeout, see this line for how it is implemented.

My guess is that you might be suffering from that something else times out. Have you set a timeout on the Control Options -> Timeout?

johanclasson commented 4 years ago

To verify, I just ran this SQL-file against a Azure SQL DB using version 2.1.4 of the task, and it did not timeout.

snavarropino commented 4 years ago

Thanks! Let me check whether I am using the proper task version

snavarropino commented 4 years ago

Yes, I was using task v1. Now with v2 its working fine, sorry for the incovenience

johanclasson commented 4 years ago

Nice! Hopefully this can help someone else. I am glad I could be of help!