gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r188832 - in /gump/live: python/gump/actor/document/xdocs/ python/gump/actor/mysql/ python/gump/actor/notify/ python/gump/actor/syndication/ python/gump/core/build/ python/gump/core/model/ python/gump/core/run/ python/gump/core/runner/ python/gump/test/resources/full1/ python/gump/util/ src/documentation/ src/documentation/content/xdocs/
Date Tue, 07 Jun 2005 17:47:26 GMT
Author: ajack
Date: Tue Jun  7 10:47:22 2005
New Revision: 188832

URL: http://svn.apache.org/viewcvs?rev=188832&view=rev
Log:
Move some experimental code from TRUNK to LIVE, since
LIVE seems 'DEAD' right now, on vmgump. Basically,
attempt to cope better with circular dependencies
and such. See if this is causing Gump to spin.


Added:
    gump/live/python/gump/test/resources/full1/module6.xml
      - copied unchanged from r179986, gump/trunk/python/gump/test/resources/full1/module6.xml
    gump/live/python/gump/test/resources/full1/module7.xml
      - copied unchanged from r179986, gump/trunk/python/gump/test/resources/full1/module7.xml
Modified:
    gump/live/python/gump/actor/document/xdocs/documenter.py
    gump/live/python/gump/actor/mysql/dynagumper.py
    gump/live/python/gump/actor/notify/notifier.py
    gump/live/python/gump/actor/syndication/syndicator.py
    gump/live/python/gump/core/build/builder.py
    gump/live/python/gump/core/model/depend.py
    gump/live/python/gump/core/model/project.py
    gump/live/python/gump/core/model/workspace.py
    gump/live/python/gump/core/run/actor.py
    gump/live/python/gump/core/runner/demand.py
    gump/live/python/gump/core/runner/runner.py
    gump/live/python/gump/test/resources/full1/profile.xml
    gump/live/python/gump/util/mysql.py
    gump/live/src/documentation/content/xdocs/index.xml
    gump/live/src/documentation/skinconf.xml

Modified: gump/live/python/gump/actor/document/xdocs/documenter.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/actor/document/xdocs/documenter.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/actor/document/xdocs/documenter.py (original)
+++ gump/live/python/gump/actor/document/xdocs/documenter.py Tue Jun  7 10:47:22 2005
@@ -81,6 +81,7 @@
         self.syncObject(module)
          
     def processProject(self,project):
+        
         verbose=self.run.getOptions().isVerbose()
         debug=self.run.getOptions().isDebug()
         self.documentProject(project,True)
@@ -808,6 +809,9 @@
         projectsTable=projectsSection.createTable(['Index','Time','Name','State','Duration\nin
state','Last Modified','Notes'])
         pcount=0
         for project in self.gumpSet.getCompletedProjects():
+                        
+            # Hack for bad data.
+            if not project.inModule(): continue
                        
             #if realTime and \
             #    (project.getState()==STATE_FAILED or \
@@ -983,6 +987,9 @@
         depOrder=createOrderedList(sortedProjectList,compareProjectsByFullDependeeCount)
   
         for project in depOrder:
+            # Hack for bad data
+            if not project.inModule(): continue
+                
             if not self.gumpSet.inProjectSequence(project): continue       
             
             if not project.getState()==STATE_FAILED:
@@ -1042,6 +1049,9 @@
                     'Dependees','Project State','Duration\nin state'])
         pcount=0
         for project in sortedProjectList:
+            # Hack for bad data
+            if not project.inModule(): continue    
+            # Filter
             if not self.gumpSet.inProjectSequence(project): continue       
             
             if not project.getState()==STATE_SUCCESS or \
@@ -1088,6 +1098,9 @@
                     'Depends','Not-Built Depends','Project State','Duration\nin state'])
         pcount=0
         for project in sortedProjectList:
+            # Hack for bad data
+            if not project.inModule(): continue    
+            # Filter    
             if not self.gumpSet.inProjectSequence(project): continue       
             
             if not project.getState()==STATE_PREREQ_FAILED:
@@ -1678,6 +1691,10 @@
     #    endXDoc(x)
         
     def documentProject(self,project,realTime=False): 
