Ganga Framework Migration

This page contains the information for Ganga developers what to do to migrate their code.

Migration for Ganga-4.2.0-beta4

Summary of changes

See Localhost and Executable handlers for an example!

Changes affecting backend handlers: Finite state machine (job status) introduced. Subjobs will have the short identifiers (so 0,1,2,3) and each subjob will have its own input and output directly inside the master job directory tree.

Changes affecting all handlers: Default values of properties should be assigned by defvalue in the schema and not explicitly in the getConfig('XXX_Properties') - this configuration unit will be created automatically. Additionally a check for None default values of SimpleItems will be done by the testing framework in the future. See changes in the Executable handler.

Changes related to job status

  • it is not possible to set the job.status directly, use job.updateStatus() instead
  • there is an additional 'completing' state which should be used by these backends which need to retrieve the output (e.g. LCG, DIRAC) the code should look like this:
        job.updateStatus('completing')
        retrieve the output
        job.updateStatus('completed')
        
  • the transition into 'completed' will activate the postprocessing hook automatically
    • remove the following lines:
     if j.outputdata:
      j.outputdata.fill()

Changes related to file workspace

  • to make your migration easier please remove any lines like this:
from Ganga.Core import FileWorkspace
  • the jobid argument in the backend.submit() will be removed
  • you should use:
        job = self.getJobObject()
        inw = job.getInputWorkspace()
        outw = job.getOutputWorkspace()
instead of:
        inw = FileWorkspace.InputWorkspace()
        outw = FileWorkspace.OutputWorkspace()
        inw.create(jobid)
        outw.create(jobid)
  • the jobid argument will be also removed from kill() and preparejob() methods
  • _getJobObject() was renamed to getJobObject()

Pending issues

  • Job.commit(): #FIXME: commiting only the subjob -> should foresee this possibility in JobRepository interface

-- JakubMoscicki - 27 Jul 2006

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2006-07-28 - JakubMoscicki
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    ArdaGrid All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback