service.cgi: script generation

Dimitrie O. Paun dimi at intelliware.ca
Mon Apr 26 11:17:42 CDT 2004


Currenly we send a script to run and execute all published
versions that we have. This is currently problematic, because
an error in one causes the abort the entire script. Moreover,
releases may no arrive at the server at the same time, and
if we're going to receive the poll event in between them,
we'll miss some of them. 

What we need to do is to ask the client to execute one thing
at a time. Problem is that we need to keep track of what the
client did execute already. Here's a way to do it without
storing state on the server side, which is problematic.

We need to introduce three new cookies:

   build_id: the current build ID that we execute.
             It's going to be something like '200405031000'
   current: the name of the test that was just executed
   history: a comma separated list of filenames that
            where already executed by the client for this
            current build. It's going to look like so:
            'wine-200405031000-paul-mingw.zip,wine-200405031000-kevin-mingw.zip'

The algorithm is simple:

  if $build_id != $current_build_id 
	$build_id = $current_build_id
	$history = ""
  else
	$history = $history . "," . $current
  
  $current = pick_next_test($history)

  # send script to run $current, and to set the values of the
  # three cookies to the values in our variables 

where:
  pick_next_test picks the next test to run from the pool of
                 tests avaiable for our current build, so that
                 it doesn't appear in $history

Comments?

-- 
Dimi.






More information about the wine-devel mailing list