+    
+        # Hack for bad data. Gump3 won't let it get this
+        # far.
+        if not project.inModule(): return
         
         spec=self.resolver.getFileSpec(project)
         document=XDocDocument('Project : ' + project.getName(),    

Modified: gump/live/python/gump/actor/mysql/dynagumper.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/actor/mysql/dynagumper.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/actor/mysql/dynagumper.py (original)
+++ gump/live/python/gump/actor/mysql/dynagumper.py Tue Jun  7 10:47:22 2005
@@ -56,26 +56,30 @@
         
     def processOtherEvent(self,event):
         #TODO do the actual work right here...
-        self.log.warning('dynagumper.py processOtherEvent: need to implement event processing')
-                      
+        #self.log.warning('dynagumper.py processOtherEvent: need to implement event processing')
+        pass
+              
     def processWorkspace(self):
         """
         Add information about the workspace to the database.
         """
         #TODO do the actual work right here...
         #self.ensureThisHostIsInDatabase()
-        self.log.warning('dynagumper.py processWorkspace: need to implement workspace event
processing')
-    
+        #self.log.warning('dynagumper.py processWorkspace: need to implement workspace event
processing')
+        pass
+
     def processModule(self,module):    
         """
         Add information about a module to the database.
         """
         #TODO do the actual work
-        self.log.warning('dynagumper.py processModule: need to implement module event processing')
-    
+        #self.log.warning('dynagumper.py processModule: need to implement module event processing')
+        pass
+
     def processProject(self,project):    
         """
         Add information about a project to the database.
         """
         #TODO do the actual work right here...
-        self.log.warning('dynagumper.py processProject: need to implement project event processing')
+        #self.log.warning('dynagumper.py processProject: need to implement project event
processing')
+        pass

Modified: gump/live/python/gump/actor/notify/notifier.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/actor/notify/notifier.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/actor/notify/notifier.py (original)
+++ gump/live/python/gump/actor/notify/notifier.py Tue Jun  7 10:47:22 2005
@@ -97,7 +97,8 @@
         if self._hasUnwanted():
             log.info('We have some unwanted\'s to send to list...')
             
-            self.sendEmail(wsTo or self.workspace.administrator,wsFrom or self.workspace.email,
+            self.sendEmail( wsTo or self.workspace.administrator,
+                            wsFrom or self.workspace.email,
                         'BATCH: All dressed up, with nowhere to go...',
                         self._getUnwantedContent())
                         
@@ -112,7 +113,8 @@
         # Belt and braces (notify to us if not notify to them)
         if self._hasUnsent():
             log.info('We have some unsented\'s to send to list...')    
-            self.sendEmail(wsTo or self.workspace.administrator,wsFrom or self.workspace.email,
+            self.sendEmail(wsTo or self.workspace.administrator,
+                        wsFrom or self.workspace.email,
                         'BATCH: Unable to send...',
                          self._getUnsentContent())
                         

Modified: gump/live/python/gump/actor/syndication/syndicator.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/actor/syndication/syndicator.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/actor/syndication/syndicator.py (original)
+++ gump/live/python/gump/actor/syndication/syndicator.py Tue Jun  7 10:47:22 2005
@@ -63,7 +63,7 @@
     def processProject(self,project):    
         """
         Syndicate information about the project (if it needs it)
-        """
+        """                
         self.rss.syndicateProject(project)
         self.atom.syndicateProject(project)
            

Modified: gump/live/python/gump/core/build/builder.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/core/build/builder.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/core/build/builder.py (original)
+++ gump/live/python/gump/core/build/builder.py Tue Jun  7 10:47:22 2005
@@ -321,7 +321,7 @@
                         project.addError("See Directory Listing Work for Missing Outputs")
             else:
                 project.changeState(STATE_SUCCESS)
-        else:
+        elif project.inModule():
             # List source directory (when failed) in case it helps debugging...
             listDirectoryToFileHolder(project,project.getModule().getWorkingDirectory(),

                                         FILE_TYPE_SOURCE, 'list_source_'+project.getName())
          

Modified: gump/live/python/gump/core/model/depend.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/core/model/depend.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/core/model/depend.py (original)
+++ gump/live/python/gump/core/model/depend.py Tue Jun  7 10:47:22 2005
@@ -93,6 +93,7 @@
         self.optional=optional
         self.ids=ids
         self.noclasspath=noclasspath
+        self.valid=True
         if annotation:	self.addInfo(annotation)
         
     def __del__(self):
@@ -222,6 +223,12 @@
         # Which direction (to or from?)
         self.dependees=dependees
         
+    def removeDepend(self, depend):
+        # :TODO: Ought remove more (or never delete,
+        # but never let 'bad' (i.e. circular) get in
+        # here in the first place.
+        self.depends.remove(depend)
+        
     def addDepend(self, depend):
         
         #
@@ -310,6 +317,9 @@
     # 
     def addDependency(self,depend):
         self.directDependencies.addDepend(depend)
+        
+    def removeDependency(self,depend):
+        self.directDependencies.removeDepend(depend)
             
     def getDirectDependencies(self):
         return self.directDependencies.getDepends()
@@ -451,14 +461,6 @@
             if dependency.getProject().getName()==name	\
                 and not dependency.isNoClasspath() :
                 return True            
-        return False
-
-    def uponFuzzy(self):
-        """
-        At least one of these dependencies is Fuzzy...
-        """
-        for dependency in self.getFullDependencies():
-            if dependency.getProject().isFuzzy(): return True
         return False
 
     # determine if this project is a prereq of any project on the todo list

Modified: gump/live/python/gump/core/model/project.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/core/model/project.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/core/model/project.py (original)
+++ gump/live/python/gump/core/model/project.py Tue Jun  7 10:47:22 2005
@@ -342,11 +342,16 @@
         return (not self.isPackaged()) and self.hasBuilder()
         
     # provide elements when not defined in xml
-    def complete(self,workspace): 
+    def complete(self,workspace,visited=None): 
         if self.isComplete(): return
-
+        
+        if not visited:         
+            # Start with knowledge of having visited self.
+            visited = [self]
+                            
         if not self.inModule():
-            self.addWarning("Not in a module")
+            self.changeState(STATE_FAILED,REASON_CONFIG_FAILED)
+            self.addError("Not in a module")
             return
          
         # :TODO: hacky   
@@ -562,12 +567,25 @@
         [b.expand(self, workspace) for b in self.builder]
 
         if not packaged:
+            removes = []
+            
             # Complete dependencies so properties can reference the,
             # completed metadata within a dependent project
             for dependency in self.getDirectDependencies():
                 depProject=dependency.getProject()
-                if not depProject.isComplete():
-                    depProject.complete(workspace)
+                if depProject in visited:
+                    self.changeState(STATE_FAILED,REASON_CONFIG_FAILED)
+                    self.addError("Circular Dependency with %s." % \
+                            depProject.getName())
+                    removes.append(dependency)
+                else:
+                    if not depProject.isComplete():
+                        depProject.complete(workspace)
+                    visited.append(depProject)
+                        
+            # Remove circulars...
+            for dependency in removes:
+                self.removeDependency(dependency)
 
             self.buildDependenciesMap(workspace)                        
         
@@ -594,14 +612,16 @@
             # TODO -- move these back?
             #
             if badDepends or badOptions: 
-                for xmldepend in badDepends:
+                for badDep in badDepends:
+                    (xmldepend,reason) = badDep
                     self.changeState(STATE_FAILED,REASON_CONFIG_FAILED)
-                    self.addError("Bad Dependency. Project: " \
-                            + getDomAttributeValue(xmldepend,'project') + " unknown to *this*
workspace")
+                    self.addError("Bad Dependency. Project: %s : %s " \
+                            % (getDomAttributeValue(xmldepend,'project'),reason))
 
-                for xmloption in badOptions:                
-                    self.addWarning("Bad *Optional* Dependency. Project: " \
-                            + getDomAttributeValue(xmloption,'project') + " unknown to *this*
workspace")
+                for badOpt in badOptions:
+                    (xmloption,reason) = badOpt   
+                    self.addWarning("Bad *Optional* Dependency. Project: %s : %s" \
+                            % (getDomAttributeValue(xmloption,'project') , reason))
         else:
             self.addInfo("This is a packaged project, location: " + self.home)        
                                     
@@ -625,10 +645,10 @@
                     
         # Close down the DOM...
         self.shutdownDom()       
-        
-        # Done, don't redo
+    
+        # Done so don't redo
         self.setComplete(True)
-
+    
     # turn the <jvmarg> children of domchild into jvmargs
     def addJVMArgs(self,domChild):        
         for jvmarg in getDomChildIterator(domChild,'jvmarg'):
@@ -651,7 +671,7 @@
                 # Add a dependency
                 self.addDependency(dependency)
             else:
-                badDepends.append(ddom)    
+                badDepends.append((ddom,"unknown to *this* workspace"))    
                 
         # Walk the XML parts converting
         badOptions=[]
@@ -666,7 +686,7 @@
                 # Add a dependency
                 self.addDependency(dependency)                    
             else:
-                badOptions.append(odom)
+                badOptions.append((odom,"unknown to *this* workspace"))
 
         return (badDepends, badOptions)
         

Modified: gump/live/python/gump/core/model/workspace.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/core/model/workspace.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/core/model/workspace.py (original)
+++ gump/live/python/gump/core/model/workspace.py Tue Jun  7 10:47:22 2005
@@ -473,13 +473,13 @@
     def hasNotifyFromOverride(self):
         if not self.isNotify(): return False
         nag=self.getDomChild('nag')
-        return hasDomAttribute(nag,'from')
+        return hasDomAttribute(nag,'from')        
         
     def getNotifyFromOverride(self):
         if self.isNotify():
             nag=self.getDomChild('nag')
-            return getDomAttributeValue(nag,'from')
-        
+            return getDomAttributeValue(nag,'from')    
+            
     def getNotifyOverrides(self):
         
         # Nag Overrides
@@ -492,7 +492,7 @@
         if self.hasNotifyFromOverride():
             wsNotifyFromOverrideAddr=self.getNotifyFromOverride()
         
-        return ( wsNotifyToOverrideAddr, wsNotifyFromOverrideAddr)
+        return ( wsNotifyToOverrideAddr, wsNotifyFromOverrideAddr )
              
     def getVersion(self):
         if self.hasDomAttribute('version'):

Modified: gump/live/python/gump/core/run/actor.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/core/run/actor.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/core/run/actor.py (original)
+++ gump/live/python/gump/core/run/actor.py Tue Jun  7 10:47:22 2005
@@ -163,10 +163,15 @@
         is available on the sub-class (i.e. if needed)
         """
         if not hasattr(self,'processProject'): return        
-        if not callable(self.processProject):  return        
-        self.log.debug('Process Project [' + `project` + '] using [' + `self` + ']')    
   
-        self.processProject(project)
-               
+        if not callable(self.processProject):  return     
+        
+        # Hack for bad data.
+        if project.inModule():   
+        	self.log.debug('Process Project [' + `project` + '] using [' + `self` + ']')   
    
+        	self.processProject(project)
+     	else:
+            self.log.debug('Skip Project (not in module) [' + `project` + '] for [' + `self`
+ ']')        
+        	   
     def _processOtherEvent(self,event):
         """
         Call a method called 'processOtherEvent(event)', if it

Modified: gump/live/python/gump/core/runner/demand.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/core/runner/demand.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/core/runner/demand.py (original)
+++ gump/live/python/gump/core/runner/demand.py Tue Jun  7 10:47:22 2005
@@ -70,7 +70,9 @@
         """
         Wait for all workers to complete.
         """
-        self.group.waitForAll()
+        if self.group:
+            if hasattr(self.group, "waitForAll"):
+                self.group.waitForAll()
         
     def performUpdate(self,module):
         """
@@ -178,16 +180,18 @@
         # In project order...
         for project in sequence:
 
-            # Process the module, upon demand
-            module=project.getModule()
-            
             # If we want to be updating...
             if gumpOptions.isUpdate():
-                # W/ multiple project in one module, it may be done
-                if not module.isUpdated():
-                    self.log.debug('Update module *inlined* (not in background thread) '
+ `module` + '.')     
-                    inlined+=1
-                    self.performUpdate(module)
+                
+                if project.inModule():
+                    # Process the module, upon demand
+                    module=project.getModule()
+            
+                    # W/ multiple project in one module, it may be done
+                    if not module.isUpdated():
+                        self.log.debug('Update module *inlined* (not in background thread)
' + `module` + '.')     
+                        inlined+=1
+                        self.performUpdate(module)
 
             # If we want to be building...
             if gumpOptions.isBuild():

Modified: gump/live/python/gump/core/runner/runner.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/core/runner/runner.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/core/runner/runner.py (original)
+++ gump/live/python/gump/core/runner/runner.py Tue Jun  7 10:47:22 2005
@@ -216,7 +216,11 @@
         
         # Notify last
         if self.run.getOptions().isNotify() and self.run.getWorkspace().isNotify():
-            self.run.registerActor(Notifier(self.run))         
+            self.run.registerActor(Notifier(self.run))    
+        else:
+            self.log.info('Not doing notifications [%s,%s]' \
+                % (self.run.getOptions().isNotify(), \
+                    self.run.getWorkspace().isNotify() ) )
                     
                     
         # See what we have...            

Modified: gump/live/python/gump/test/resources/full1/profile.xml
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/test/resources/full1/profile.xml?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/test/resources/full1/profile.xml (original)
+++ gump/live/python/gump/test/resources/full1/profile.xml Tue Jun  7 10:47:22 2005
@@ -31,6 +31,8 @@
 
   <!-- Override package1 to be a package -->
   <project name='package1' package='package1' />
+  <!-- this is a missing package, within a missing module -->
+  <project name='package2' package='missing_package' />
   
 </profile>
 

Modified: gump/live/python/gump/util/mysql.py
URL: http://svn.apache.org/viewcvs/gump/live/python/gump/util/mysql.py?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/python/gump/util/mysql.py (original)
+++ gump/live/python/gump/util/mysql.py Tue Jun  7 10:47:22 2005
@@ -144,13 +144,14 @@
                 affected=cursor.execute(statement)
                 log.debug('SQL affected: ' + `affected`)
             
-                row = cursor.fetchall()[0] # Ought be only one...
+                if affected > 0: # might be nothing in db yet
+                    row = cursor.fetchall()[0] # Ought be only one...
           
-                # Extract values
-                for column in columns:
-                    if row.has_key(column) and row[column]:
-                        settings[column]=row[column]
-                        #print 'Extracted %s -> %s' % ( column, row[column])
+                    # Extract values
+                    for column in columns:
+                        if row.has_key(column) and row[column]:
+                            settings[column]=row[column]
+                            #print 'Extracted %s -> %s' % ( column, row[column])
                               
             except Exception, details:
                 if cursor: self.logWarnings(cursor)

Modified: gump/live/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/gump/live/src/documentation/content/xdocs/index.xml?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/src/documentation/content/xdocs/index.xml (original)
+++ gump/live/src/documentation/content/xdocs/index.xml Tue Jun  7 10:47:22 2005
@@ -120,14 +120,9 @@
         <th>Comments</th>
       </tr>
       <tr>
-        <td><fork href="http://brutus.apache.org/gump/public/">Apache (Brutus)</fork>
</td>
+        <td><fork href="http://vmgump.apache.org/gump/public/">Apache (vmgump)</fork>
</td>
         <td>1.4.2_04</td>
-        <td>Python Gump</td>
-      </tr>
-      <tr>
-        <td><fork href="http://brutus.apache.org/gump/jdk15/">Apache (Brutus)
JDK15</fork> </td>
-        <td>1.5.0-beta2</td>
-        <td>Python Gump</td>
+        <td>4 times daily</td>
       </tr>
     </table>
 

Modified: gump/live/src/documentation/skinconf.xml
URL: http://svn.apache.org/viewcvs/gump/live/src/documentation/skinconf.xml?rev=188832&r1=188831&r2=188832&view=diff
==============================================================================
--- gump/live/src/documentation/skinconf.xml (original)
+++ gump/live/src/documentation/skinconf.xml Tue Jun  7 10:47:22 2005
@@ -81,6 +81,11 @@
   Alternative static image:
   <group-logo>images/group-logo.gif</group-logo> -->
 
+  <group-name>ApacheCon</group-name>
+  <group-description>ApacheCon Europe 2005</group-description>
+  <group-url>http://apachecon.com/</group-url>
+  <group-logo>http://apache.org/images/ac2005eu_135x50.gif</group-logo>
+
   <!-- optional host logo (e.g. sourceforge logo)
        default skin: renders it at the bottom-left corner -->
   <host-url></host-url>



Mime
View raw message