grundic / teamcity-web-parameters

Teamcity plugin that provides dynamic parameters for builds from web service
MIT License
44 stars 16 forks source link

v1.6.1 causes scheduled trigger builds to fail to start #12

Closed westshawn closed 8 years ago

westshawn commented 8 years ago

parameter definition:

webPopulatedSelect display='prompt' format='json' url='http://path/to/my/data'

stacktrace from teamcity-server.log:

[2016-11-07 14:06:12,356]  ERROR -   jetbrains.buildServer.SERVER - Error while creating an AgentBuild 
java.lang.NullPointerException
 at java.net.URI$Parser.parse(URI.java:3042)
 at java.net.URI.<init>(URI.java:588)
 at java.net.URI.create(URI.java:850)
 at org.apache.http.client.methods.HttpGet.<init>(HttpGet.java:69)
 at ru.mail.teamcity.web.parameters.manager.WebOptionsManagerImpl.getRequest(WebOptionsManagerImpl.java:99)
 at ru.mail.teamcity.web.parameters.manager.WebOptionsManagerImpl.read(WebOptionsManagerImpl.java:48)
 at ru.mail.teamcity.web.parameters.build.DynamicWebBuildStartContextProcessor.updateParameters(DynamicWebBuildStartContextProcessor.java:48)
 at jetbrains.buildServer.serverSide.impl.RunningBuildImpl.prepareRunners(RunningBuildImpl.java:69)
 at jetbrains.buildServer.serverSide.impl.RunningBuildImpl.createAgentBuild(RunningBuildImpl.java:437)
 at jetbrains.buildServer.serverSide.impl.BuildStarter$1.run(BuildStarter.java:26)
 at jetbrains.buildServer.serverSide.impl.BuildStarter$2$1.run(BuildStarter.java:1)
 at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:74)
 at jetbrains.buildServer.serverSide.impl.BuildStarter$2.run(BuildStarter.java:1)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)

I rolled-back to v1.4 and the scheduled triggers work fine.

grundic commented 8 years ago

Ooups... Thank you for bug report! Will have a look.

grundic commented 8 years ago

@westshawn, thank you for your bug report! My bad.. I've fixed that in v1.6.2. Please give it a try. There was one more addition in this version: now scheduled builds would be checked for possible errors and if any found build would be cancelled. This is new behaviour, but this should add more visibility to existing configuration if there are some problems.

Please let me know if that helped.

westshawn commented 8 years ago

Spasibo @grundic! 1.6.2 works with scheduled triggers.