Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Configuration Schedule Unexpectedly Stops Running #3940

tsliwkanich-dev ·

The short version of what is happening is that a configuration schedule eventually stops running even though the UI reports it as unpaused. I say "stops running" because when I inspect the server log the "checking build condition on node..." log chunk stops appearing. The behavior is inconsistent: for some amount of time the schedule will appear in the server log, trigger builds (if the condition passes), and return to the schedule.

My build condition on the configuration is the following

groovy:

def repo = vars.getValue('scheduleRepository');
def configName = configuration.getName();
def isChanged = repositories.get(repo).isChanged();
if (isChanged)
    logger.info('Schedule repository "' + repo + '" is changed... [' +configName+']');
else
    logger.info('Schedule repository "' + repo + '" has NOT changed... ['+configName+']');

return isChanged;

The schedule is a periodic schedule that runs every 60s. This configuration steps will snapshot the 'scheduleRepository', pause the schedule, promote the actual build, and the actual build will then unpause the configuration after completing.

Could you possibly explain under what conditions a message like the following appears in the server log

2018-04-17 10:16:32,313 [pool-1-thread-13715] INFO  com.pmease.quickbuild.DefaultBuildEngine - Processing build request (configuration:root/Whatever, request id:<id>)

or does not appear? It would seem that something other than simply the "pause/unpause" state of the schedule is determining whether it will be evaluated?

We are running quickbuild 7.0.13. Happy to provide more information if you need it. Hopefully I am missing something obvious here...

  • replies 4
  • views 1323
  • stars 1
robinshen ADMIN ·

This message will be logged if build of a configuration is requested (either manually or scheduled), and QB determines to push the build request into build request queue for processing. A build request may not be put into queue due to below reasons:

  1. There are looped triggering of same configuration during a single build request chain
  2. The build request is identical to other build requests in queue. QB considers request being identical if they triggers the same configuration with same variable values
  3. The pre-queue script returns false or there are errors when evaluating the script.

In all of these cases, QB will print appropriate messages in server log around the scheduled time.

tsliwkanich-dev ·

Thanks for the prompt reply.

Could you be more specific on what I should see when "A build request may not be put into queue ...". Should I expect to see a "Processing build request..." message and then some kind of warning/error?

To respond to your specific points:

  1. Once the configuration is confirmed to be built the schedule is paused. The only element triggering the configuration is the schedule.
  2. Because of (1) we only have a single instance of a configuration in the build queue at one time (I am not manually triggering these configurations currently)
  3. We do not have a pre-queue script defined

I left my configurations running overnight to see what would happen. I have (again) downloaded the server logs and I do not see any messages that refer to even partial paths of the configurations in question. The UI shows the schedules for said configurations as unpaused.

This is the third time the configurations have arrived to this state. Previously, I manually paused+unpaused the schedules for the configurations and I would start seeing "Processing build request..." again, at least for a time.

robinshen ADMIN ·

It is not suggested to pause/unpause configuration during a build as at end of build QB will also write configuration data, and this may cause race conditions with your configuration save (to pause/unpause configuration). If you do not want another build to occur while current build is running, just modify the pre-queue script to do below:

groovy:
return system.buildEngine.getBuildRequests(configuration.id).isEmpty()

This tells QB to only queue builds if the queue does not have another build of the same configuration.

tsliwkanich-dev ·

Hi Robin,

Thanks for the reply. I've switched my builds to check the request count instead. Things are looking good so far!