reqmgr2 2.3.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- PSetTweaks/PSetTweak.py +449 -0
- PSetTweaks/WMTweak.py +621 -0
- PSetTweaks/__init__.py +3 -0
- Utils/CPMetrics.py +270 -0
- Utils/CertTools.py +62 -0
- Utils/EmailAlert.py +50 -0
- Utils/ExtendedUnitTestCase.py +62 -0
- Utils/FileTools.py +182 -0
- Utils/IteratorTools.py +80 -0
- Utils/MathUtils.py +31 -0
- Utils/MemoryCache.py +119 -0
- Utils/Patterns.py +24 -0
- Utils/Pipeline.py +137 -0
- Utils/PortForward.py +97 -0
- Utils/ProcessStats.py +103 -0
- Utils/PythonVersion.py +17 -0
- Utils/Signals.py +36 -0
- Utils/TemporaryEnvironment.py +27 -0
- Utils/Throttled.py +227 -0
- Utils/Timers.py +130 -0
- Utils/Timestamps.py +86 -0
- Utils/TokenManager.py +143 -0
- Utils/Tracing.py +60 -0
- Utils/TwPrint.py +98 -0
- Utils/Utilities.py +308 -0
- Utils/__init__.py +11 -0
- WMCore/ACDC/Collection.py +57 -0
- WMCore/ACDC/CollectionTypes.py +12 -0
- WMCore/ACDC/CouchCollection.py +67 -0
- WMCore/ACDC/CouchFileset.py +238 -0
- WMCore/ACDC/CouchService.py +73 -0
- WMCore/ACDC/DataCollectionService.py +485 -0
- WMCore/ACDC/Fileset.py +94 -0
- WMCore/ACDC/__init__.py +11 -0
- WMCore/Algorithms/Alarm.py +39 -0
- WMCore/Algorithms/MathAlgos.py +274 -0
- WMCore/Algorithms/MiscAlgos.py +67 -0
- WMCore/Algorithms/ParseXMLFile.py +115 -0
- WMCore/Algorithms/Permissions.py +27 -0
- WMCore/Algorithms/Singleton.py +58 -0
- WMCore/Algorithms/SubprocessAlgos.py +129 -0
- WMCore/Algorithms/__init__.py +7 -0
- WMCore/Cache/GenericDataCache.py +98 -0
- WMCore/Cache/WMConfigCache.py +572 -0
- WMCore/Cache/__init__.py +0 -0
- WMCore/Configuration.py +651 -0
- WMCore/DAOFactory.py +47 -0
- WMCore/DataStructs/File.py +177 -0
- WMCore/DataStructs/Fileset.py +140 -0
- WMCore/DataStructs/Job.py +182 -0
- WMCore/DataStructs/JobGroup.py +142 -0
- WMCore/DataStructs/JobPackage.py +49 -0
- WMCore/DataStructs/LumiList.py +734 -0
- WMCore/DataStructs/Mask.py +219 -0
- WMCore/DataStructs/MathStructs/ContinuousSummaryHistogram.py +197 -0
- WMCore/DataStructs/MathStructs/DiscreteSummaryHistogram.py +92 -0
- WMCore/DataStructs/MathStructs/SummaryHistogram.py +117 -0
- WMCore/DataStructs/MathStructs/__init__.py +0 -0
- WMCore/DataStructs/Pickleable.py +24 -0
- WMCore/DataStructs/Run.py +256 -0
- WMCore/DataStructs/Subscription.py +175 -0
- WMCore/DataStructs/WMObject.py +47 -0
- WMCore/DataStructs/WorkUnit.py +112 -0
- WMCore/DataStructs/Workflow.py +60 -0
- WMCore/DataStructs/__init__.py +8 -0
- WMCore/Database/CMSCouch.py +1349 -0
- WMCore/Database/ConfigDBMap.py +29 -0
- WMCore/Database/CouchUtils.py +118 -0
- WMCore/Database/DBCore.py +198 -0
- WMCore/Database/DBCreator.py +113 -0
- WMCore/Database/DBExceptionHandler.py +57 -0
- WMCore/Database/DBFactory.py +110 -0
- WMCore/Database/DBFormatter.py +177 -0
- WMCore/Database/Dialects.py +13 -0
- WMCore/Database/ExecuteDAO.py +327 -0
- WMCore/Database/MongoDB.py +241 -0
- WMCore/Database/MySQL/Destroy.py +42 -0
- WMCore/Database/MySQL/ListUserContent.py +20 -0
- WMCore/Database/MySQL/__init__.py +9 -0
- WMCore/Database/MySQLCore.py +132 -0
- WMCore/Database/Oracle/Destroy.py +56 -0
- WMCore/Database/Oracle/ListUserContent.py +19 -0
- WMCore/Database/Oracle/__init__.py +9 -0
- WMCore/Database/ResultSet.py +44 -0
- WMCore/Database/Transaction.py +91 -0
- WMCore/Database/__init__.py +9 -0
- WMCore/Database/ipy_profile_couch.py +438 -0
- WMCore/FwkJobReport/FileInfo.py +131 -0
- WMCore/FwkJobReport/Report.py +1646 -0
- WMCore/FwkJobReport/ReportEmu.py +122 -0
- WMCore/FwkJobReport/XMLParser.py +606 -0
- WMCore/FwkJobReport/__init__.py +15 -0
- WMCore/GroupUser/CouchObject.py +127 -0
- WMCore/GroupUser/Decorators.py +51 -0
- WMCore/GroupUser/Group.py +33 -0
- WMCore/GroupUser/Interface.py +73 -0
- WMCore/GroupUser/User.py +96 -0
- WMCore/GroupUser/__init__.py +11 -0
- WMCore/Lexicon.py +836 -0
- WMCore/REST/Auth.py +202 -0
- WMCore/REST/CherryPyPeriodicTask.py +166 -0
- WMCore/REST/Error.py +333 -0
- WMCore/REST/Format.py +642 -0
- WMCore/REST/HeartbeatMonitorBase.py +90 -0
- WMCore/REST/Main.py +623 -0
- WMCore/REST/Server.py +2435 -0
- WMCore/REST/Services.py +24 -0
- WMCore/REST/Test.py +120 -0
- WMCore/REST/Tools.py +38 -0
- WMCore/REST/Validation.py +250 -0
- WMCore/REST/__init__.py +1 -0
- WMCore/ReqMgr/CherryPyThreads/AuxCacheUpdateTasks.py +31 -0
- WMCore/ReqMgr/CherryPyThreads/BuildParentLock.py +116 -0
- WMCore/ReqMgr/CherryPyThreads/CouchDBCleanup.py +110 -0
- WMCore/ReqMgr/CherryPyThreads/HeartbeatMonitor.py +154 -0
- WMCore/ReqMgr/CherryPyThreads/StatusChangeTasks.py +131 -0
- WMCore/ReqMgr/CherryPyThreads/StepChainParentageFixTask.py +104 -0
- WMCore/ReqMgr/CherryPyThreads/__init__.py +0 -0
- WMCore/ReqMgr/DataStructs/AuthzByStatus.py +113 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/CAMPAIGN_CONFIG.py +116 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/DAS_RESULT_FILTER.py +3 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/EDITABLE_SPLITTING_PARAM_CONFIG.py +42 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/UNIFIED_CONFIG.py +240 -0
- WMCore/ReqMgr/DataStructs/DefaultConfig/__init__.py +0 -0
- WMCore/ReqMgr/DataStructs/ReqMgrConfigDataCache.py +65 -0
- WMCore/ReqMgr/DataStructs/Request.py +293 -0
- WMCore/ReqMgr/DataStructs/RequestError.py +21 -0
- WMCore/ReqMgr/DataStructs/RequestStatus.py +209 -0
- WMCore/ReqMgr/DataStructs/RequestType.py +13 -0
- WMCore/ReqMgr/DataStructs/__init__.py +0 -0
- WMCore/ReqMgr/ReqMgrCouch.py +74 -0
- WMCore/ReqMgr/Service/Auxiliary.py +319 -0
- WMCore/ReqMgr/Service/RegExp.py +16 -0
- WMCore/ReqMgr/Service/Request.py +681 -0
- WMCore/ReqMgr/Service/RequestAdditionalInfo.py +317 -0
- WMCore/ReqMgr/Service/RestApiHub.py +68 -0
- WMCore/ReqMgr/Service/WMStatsInfo.py +46 -0
- WMCore/ReqMgr/Service/__init__.py +0 -0
- WMCore/ReqMgr/Tools/__init__.py +0 -0
- WMCore/ReqMgr/Tools/cms.py +243 -0
- WMCore/ReqMgr/Utils/AuxValidation.py +53 -0
- WMCore/ReqMgr/Utils/Validation.py +341 -0
- WMCore/ReqMgr/Utils/__init__.py +0 -0
- WMCore/ReqMgr/Web/ReqMgrService.py +780 -0
- WMCore/ReqMgr/Web/__init__.py +0 -0
- WMCore/ReqMgr/Web/tools.py +211 -0
- WMCore/ReqMgr/Web/utils.py +291 -0
- WMCore/ReqMgr/WebGui/FrontPage.py +38 -0
- WMCore/ReqMgr/WebGui/__init__.py +0 -0
- WMCore/ReqMgr/__init__.py +1 -0
- WMCore/Services/AlertManager/AlertManagerAPI.py +111 -0
- WMCore/Services/AlertManager/__init__.py +0 -0
- WMCore/Services/CRIC/CRIC.py +238 -0
- WMCore/Services/CRIC/__init__.py +0 -0
- WMCore/Services/DBS/DBS3Reader.py +1044 -0
- WMCore/Services/DBS/DBSConcurrency.py +44 -0
- WMCore/Services/DBS/DBSErrors.py +113 -0
- WMCore/Services/DBS/DBSReader.py +23 -0
- WMCore/Services/DBS/DBSUtils.py +139 -0
- WMCore/Services/DBS/DBSWriterObjects.py +381 -0
- WMCore/Services/DBS/ProdException.py +133 -0
- WMCore/Services/DBS/__init__.py +8 -0
- WMCore/Services/FWJRDB/FWJRDBAPI.py +118 -0
- WMCore/Services/FWJRDB/__init__.py +0 -0
- WMCore/Services/HTTPS/HTTPSAuthHandler.py +66 -0
- WMCore/Services/HTTPS/__init__.py +0 -0
- WMCore/Services/LogDB/LogDB.py +201 -0
- WMCore/Services/LogDB/LogDBBackend.py +191 -0
- WMCore/Services/LogDB/LogDBExceptions.py +11 -0
- WMCore/Services/LogDB/LogDBReport.py +85 -0
- WMCore/Services/LogDB/__init__.py +0 -0
- WMCore/Services/MSPileup/__init__.py +0 -0
- WMCore/Services/MSUtils/MSUtils.py +54 -0
- WMCore/Services/MSUtils/__init__.py +0 -0
- WMCore/Services/McM/McM.py +173 -0
- WMCore/Services/McM/__init__.py +8 -0
- WMCore/Services/MonIT/Grafana.py +133 -0
- WMCore/Services/MonIT/__init__.py +0 -0
- WMCore/Services/PyCondor/PyCondorAPI.py +154 -0
- WMCore/Services/PyCondor/PyCondorUtils.py +105 -0
- WMCore/Services/PyCondor/__init__.py +0 -0
- WMCore/Services/ReqMgr/ReqMgr.py +261 -0
- WMCore/Services/ReqMgr/__init__.py +0 -0
- WMCore/Services/ReqMgrAux/ReqMgrAux.py +419 -0
- WMCore/Services/ReqMgrAux/__init__.py +0 -0
- WMCore/Services/RequestDB/RequestDBReader.py +267 -0
- WMCore/Services/RequestDB/RequestDBWriter.py +39 -0
- WMCore/Services/RequestDB/__init__.py +0 -0
- WMCore/Services/Requests.py +624 -0
- WMCore/Services/Rucio/Rucio.py +1287 -0
- WMCore/Services/Rucio/RucioUtils.py +74 -0
- WMCore/Services/Rucio/__init__.py +0 -0
- WMCore/Services/RucioConMon/RucioConMon.py +128 -0
- WMCore/Services/RucioConMon/__init__.py +0 -0
- WMCore/Services/Service.py +400 -0
- WMCore/Services/StompAMQ/__init__.py +0 -0
- WMCore/Services/TagCollector/TagCollector.py +155 -0
- WMCore/Services/TagCollector/XMLUtils.py +98 -0
- WMCore/Services/TagCollector/__init__.py +0 -0
- WMCore/Services/UUIDLib.py +13 -0
- WMCore/Services/UserFileCache/UserFileCache.py +160 -0
- WMCore/Services/UserFileCache/__init__.py +8 -0
- WMCore/Services/WMAgent/WMAgent.py +63 -0
- WMCore/Services/WMAgent/__init__.py +0 -0
- WMCore/Services/WMArchive/CMSSWMetrics.py +526 -0
- WMCore/Services/WMArchive/DataMap.py +463 -0
- WMCore/Services/WMArchive/WMArchive.py +33 -0
- WMCore/Services/WMArchive/__init__.py +0 -0
- WMCore/Services/WMBS/WMBS.py +97 -0
- WMCore/Services/WMBS/__init__.py +0 -0
- WMCore/Services/WMStats/DataStruct/RequestInfoCollection.py +300 -0
- WMCore/Services/WMStats/DataStruct/__init__.py +0 -0
- WMCore/Services/WMStats/WMStatsPycurl.py +145 -0
- WMCore/Services/WMStats/WMStatsReader.py +445 -0
- WMCore/Services/WMStats/WMStatsWriter.py +273 -0
- WMCore/Services/WMStats/__init__.py +0 -0
- WMCore/Services/WMStatsServer/WMStatsServer.py +134 -0
- WMCore/Services/WMStatsServer/__init__.py +0 -0
- WMCore/Services/WorkQueue/WorkQueue.py +492 -0
- WMCore/Services/WorkQueue/__init__.py +0 -0
- WMCore/Services/__init__.py +8 -0
- WMCore/Services/pycurl_manager.py +574 -0
- WMCore/Storage/Backends/AWSS3Impl.py +110 -0
- WMCore/Storage/Backends/CPImpl.py +125 -0
- WMCore/Storage/Backends/FNALImpl.py +229 -0
- WMCore/Storage/Backends/GFAL2Impl.py +260 -0
- WMCore/Storage/Backends/LCGImpl.py +236 -0
- WMCore/Storage/Backends/SRMV2Impl.py +248 -0
- WMCore/Storage/Backends/TestFallbackToOldBackend.py +130 -0
- WMCore/Storage/Backends/UnittestImpl.py +188 -0
- WMCore/Storage/Backends/VandyImpl.py +110 -0
- WMCore/Storage/Backends/XRDCPImpl.py +314 -0
- WMCore/Storage/Backends/__init__.py +29 -0
- WMCore/Storage/DeleteMgr.py +255 -0
- WMCore/Storage/Execute.py +82 -0
- WMCore/Storage/FileManager.py +448 -0
- WMCore/Storage/Plugins/CPImpl.py +45 -0
- WMCore/Storage/Plugins/Examples/SRMV2Impl.py +188 -0
- WMCore/Storage/Plugins/Examples/XRDCPImpl.py +64 -0
- WMCore/Storage/Plugins/Examples/__init__.py +1 -0
- WMCore/Storage/Plugins/FNALImpl.py +329 -0
- WMCore/Storage/Plugins/GFAL2Impl.py +84 -0
- WMCore/Storage/Plugins/LCGImpl.py +91 -0
- WMCore/Storage/Plugins/TestFailImpl.py +33 -0
- WMCore/Storage/Plugins/TestLocalCopyImpl.py +48 -0
- WMCore/Storage/Plugins/TestWinImpl.py +28 -0
- WMCore/Storage/Plugins/VandyImpl.py +109 -0
- WMCore/Storage/Plugins/__init__.py +17 -0
- WMCore/Storage/Registry.py +105 -0
- WMCore/Storage/RucioFileCatalog.py +247 -0
- WMCore/Storage/SiteLocalConfig.py +353 -0
- WMCore/Storage/StageInMgr.py +257 -0
- WMCore/Storage/StageOutError.py +69 -0
- WMCore/Storage/StageOutImpl.py +303 -0
- WMCore/Storage/StageOutImplV2.py +97 -0
- WMCore/Storage/StageOutMgr.py +390 -0
- WMCore/Storage/StoreFail.py +73 -0
- WMCore/Storage/TestImpl.py +71 -0
- WMCore/Storage/TrivialFileCatalog.py +383 -0
- WMCore/Storage/__init__.py +0 -0
- WMCore/WMBase.py +50 -0
- WMCore/WMConnectionBase.py +164 -0
- WMCore/WMException.py +183 -0
- WMCore/WMExceptions.py +269 -0
- WMCore/WMFactory.py +76 -0
- WMCore/WMInit.py +228 -0
- WMCore/WMLogging.py +108 -0
- WMCore/WMRuntime/Bootstrap.py +459 -0
- WMCore/WMRuntime/Monitors/PerformanceMonitor.py +308 -0
- WMCore/WMRuntime/Monitors/TestMonitor.py +197 -0
- WMCore/WMRuntime/Monitors/WMRuntimeMonitor.py +115 -0
- WMCore/WMRuntime/Monitors/__init__.py +8 -0
- WMCore/WMRuntime/ProcessMonitor.py +157 -0
- WMCore/WMRuntime/Sandbox.py +56 -0
- WMCore/WMRuntime/SandboxCreator.py +199 -0
- WMCore/WMRuntime/ScriptFactory.py +53 -0
- WMCore/WMRuntime/ScriptInterface.py +30 -0
- WMCore/WMRuntime/ScriptInvoke.py +120 -0
- WMCore/WMRuntime/Scripts/SetupCMSSWPset.py +826 -0
- WMCore/WMRuntime/Scripts/__init__.py +7 -0
- WMCore/WMRuntime/Startup.py +57 -0
- WMCore/WMRuntime/StepSpace.py +75 -0
- WMCore/WMRuntime/TaskSpace.py +144 -0
- WMCore/WMRuntime/Tools/Plugins/__init__.py +7 -0
- WMCore/WMRuntime/Tools/Scram.py +465 -0
- WMCore/WMRuntime/Tools/__init__.py +8 -0
- WMCore/WMRuntime/Unpacker.py +175 -0
- WMCore/WMRuntime/Watchdog.py +329 -0
- WMCore/WMRuntime/__init__.py +8 -0
- WMCore/WMSpec/ConfigSectionTree.py +442 -0
- WMCore/WMSpec/Makers/Handlers/MakeJob.py +46 -0
- WMCore/WMSpec/Makers/Handlers/MakeJobSlave.py +66 -0
- WMCore/WMSpec/Makers/Handlers/__init__.py +9 -0
- WMCore/WMSpec/Makers/Interface/CreateWorkArea.py +466 -0
- WMCore/WMSpec/Makers/Interface/__init__.py +9 -0
- WMCore/WMSpec/Makers/JobMaker.py +33 -0
- WMCore/WMSpec/Makers/TaskMaker.py +229 -0
- WMCore/WMSpec/Makers/__init__.py +9 -0
- WMCore/WMSpec/Persistency.py +135 -0
- WMCore/WMSpec/StdSpecs/DQMHarvest.py +156 -0
- WMCore/WMSpec/StdSpecs/DataProcessing.py +75 -0
- WMCore/WMSpec/StdSpecs/Express.py +506 -0
- WMCore/WMSpec/StdSpecs/PromptReco.py +220 -0
- WMCore/WMSpec/StdSpecs/ReReco.py +280 -0
- WMCore/WMSpec/StdSpecs/Repack.py +219 -0
- WMCore/WMSpec/StdSpecs/Resubmission.py +213 -0
- WMCore/WMSpec/StdSpecs/StdBase.py +1412 -0
- WMCore/WMSpec/StdSpecs/StepChain.py +672 -0
- WMCore/WMSpec/StdSpecs/StoreResults.py +124 -0
- WMCore/WMSpec/StdSpecs/TaskChain.py +777 -0
- WMCore/WMSpec/StdSpecs/__init__.py +9 -0
- WMCore/WMSpec/Steps/BuildMaster.py +87 -0
- WMCore/WMSpec/Steps/BuildTools.py +201 -0
- WMCore/WMSpec/Steps/Builder.py +97 -0
- WMCore/WMSpec/Steps/Builders/AlcaHarvest.py +31 -0
- WMCore/WMSpec/Steps/Builders/CMSSW.py +34 -0
- WMCore/WMSpec/Steps/Builders/DQMUpload.py +34 -0
- WMCore/WMSpec/Steps/Builders/DeleteFiles.py +34 -0
- WMCore/WMSpec/Steps/Builders/LogArchive.py +34 -0
- WMCore/WMSpec/Steps/Builders/LogCollect.py +34 -0
- WMCore/WMSpec/Steps/Builders/StageOut.py +34 -0
- WMCore/WMSpec/Steps/Builders/__init__.py +8 -0
- WMCore/WMSpec/Steps/Diagnostic.py +89 -0
- WMCore/WMSpec/Steps/Diagnostics/AlcaHarvest.py +72 -0
- WMCore/WMSpec/Steps/Diagnostics/CMSSW.py +302 -0
- WMCore/WMSpec/Steps/Diagnostics/DQMUpload.py +70 -0
- WMCore/WMSpec/Steps/Diagnostics/DeleteFiles.py +67 -0
- WMCore/WMSpec/Steps/Diagnostics/Generic.py +18 -0
- WMCore/WMSpec/Steps/Diagnostics/LogArchive.py +76 -0
- WMCore/WMSpec/Steps/Diagnostics/LogCollect.py +80 -0
- WMCore/WMSpec/Steps/Diagnostics/StageOut.py +77 -0
- WMCore/WMSpec/Steps/Diagnostics/__init__.py +8 -0
- WMCore/WMSpec/Steps/Emulator.py +62 -0
- WMCore/WMSpec/Steps/Emulators/AlcaHarvest.py +50 -0
- WMCore/WMSpec/Steps/Emulators/CMSSW.py +52 -0
- WMCore/WMSpec/Steps/Emulators/DQMUpload.py +50 -0
- WMCore/WMSpec/Steps/Emulators/DeleteFiles.py +50 -0
- WMCore/WMSpec/Steps/Emulators/LogArchive.py +83 -0
- WMCore/WMSpec/Steps/Emulators/LogCollect.py +66 -0
- WMCore/WMSpec/Steps/Emulators/StageOut.py +50 -0
- WMCore/WMSpec/Steps/Emulators/__init__.py +10 -0
- WMCore/WMSpec/Steps/ExecuteMaster.py +208 -0
- WMCore/WMSpec/Steps/Executor.py +210 -0
- WMCore/WMSpec/Steps/Executors/AlcaHarvest.py +206 -0
- WMCore/WMSpec/Steps/Executors/CMSSW.py +473 -0
- WMCore/WMSpec/Steps/Executors/DQMUpload.py +295 -0
- WMCore/WMSpec/Steps/Executors/DeleteFiles.py +161 -0
- WMCore/WMSpec/Steps/Executors/LogArchive.py +309 -0
- WMCore/WMSpec/Steps/Executors/LogCollect.py +284 -0
- WMCore/WMSpec/Steps/Executors/StageOut.py +325 -0
- WMCore/WMSpec/Steps/Executors/__init__.py +8 -0
- WMCore/WMSpec/Steps/Fetchers/CMSSWFetcher.py +49 -0
- WMCore/WMSpec/Steps/Fetchers/FetcherInterface.py +45 -0
- WMCore/WMSpec/Steps/Fetchers/PileupFetcher.py +247 -0
- WMCore/WMSpec/Steps/Fetchers/URLFetcher.py +61 -0
- WMCore/WMSpec/Steps/Fetchers/__init__.py +9 -0
- WMCore/WMSpec/Steps/StepFactory.py +213 -0
- WMCore/WMSpec/Steps/TaskEmulator.py +75 -0
- WMCore/WMSpec/Steps/Template.py +204 -0
- WMCore/WMSpec/Steps/Templates/AlcaHarvest.py +76 -0
- WMCore/WMSpec/Steps/Templates/CMSSW.py +613 -0
- WMCore/WMSpec/Steps/Templates/DQMUpload.py +59 -0
- WMCore/WMSpec/Steps/Templates/DeleteFiles.py +70 -0
- WMCore/WMSpec/Steps/Templates/LogArchive.py +84 -0
- WMCore/WMSpec/Steps/Templates/LogCollect.py +105 -0
- WMCore/WMSpec/Steps/Templates/StageOut.py +105 -0
- WMCore/WMSpec/Steps/Templates/__init__.py +10 -0
- WMCore/WMSpec/Steps/WMExecutionFailure.py +21 -0
- WMCore/WMSpec/Steps/__init__.py +8 -0
- WMCore/WMSpec/Utilities.py +63 -0
- WMCore/WMSpec/WMSpecErrors.py +12 -0
- WMCore/WMSpec/WMStep.py +347 -0
- WMCore/WMSpec/WMTask.py +1980 -0
- WMCore/WMSpec/WMWorkload.py +2288 -0
- WMCore/WMSpec/WMWorkloadTools.py +370 -0
- WMCore/WMSpec/__init__.py +9 -0
- WMCore/WorkQueue/DataStructs/CouchWorkQueueElement.py +148 -0
- WMCore/WorkQueue/DataStructs/WorkQueueElement.py +274 -0
- WMCore/WorkQueue/DataStructs/__init__.py +0 -0
- WMCore/WorkQueue/__init__.py +13 -0
- WMCore/Wrappers/JsonWrapper/JSONThunker.py +342 -0
- WMCore/Wrappers/JsonWrapper/__init__.py +7 -0
- WMCore/Wrappers/__init__.py +6 -0
- WMCore/__init__.py +10 -0
- reqmgr2-2.3.10.data/data/bin/wmc-dist-patch +15 -0
- reqmgr2-2.3.10.data/data/bin/wmc-dist-unpatch +8 -0
- reqmgr2-2.3.10.data/data/bin/wmc-httpd +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/_id +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/couchapp.json +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/language +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/config_by_label/map.js +12 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/config_by_md5hash/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/config_by_owner/map.js +15 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/config_by_psethash/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/config_type/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/group_name/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/groups/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/groups/reduce.js +12 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/owner_name_group/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/runseq_by_owner/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/runsequence_type/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/seedseq_by_owner/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ConfigCache/views/types/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/_id +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/couchapp.json +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/language +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/updates/totalstats.js +39 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/updates/updaterequest.js +105 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/validate_doc_update.js +6 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bycampaign/map.js +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bydatapileup/map.js +21 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bydate/map.js +14 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byinputdataset/map.js +21 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bymcpileup/map.js +21 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byoriginalrequest/map.js +6 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byoutputdataset/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byparentageflag/map.js +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byprepid/map.js +22 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byrequest/map.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bystatus/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bystatusandrequestor/map.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bystatusandtime/map.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bystatusandtypeandrequestor/map.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/byteamandstatus/map.js +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/bytype/map.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/childresubmissionrequests/map.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/requestsbystatusandtype/map.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgr/views/requestsincludeparents/map.js +11 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/_id +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/couchapp.json +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/filters/filterDeletedDocs.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/language +1 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/validate_doc_update.js +6 -0
- reqmgr2-2.3.10.data/data/data/couchapps/ReqMgrAux/views/byconfig/map.js +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/ColVis.css +76 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/font-awesome.min.css +4 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-check-16.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-cross-16.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-circle-plus-16.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/badge-square-check-16.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/cms_logo.gif +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/cms_logo.jpeg +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_highlight-hard_55_5c9ccc_1x100.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-bg_inset-soft_100_fcfdfd_1x100.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_217bc0_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_2694e8_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_2e83ff_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_469bdd_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_6da8d5_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_cd0a0a_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_d8e7f3_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/ui-icons_f9bd01_256x240.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/images/warning-16.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/jquery-ui-1.12.0.css +1312 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/jquery.dataTables.css +241 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/logdb.css +60 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/css/main_layout.css +565 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/FontAwesome.otf +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.eot +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.svg +565 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.ttf +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.woff +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/fonts/fontawesome-webfont.woff2 +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/Sorting icons.psd +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/back_disabled.jpg +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/back_enabled.jpg +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/error.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/favicon.ico +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/forward_disabled.jpg +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/forward_enabled.jpg +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/loader-1.gif +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/module.caption.backg.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/module.caption.backg.rolledup.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/rollup.gif +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_asc.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_asc_disabled.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_both.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_desc.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/sort_desc_disabled.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/stable.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/images/warning.png +0 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html +105 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html.min +106 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/index.html.org +125 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.ActiveRequestController.js +61 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.GenericController.js +38 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/WMStats.WorkloadSummaryController.js +12 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Controller/import.js +6 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T0/WMStats.RequestSummary.js +71 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T0/WMStats.RunSummary.js +70 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.AgentRequestSummary.js +28 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.CMSSWSummary.js +28 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.CampaignSummary.js +28 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.ReqMgrRequest.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/T1/WMStats.RequestSummary.js +190 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Agents.js +98 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Alerts.js +21 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Campaigns.js +25 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.GenericRequests.js +728 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.History.js +78 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.JobDetails.js +19 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.JobSummary.js +32 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.LogDBData.js +93 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.LogMessage.js +38 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.SiteSummary.js +24 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Sites.js +25 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.Tasks.js +107 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats.WorkloadSummary.js +20 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/WMStats._StructBase.js +37 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/DataStruct/import.js +29 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.ActiveRequestModel.js +9 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestLogDetailModel.js +17 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestLogModel.js +14 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestModel.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T0/WMStats.RequestSearchModel.js +8 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.ActiveRequestModel.js +9 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.ReqMgrRequestModel.js +8 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestLogDetailModel.js +18 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestLogModel.js +14 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/T1/WMStats.RequestSearchModel.js +8 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.AgentModel.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.AlertModel.js +6 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.HistoryModel.js +14 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.JobDetailModel.js +22 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.JobSummaryModel.js +18 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats.WorkloadSummaryModel.js +8 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._AjaxModelBase.js +55 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._ModelBase.js +77 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/WMStats._RequestModelBase.js +127 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Models/import.js +26 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/ViewModels/WMStats.ViewModel.js +511 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/ViewModels/import.js +2 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/T0/WMStats.Controls.js +117 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/T1/WMStats.Controls.js +158 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/WMStats.CommonControls.js +100 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Controls/import.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Graphs/WMStats.SiteHistoryGraph.js +8 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Graphs/import.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.CategoryDetailList.js +38 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestAlertGUI.js +128 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestDataList.js +25 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestDetailList.js +68 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T0/WMStats.RequestSummaryList.js +31 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.CategoryDetailList.js +54 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestAlertGUI.js +81 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestDataList.js +26 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestDetailList.js +122 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.RequestSummaryList.js +35 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/T1/WMStats.ResubmissionList.js +64 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.AgentDetailList.js +137 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.CategoryTitle.js +20 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.HTMLList.js +12 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.JobDetailList.js +178 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.RequestLogList.js +88 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/WMStats.RequestTitle.js +33 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/HTMLList/import.js +25 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.ActiveRequestTable.js +142 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.RunSummaryTable.js +77 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/WMStats.TaskSummaryTable.js +127 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T0/addCategoryMap.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.ActiveRequestTable.js +132 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.ActiveRequestTableWithJob.js +164 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.AgentRequestSummaryTable.js +78 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.CMSSWSummaryTable.js +76 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.CampaignSummaryTable.js +76 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.SiteSummaryTable.js +63 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/WMStats.TaskSummaryTable.js +124 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/T1/addCategoryMap.js +17 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.JobSummaryTable.js +71 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.Table.js +70 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.TableController.js +130 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/WMStats.WorkloadSummaryTable.js +62 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/Tables/import.js +26 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/WMStats.CategoryMap.js +45 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/WMStats.View.IndexHTML.js +137 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/Views/import.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Ajax.js +74 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Couch.js +83 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Globals.js +200 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/WMStats.Utils.js +283 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/import-all.min.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/loader.js +27 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/global.min.js +639 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/import-all-t0.min.js +4317 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/js/minified/import-all-t1.min.js +4972 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/lib/jquery.dataTables.columnFilter.js +732 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/_attachments/lib/namespace.js +23 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/filters/deleteFatDocFilter.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/filters/filterDeletedDocs.js +3 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/filters/repfilter.js +7 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/rewrites.json +110 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/shows/redirect.js +23 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/agentInfo.js +17 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/generalFields.js +11 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/insertRequest.js +13 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/jobLogArchiveLocation.js +10 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/jobStateTransition.js +17 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/jobSummaryState.js +5 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/updates/totalStats.js +39 -0
- reqmgr2-2.3.10.data/data/data/couchapps/WMStats/validate_doc_update.js +10 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/cms_logo.jpg +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/details_closed.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/details_open.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/feed-icon.png +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/gradientfromtop.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/loading-small.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/loading.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/img/shadow.gif +0 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/index.html +67 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/ajax_utils.js +104 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/config.js +10 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/md5.js +184 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/prototype.js +7510 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/requestsview.js +189 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/task_splitting.js +190 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/javascript/utils.js +337 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/admin.tmpl +217 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/apis.tmpl +36 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/approve.tmpl +112 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/assign.tmpl +252 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/batch.tmpl +72 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/batches.tmpl +63 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/confirm.tmpl +34 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/create.tmpl +112 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/doc.tmpl +152 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/error.tmpl +6 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/filter_sort.tmpl +55 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/generic.tmpl +6 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/index.tmpl +24 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/main.tmpl +33 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/manualConversions.txt +57 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/menu.tmpl +16 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/requests.tmpl +51 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/search.tmpl +22 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/validate.tmpl +9 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/jinja_templates/workflow.tmpl +34 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/style/kube.min.css +1 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/style/main.css +194 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/style/style.css +249 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/admin.tmpl +217 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/apis.tmpl +36 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/approve.tmpl +114 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/assign.tmpl +253 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/batch.tmpl +72 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/batches.tmpl +63 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/confirm.tmpl +35 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/create.tmpl +112 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/doc.tmpl +153 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/error.tmpl +6 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/filter_sort.tmpl +55 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/generic.tmpl +6 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/index.tmpl +24 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/DataProcessing.tmpl +34 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/MonteCarlo.tmpl +29 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/ReDigi.tmpl +41 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/ReReco.tmpl +38 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/Resubmission.tmpl +22 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/json/StoreResults.tmpl +24 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/main.tmpl +33 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/menu.tmpl +16 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/requests.tmpl +51 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/search.tmpl +22 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/validate.tmpl +9 -0
- reqmgr2-2.3.10.data/data/data/html/ReqMgr/templates/workflow.tmpl +34 -0
- reqmgr2-2.3.10.dist-info/LICENSE +202 -0
- reqmgr2-2.3.10.dist-info/METADATA +24 -0
- reqmgr2-2.3.10.dist-info/NOTICE +16 -0
- reqmgr2-2.3.10.dist-info/RECORD +678 -0
- reqmgr2-2.3.10.dist-info/WHEEL +5 -0
- reqmgr2-2.3.10.dist-info/top_level.txt +3 -0
|
@@ -0,0 +1,1646 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
_Report_
|
|
5
|
+
|
|
6
|
+
Framework job report object.
|
|
7
|
+
"""
|
|
8
|
+
from __future__ import print_function
|
|
9
|
+
from builtins import str as newstr, bytes, range, object
|
|
10
|
+
from future.utils import viewitems, listitems
|
|
11
|
+
|
|
12
|
+
import logging
|
|
13
|
+
import math
|
|
14
|
+
import re
|
|
15
|
+
import sys
|
|
16
|
+
import time
|
|
17
|
+
import traceback
|
|
18
|
+
|
|
19
|
+
from Utils.PythonVersion import PY3
|
|
20
|
+
from Utils.Utilities import decodeBytesToUnicode, encodeUnicodeToBytes
|
|
21
|
+
from WMCore.Configuration import ConfigSection
|
|
22
|
+
from WMCore.DataStructs.File import File
|
|
23
|
+
from WMCore.DataStructs.Run import Run
|
|
24
|
+
from WMCore.FwkJobReport.FileInfo import FileInfo
|
|
25
|
+
from WMCore.WMException import WMException
|
|
26
|
+
from WMCore.WMExceptions import WM_JOB_ERROR_CODES
|
|
27
|
+
|
|
28
|
+
import pickle
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class FwkJobReportException(WMException):
|
|
32
|
+
"""
|
|
33
|
+
_FwkJobReportException_
|
|
34
|
+
|
|
35
|
+
FwkJobReport error class
|
|
36
|
+
"""
|
|
37
|
+
pass
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def addBranchNamesToFile(fileSection, branchNames):
|
|
41
|
+
"""
|
|
42
|
+
_addBranchNamesToFile_
|
|
43
|
+
|
|
44
|
+
Given a list of branch names add them to the file section in the FWJR.
|
|
45
|
+
"""
|
|
46
|
+
setattr(fileSection, "branches", branchNames)
|
|
47
|
+
return
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def addInputToFile(fileSection, inputLFN, inputPFN):
|
|
51
|
+
"""
|
|
52
|
+
_addInputToFile_
|
|
53
|
+
|
|
54
|
+
Given the LFN of an input file add it to the input section of the output
|
|
55
|
+
file.
|
|
56
|
+
"""
|
|
57
|
+
if not hasattr(fileSection, "input"):
|
|
58
|
+
setattr(fileSection, "input", [])
|
|
59
|
+
if not hasattr(fileSection, "inputpfns"):
|
|
60
|
+
setattr(fileSection, "inputpfns", [])
|
|
61
|
+
|
|
62
|
+
fileSection.input.append(inputLFN)
|
|
63
|
+
fileSection.inputpfns.append(inputPFN)
|
|
64
|
+
return
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def addRunInfoToFile(fileSection, runInfo):
|
|
68
|
+
"""
|
|
69
|
+
_addRunInfoToFile_
|
|
70
|
+
|
|
71
|
+
Given a ConfigSection object corresponding to an input/output file in the
|
|
72
|
+
FWJR and a WMCore.DataStructs.Run object add the run and lumi information
|
|
73
|
+
to the ConfigSection. It will have the following format:
|
|
74
|
+
fileSection.runs.RUNNUMBER = [LUMI1, LUMI2, LUMI3...]
|
|
75
|
+
|
|
76
|
+
Note that the run number will have to be cast to a string.
|
|
77
|
+
"""
|
|
78
|
+
if not isinstance(runInfo, Run):
|
|
79
|
+
for singleRun in runInfo:
|
|
80
|
+
setattr(fileSection.runs, str(singleRun.run), singleRun.eventsPerLumi)
|
|
81
|
+
else:
|
|
82
|
+
setattr(fileSection.runs, str(runInfo.run), runInfo.eventsPerLumi)
|
|
83
|
+
return
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def addAttributesToFile(fileSection, **attributes):
|
|
87
|
+
"""
|
|
88
|
+
_addAttributesToFiles_
|
|
89
|
+
|
|
90
|
+
Add attributes to a file in the FWJR.
|
|
91
|
+
"""
|
|
92
|
+
for attName, attValue in viewitems(attributes):
|
|
93
|
+
setattr(fileSection, attName, attValue)
|
|
94
|
+
return
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class Report(object):
|
|
98
|
+
"""
|
|
99
|
+
The base class for the new jobReport
|
|
100
|
+
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
def __init__(self, reportname=None):
|
|
104
|
+
self.data = ConfigSection("FrameworkJobReport")
|
|
105
|
+
self.data.steps = []
|
|
106
|
+
self.data.workload = "Unknown"
|
|
107
|
+
self.report = None
|
|
108
|
+
self.reportname = ""
|
|
109
|
+
|
|
110
|
+
if reportname:
|
|
111
|
+
self.addStep(reportname=reportname)
|
|
112
|
+
|
|
113
|
+
return
|
|
114
|
+
|
|
115
|
+
def __str__(self):
|
|
116
|
+
return str(self.data)
|
|
117
|
+
|
|
118
|
+
def listSteps(self):
|
|
119
|
+
"""
|
|
120
|
+
_listSteps_
|
|
121
|
+
|
|
122
|
+
List the names of all the steps in the report.
|
|
123
|
+
"""
|
|
124
|
+
return self.data.steps
|
|
125
|
+
|
|
126
|
+
def setStepStatus(self, stepName, status):
|
|
127
|
+
"""
|
|
128
|
+
_setStepStatus_
|
|
129
|
+
|
|
130
|
+
Set the status for a step.
|
|
131
|
+
"""
|
|
132
|
+
reportStep = self.retrieveStep(stepName)
|
|
133
|
+
reportStep.status = status
|
|
134
|
+
return
|
|
135
|
+
|
|
136
|
+
def parse(self, xmlfile, stepName="cmsRun1"):
|
|
137
|
+
"""
|
|
138
|
+
_parse_
|
|
139
|
+
|
|
140
|
+
Read in the FrameworkJobReport XML file produced
|
|
141
|
+
by cmsRun and pull the information from it into this object
|
|
142
|
+
"""
|
|
143
|
+
from WMCore.FwkJobReport.XMLParser import xmlToJobReport
|
|
144
|
+
try:
|
|
145
|
+
xmlToJobReport(self, xmlfile)
|
|
146
|
+
except Exception as ex:
|
|
147
|
+
msg = "Error reading XML job report file, possibly corrupt XML File:\n"
|
|
148
|
+
msg += "Details: %s" % str(ex)
|
|
149
|
+
|
|
150
|
+
crashMessage = "\nStacktrace:\n"
|
|
151
|
+
|
|
152
|
+
stackTrace = traceback.format_tb(sys.exc_info()[2], None)
|
|
153
|
+
for stackFrame in stackTrace:
|
|
154
|
+
crashMessage += stackFrame
|
|
155
|
+
|
|
156
|
+
logging.debug(crashMessage)
|
|
157
|
+
raise FwkJobReportException(msg)
|
|
158
|
+
|
|
159
|
+
@staticmethod
|
|
160
|
+
def jsonizeFiles(reportModule):
|
|
161
|
+
"""
|
|
162
|
+
_jsonizeFiles_
|
|
163
|
+
|
|
164
|
+
Put individual files in JSON format.
|
|
165
|
+
"""
|
|
166
|
+
jsonFiles = []
|
|
167
|
+
files = getattr(reportModule, "files", None)
|
|
168
|
+
if not files:
|
|
169
|
+
return jsonFiles
|
|
170
|
+
|
|
171
|
+
fileCount = getattr(reportModule.files, "fileCount", 0)
|
|
172
|
+
|
|
173
|
+
for i in range(fileCount):
|
|
174
|
+
reportFile = getattr(reportModule.files, "file%s" % i)
|
|
175
|
+
jsonFile = reportFile.dictionary_()
|
|
176
|
+
|
|
177
|
+
if jsonFile.get('runs', None):
|
|
178
|
+
cfgSectionRuns = jsonFile["runs"]
|
|
179
|
+
jsonFile["runs"] = {}
|
|
180
|
+
for runNumber in cfgSectionRuns.listSections_():
|
|
181
|
+
jsonFile["runs"][str(runNumber)] = getattr(cfgSectionRuns,
|
|
182
|
+
runNumber)
|
|
183
|
+
jsonFiles.append(jsonFile)
|
|
184
|
+
|
|
185
|
+
return jsonFiles
|
|
186
|
+
|
|
187
|
+
@staticmethod
|
|
188
|
+
def jsonizePerformance(perfSection):
|
|
189
|
+
"""
|
|
190
|
+
_jsonizePerformance_
|
|
191
|
+
|
|
192
|
+
Convert the performance section of the FWJR into JSON.
|
|
193
|
+
"""
|
|
194
|
+
jsonPerformance = {}
|
|
195
|
+
for reportSection in ["storage", "memory", "cpu", "multicore", "cmssw"]:
|
|
196
|
+
jsonPerformance[reportSection] = {}
|
|
197
|
+
if not hasattr(perfSection, reportSection):
|
|
198
|
+
continue
|
|
199
|
+
|
|
200
|
+
jsonPerformance[reportSection] = getattr(perfSection, reportSection).dictionary_()
|
|
201
|
+
for key in jsonPerformance[reportSection]:
|
|
202
|
+
val = jsonPerformance[reportSection][key]
|
|
203
|
+
if reportSection == 'cmssw' and isinstance(val, ConfigSection):
|
|
204
|
+
jsonPerformance[reportSection][key] = val.dictionary_()
|
|
205
|
+
elif isinstance(val, float):
|
|
206
|
+
if math.isinf(val) or math.isnan(val):
|
|
207
|
+
jsonPerformance[reportSection][key] = None
|
|
208
|
+
|
|
209
|
+
return jsonPerformance
|
|
210
|
+
|
|
211
|
+
def __to_json__(self, thunker):
|
|
212
|
+
"""
|
|
213
|
+
__to_json__
|
|
214
|
+
|
|
215
|
+
Create a JSON version of the Report.
|
|
216
|
+
"""
|
|
217
|
+
jsonReport = {}
|
|
218
|
+
jsonReport["WorkerNodeInfo"] = self.getWorkerNodeInfo()
|
|
219
|
+
jsonReport["task"] = self.getTaskName()
|
|
220
|
+
jsonReport["steps"] = {}
|
|
221
|
+
jsonReport["skippedFiles"] = self.getAllSkippedFiles()
|
|
222
|
+
jsonReport["fallbackFiles"] = self.getAllFallbackFiles()
|
|
223
|
+
jsonReport["Campaign"] = self.getCampaign()
|
|
224
|
+
jsonReport["PrepID"] = self.getPrepID()
|
|
225
|
+
jsonReport["EOSLogURL"] = self.getLogURL()
|
|
226
|
+
jsonReport["WMTiming"] = self.getWMTiming()
|
|
227
|
+
|
|
228
|
+
for stepName in self.listSteps():
|
|
229
|
+
reportStep = self.retrieveStep(stepName)
|
|
230
|
+
jsonStep = {}
|
|
231
|
+
jsonStep["status"] = reportStep.status
|
|
232
|
+
|
|
233
|
+
stepTimes = self.getTimes(stepName)
|
|
234
|
+
|
|
235
|
+
if stepTimes["startTime"] is not None:
|
|
236
|
+
stepTimes["startTime"] = int(stepTimes["startTime"])
|
|
237
|
+
if stepTimes["stopTime"] is not None:
|
|
238
|
+
stepTimes["stopTime"] = int(stepTimes["stopTime"])
|
|
239
|
+
|
|
240
|
+
jsonStep["start"] = stepTimes["startTime"]
|
|
241
|
+
jsonStep["stop"] = stepTimes["stopTime"]
|
|
242
|
+
|
|
243
|
+
jsonStep["performance"] = self.jsonizePerformance(reportStep.performance)
|
|
244
|
+
|
|
245
|
+
jsonStep["output"] = {}
|
|
246
|
+
for outputModule in reportStep.outputModules:
|
|
247
|
+
reportOutputModule = getattr(reportStep.output, outputModule)
|
|
248
|
+
jsonStep["output"][outputModule] = self.jsonizeFiles(reportOutputModule)
|
|
249
|
+
|
|
250
|
+
analysisSection = getattr(reportStep, 'analysis', None)
|
|
251
|
+
if analysisSection:
|
|
252
|
+
jsonStep["output"]['analysis'] = self.jsonizeFiles(analysisSection)
|
|
253
|
+
|
|
254
|
+
jsonStep["input"] = {}
|
|
255
|
+
for inputSource in reportStep.input.listSections_():
|
|
256
|
+
reportInputSource = getattr(reportStep.input, inputSource)
|
|
257
|
+
jsonStep["input"][inputSource] = self.jsonizeFiles(reportInputSource)
|
|
258
|
+
|
|
259
|
+
jsonStep["errors"] = []
|
|
260
|
+
errorCount = getattr(reportStep.errors, "errorCount", 0)
|
|
261
|
+
for i in range(errorCount):
|
|
262
|
+
reportError = getattr(reportStep.errors, "error%i" % i)
|
|
263
|
+
jsonStep["errors"].append({"type": reportError.type,
|
|
264
|
+
"details": reportError.details,
|
|
265
|
+
"exitCode": reportError.exitCode})
|
|
266
|
+
|
|
267
|
+
jsonStep["cleanup"] = {}
|
|
268
|
+
jsonStep["parameters"] = {}
|
|
269
|
+
jsonStep["site"] = self.getSiteName()
|
|
270
|
+
jsonStep["analysis"] = {}
|
|
271
|
+
jsonStep["logs"] = {}
|
|
272
|
+
jsonStep["WMCMSSWSubprocess"] = self.getWMCMSSWSubprocess(stepName)
|
|
273
|
+
jsonReport["steps"][stepName] = jsonStep
|
|
274
|
+
|
|
275
|
+
return jsonReport
|
|
276
|
+
|
|
277
|
+
def getSiteName(self):
|
|
278
|
+
"""
|
|
279
|
+
_getSiteName_
|
|
280
|
+
|
|
281
|
+
Returns the site name attribute (no step specific)
|
|
282
|
+
"""
|
|
283
|
+
return getattr(self.data, 'siteName', {})
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def _setSiteName(self, site):
|
|
287
|
+
"""
|
|
288
|
+
_setSiteName_
|
|
289
|
+
|
|
290
|
+
Set the site name attribute (no step specific)
|
|
291
|
+
"""
|
|
292
|
+
setattr(self.data, 'siteName', site)
|
|
293
|
+
|
|
294
|
+
return
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def getExitCodes(self):
|
|
298
|
+
"""
|
|
299
|
+
_getExitCodes_
|
|
300
|
+
|
|
301
|
+
Return a list of all non-zero exit codes in the report
|
|
302
|
+
"""
|
|
303
|
+
returnCodes = set()
|
|
304
|
+
for stepName in self.listSteps():
|
|
305
|
+
returnCodes.update(self.getStepExitCodes(stepName=stepName))
|
|
306
|
+
return returnCodes
|
|
307
|
+
|
|
308
|
+
def getWMCMSSWSubprocess(self, stepName):
|
|
309
|
+
"""
|
|
310
|
+
Returns a WMCMSSWSubprocess metrics for given step
|
|
311
|
+
:param stepName: string representing step name, e.g. cmsRun1
|
|
312
|
+
:return: dictionary of WMCMSSWSubprocess metrics
|
|
313
|
+
"""
|
|
314
|
+
reportStep = self.retrieveStep(stepName)
|
|
315
|
+
data = getattr(reportStep, 'WMCMSSWSubprocess', {})
|
|
316
|
+
if isinstance(data, dict):
|
|
317
|
+
return data
|
|
318
|
+
return data.dictionary_()
|
|
319
|
+
|
|
320
|
+
def getStepExitCodes(self, stepName):
|
|
321
|
+
"""
|
|
322
|
+
_getStepExitCodes_
|
|
323
|
+
|
|
324
|
+
Returns a list of all non-zero exit codes in the step
|
|
325
|
+
"""
|
|
326
|
+
returnCodes = set()
|
|
327
|
+
reportStep = self.retrieveStep(stepName)
|
|
328
|
+
errorCount = getattr(reportStep.errors, "errorCount", 0)
|
|
329
|
+
for i in range(errorCount):
|
|
330
|
+
reportError = getattr(reportStep.errors, "error%i" % i)
|
|
331
|
+
if getattr(reportError, 'exitCode', None):
|
|
332
|
+
returnCodes.add(int(reportError.exitCode))
|
|
333
|
+
else:
|
|
334
|
+
# exitCode is likely set to None(?!?)
|
|
335
|
+
returnCodes.add(99999)
|
|
336
|
+
|
|
337
|
+
return returnCodes
|
|
338
|
+
|
|
339
|
+
def getExitCode(self):
|
|
340
|
+
"""
|
|
341
|
+
_getExitCode_
|
|
342
|
+
|
|
343
|
+
Return the first exit code you find.
|
|
344
|
+
"""
|
|
345
|
+
returnCode = 0
|
|
346
|
+
for stepName in self.listSteps():
|
|
347
|
+
errorCode = self.getStepExitCode(stepName=stepName)
|
|
348
|
+
if errorCode == 99999:
|
|
349
|
+
# Then we don't know what this error was
|
|
350
|
+
# Mark it for return only if we don't fine an
|
|
351
|
+
# actual error code in the job.
|
|
352
|
+
returnCode = errorCode
|
|
353
|
+
elif errorCode != 0:
|
|
354
|
+
return errorCode
|
|
355
|
+
|
|
356
|
+
return returnCode
|
|
357
|
+
|
|
358
|
+
def getStepExitCode(self, stepName):
|
|
359
|
+
"""
|
|
360
|
+
_getStepExitCode_
|
|
361
|
+
|
|
362
|
+
Get the exit code for a particular step
|
|
363
|
+
Return 0 if none
|
|
364
|
+
"""
|
|
365
|
+
returnCode, _ = self.getStepExitCodeAndMessage(stepName)
|
|
366
|
+
return returnCode
|
|
367
|
+
|
|
368
|
+
def getStepExitCodeAndMessage(self, stepName):
|
|
369
|
+
"""
|
|
370
|
+
_getStepExitCodeAndMessage_
|
|
371
|
+
|
|
372
|
+
Get the exit code and message for a particular step
|
|
373
|
+
Return (0, None) if there were no errors.
|
|
374
|
+
"""
|
|
375
|
+
returnCode = 0
|
|
376
|
+
returnMessage = None
|
|
377
|
+
reportStep = self.retrieveStep(stepName)
|
|
378
|
+
errorCount = getattr(reportStep.errors, "errorCount", 0)
|
|
379
|
+
for i in range(errorCount):
|
|
380
|
+
reportError = getattr(reportStep.errors, "error%i" % i)
|
|
381
|
+
if not getattr(reportError, 'exitCode', None):
|
|
382
|
+
returnCode = 99999
|
|
383
|
+
returnMessage = 'Unknown'
|
|
384
|
+
else:
|
|
385
|
+
return int(reportError.exitCode), reportError.details
|
|
386
|
+
|
|
387
|
+
return returnCode, returnMessage
|
|
388
|
+
|
|
389
|
+
def persist(self, filename):
|
|
390
|
+
"""
|
|
391
|
+
_persist_
|
|
392
|
+
|
|
393
|
+
Pickle this object and save it to disk.
|
|
394
|
+
"""
|
|
395
|
+
if PY3:
|
|
396
|
+
with open(filename, 'wb') as handle:
|
|
397
|
+
pickle.dump(encodeUnicodeToBytes(self.data), handle)
|
|
398
|
+
else:
|
|
399
|
+
with open(filename, 'w') as handle:
|
|
400
|
+
pickle.dump(self.data, handle)
|
|
401
|
+
return
|
|
402
|
+
|
|
403
|
+
def unpersist(self, filename, reportname=None):
|
|
404
|
+
"""
|
|
405
|
+
_unpersist_
|
|
406
|
+
|
|
407
|
+
Load a pickled FWJR from disk.
|
|
408
|
+
"""
|
|
409
|
+
if PY3:
|
|
410
|
+
with open(filename, 'rb') as handle:
|
|
411
|
+
self.data = decodeBytesToUnicode(pickle.load(handle))
|
|
412
|
+
else:
|
|
413
|
+
with open(filename, 'r') as handle:
|
|
414
|
+
self.data = pickle.load(handle)
|
|
415
|
+
|
|
416
|
+
# old self.report (if it existed) became unattached
|
|
417
|
+
if reportname:
|
|
418
|
+
self.report = getattr(self.data, reportname)
|
|
419
|
+
|
|
420
|
+
return
|
|
421
|
+
|
|
422
|
+
def addOutputModule(self, moduleName):
|
|
423
|
+
"""
|
|
424
|
+
_addOutputModule_
|
|
425
|
+
|
|
426
|
+
Add an entry for an output module.
|
|
427
|
+
"""
|
|
428
|
+
self.report.outputModules.append(moduleName)
|
|
429
|
+
self.report.output.section_(moduleName)
|
|
430
|
+
|
|
431
|
+
outMod = getattr(self.report.output, moduleName)
|
|
432
|
+
outMod.section_("files")
|
|
433
|
+
outMod.section_("dataset")
|
|
434
|
+
outMod.files.fileCount = 0
|
|
435
|
+
|
|
436
|
+
return outMod
|
|
437
|
+
|
|
438
|
+
def killOutput(self):
|
|
439
|
+
"""
|
|
440
|
+
_killOutput_
|
|
441
|
+
|
|
442
|
+
Remove all the output from the report. This is useful for chained
|
|
443
|
+
processing where we don't want to keep the output from a particular
|
|
444
|
+
step in a job.
|
|
445
|
+
"""
|
|
446
|
+
for outputModuleName in self.report.outputModules:
|
|
447
|
+
delattr(self.report.output, outputModuleName)
|
|
448
|
+
|
|
449
|
+
self.report.outputModules = []
|
|
450
|
+
return
|
|
451
|
+
|
|
452
|
+
def addOutputFile(self, outputModule, aFile=None):
|
|
453
|
+
"""
|
|
454
|
+
_addFile_
|
|
455
|
+
|
|
456
|
+
Add an output file to the outputModule provided.
|
|
457
|
+
"""
|
|
458
|
+
logging.info("addOutputFile method called with outputModule: %s, aFile: %s", outputModule, aFile)
|
|
459
|
+
aFile = aFile or {}
|
|
460
|
+
|
|
461
|
+
# Now load the output module and create the file object
|
|
462
|
+
outMod = getattr(self.report.output, outputModule, None)
|
|
463
|
+
if outMod is None:
|
|
464
|
+
outMod = self.addOutputModule(outputModule)
|
|
465
|
+
count = outMod.files.fileCount
|
|
466
|
+
fileSection = "file%s" % count
|
|
467
|
+
outMod.files.section_(fileSection)
|
|
468
|
+
fileRef = getattr(outMod.files, fileSection)
|
|
469
|
+
logging.info("addOutputFile method fileRef: %s, whole tree: %s", fileRef, fileRef.dictionary_whole_tree_())
|
|
470
|
+
outMod.files.fileCount += 1
|
|
471
|
+
|
|
472
|
+
# Now we need to eliminate the optional and non-primitives:
|
|
473
|
+
# runs, parents, branches, locations and datasets
|
|
474
|
+
keyList = list(aFile)
|
|
475
|
+
|
|
476
|
+
fileRef.section_("runs")
|
|
477
|
+
if "runs" in aFile:
|
|
478
|
+
for run in aFile["runs"]:
|
|
479
|
+
addRunInfoToFile(fileRef, run)
|
|
480
|
+
keyList.remove('runs')
|
|
481
|
+
|
|
482
|
+
if "parents" in aFile:
|
|
483
|
+
setattr(fileRef, 'parents', list(aFile['parents']))
|
|
484
|
+
keyList.remove('parents')
|
|
485
|
+
|
|
486
|
+
if "locations" in aFile:
|
|
487
|
+
fileRef.location = list(aFile["locations"])
|
|
488
|
+
keyList.remove('locations')
|
|
489
|
+
elif "PNN" in aFile:
|
|
490
|
+
fileRef.location = [aFile["PNN"]]
|
|
491
|
+
|
|
492
|
+
if "LFN" in aFile:
|
|
493
|
+
fileRef.lfn = aFile["LFN"]
|
|
494
|
+
keyList.remove("LFN")
|
|
495
|
+
if "PFN" in aFile:
|
|
496
|
+
fileRef.lfn = aFile["PFN"]
|
|
497
|
+
keyList.remove("PFN")
|
|
498
|
+
|
|
499
|
+
# All right, the rest should be JSONalizable python primitives
|
|
500
|
+
for entry in keyList:
|
|
501
|
+
setattr(fileRef, entry, aFile[entry])
|
|
502
|
+
|
|
503
|
+
# And we're done
|
|
504
|
+
return fileRef
|
|
505
|
+
|
|
506
|
+
def addInputSource(self, sourceName):
|
|
507
|
+
"""
|
|
508
|
+
_addInputSource_
|
|
509
|
+
|
|
510
|
+
Add an input source to the report doing nothing if the input source
|
|
511
|
+
already exists.
|
|
512
|
+
"""
|
|
513
|
+
if hasattr(self.report.input, sourceName):
|
|
514
|
+
return getattr(self.report.input, sourceName)
|
|
515
|
+
|
|
516
|
+
self.report.input.section_(sourceName)
|
|
517
|
+
srcMod = getattr(self.report.input, sourceName)
|
|
518
|
+
srcMod.section_("files")
|
|
519
|
+
srcMod.files.fileCount = 0
|
|
520
|
+
|
|
521
|
+
return srcMod
|
|
522
|
+
|
|
523
|
+
def addInputFile(self, sourceName, **attrs):
|
|
524
|
+
"""
|
|
525
|
+
_addInputFile_
|
|
526
|
+
|
|
527
|
+
Add an input file to the given source.
|
|
528
|
+
"""
|
|
529
|
+
srcMod = getattr(self.report.input, sourceName, None)
|
|
530
|
+
if srcMod is None:
|
|
531
|
+
srcMod = self.addInputSource(sourceName)
|
|
532
|
+
count = srcMod.files.fileCount
|
|
533
|
+
fileSection = "file%s" % count
|
|
534
|
+
srcMod.files.section_(fileSection)
|
|
535
|
+
fileRef = getattr(srcMod.files, fileSection)
|
|
536
|
+
srcMod.files.fileCount += 1
|
|
537
|
+
|
|
538
|
+
keyList = list(attrs)
|
|
539
|
+
|
|
540
|
+
fileRef.section_("runs")
|
|
541
|
+
if "runs" in attrs:
|
|
542
|
+
for run in attrs["runs"]:
|
|
543
|
+
addRunInfoToFile(fileRef, run)
|
|
544
|
+
keyList.remove('runs')
|
|
545
|
+
|
|
546
|
+
if "parents" in attrs:
|
|
547
|
+
keyList.remove('parents')
|
|
548
|
+
if "locations" in attrs:
|
|
549
|
+
keyList.remove('locations')
|
|
550
|
+
|
|
551
|
+
# All right, the rest should be JSONalizable python primitives
|
|
552
|
+
for entry in keyList:
|
|
553
|
+
setattr(fileRef, entry, attrs[entry])
|
|
554
|
+
|
|
555
|
+
return fileRef
|
|
556
|
+
|
|
557
|
+
def addAnalysisFile(self, filename, **attrs):
|
|
558
|
+
"""
|
|
559
|
+
_addAnalysisFile_
|
|
560
|
+
|
|
561
|
+
Add an Analysis File.
|
|
562
|
+
"""
|
|
563
|
+
analysisFiles = self.report.analysis.files
|
|
564
|
+
count = analysisFiles.fileCount
|
|
565
|
+
label = "file%s" % count
|
|
566
|
+
|
|
567
|
+
analysisFiles.section_(label)
|
|
568
|
+
newFile = getattr(analysisFiles, label)
|
|
569
|
+
newFile.fileName = filename
|
|
570
|
+
|
|
571
|
+
for x, y in viewitems(attrs):
|
|
572
|
+
setattr(newFile, x, y)
|
|
573
|
+
|
|
574
|
+
analysisFiles.fileCount += 1
|
|
575
|
+
return
|
|
576
|
+
|
|
577
|
+
def addRemovedCleanupFile(self, **attrs):
|
|
578
|
+
"""
|
|
579
|
+
_addRemovedCleanupFile_
|
|
580
|
+
|
|
581
|
+
Add a file to the cleanup.removed file
|
|
582
|
+
"""
|
|
583
|
+
removedFiles = self.report.cleanup.removed
|
|
584
|
+
count = self.report.cleanup.removed.fileCount
|
|
585
|
+
label = 'file%s' % count
|
|
586
|
+
|
|
587
|
+
removedFiles.section_(label)
|
|
588
|
+
newFile = getattr(removedFiles, label)
|
|
589
|
+
|
|
590
|
+
for x, y in viewitems(attrs):
|
|
591
|
+
setattr(newFile, x, y)
|
|
592
|
+
|
|
593
|
+
self.report.cleanup.removed.fileCount += 1
|
|
594
|
+
return
|
|
595
|
+
|
|
596
|
+
def addError(self, stepName, exitCode, errorType, errorDetails, siteName=None):
|
|
597
|
+
"""
|
|
598
|
+
_addError_
|
|
599
|
+
|
|
600
|
+
Add an error report with an exitCode, type/class of error and
|
|
601
|
+
details of the error as a string.
|
|
602
|
+
Also, report attempted site if error happened before landing on it.
|
|
603
|
+
"""
|
|
604
|
+
if self.retrieveStep(stepName) is None:
|
|
605
|
+
# Create a step and set it to failed
|
|
606
|
+
# Assumption: Adding an error fails a step
|
|
607
|
+
self.addStep(stepName, status=1)
|
|
608
|
+
|
|
609
|
+
if exitCode is not None:
|
|
610
|
+
exitCode = int(exitCode)
|
|
611
|
+
|
|
612
|
+
setExitCodes = self.getStepExitCodes(stepName)
|
|
613
|
+
if exitCode in setExitCodes:
|
|
614
|
+
logging.warning("Exit code: %s has been already added to the job report", exitCode)
|
|
615
|
+
return
|
|
616
|
+
|
|
617
|
+
stepSection = self.retrieveStep(stepName)
|
|
618
|
+
errorCount = getattr(stepSection.errors, "errorCount", 0)
|
|
619
|
+
errEntry = "error%s" % errorCount
|
|
620
|
+
stepSection.errors.section_(errEntry)
|
|
621
|
+
errDetails = getattr(stepSection.errors, errEntry)
|
|
622
|
+
errDetails.exitCode = exitCode
|
|
623
|
+
errDetails.type = str(errorType)
|
|
624
|
+
|
|
625
|
+
try:
|
|
626
|
+
if isinstance(errorDetails, newstr):
|
|
627
|
+
errDetails.details = errorDetails
|
|
628
|
+
elif isinstance(errorDetails, bytes):
|
|
629
|
+
errDetails.details = decodeBytesToUnicode(errorDetails, 'ignore')
|
|
630
|
+
else:
|
|
631
|
+
errDetails.details = newstr(errorDetails)
|
|
632
|
+
except UnicodeEncodeError as ex:
|
|
633
|
+
msg = "Failed to encode the job error details for job ID: %s." % self.getJobID()
|
|
634
|
+
msg += "\nException message: %s\nOriginal error details: %s" % (str(ex), errorDetails)
|
|
635
|
+
logging.error(msg)
|
|
636
|
+
msg = "DEFAULT ERROR MESSAGE, because it failed to UTF-8 encode the original message."
|
|
637
|
+
errDetails.details = msg
|
|
638
|
+
except UnicodeDecodeError as ex:
|
|
639
|
+
msg = "Failed to decode the job error details for job ID: %s." % self.getJobID()
|
|
640
|
+
msg += "\nException message: %s\nOriginal error details: %s" % (str(ex), errorDetails)
|
|
641
|
+
logging.error(msg)
|
|
642
|
+
msg = "DEFAULT ERROR MESSAGE, because it failed to UTF-8 decode the original message."
|
|
643
|
+
errDetails.details = msg
|
|
644
|
+
|
|
645
|
+
setattr(stepSection.errors, "errorCount", errorCount + 1)
|
|
646
|
+
self.setStepStatus(stepName=stepName, status=exitCode)
|
|
647
|
+
|
|
648
|
+
if siteName:
|
|
649
|
+
self._setSiteName(site=siteName)
|
|
650
|
+
|
|
651
|
+
return
|
|
652
|
+
|
|
653
|
+
def addSkippedFile(self, lfn, pfn):
|
|
654
|
+
"""
|
|
655
|
+
_addSkippedFile_
|
|
656
|
+
|
|
657
|
+
Report a skipped input file
|
|
658
|
+
"""
|
|
659
|
+
count = self.report.skipped.files.fileCount
|
|
660
|
+
entry = "file%s" % count
|
|
661
|
+
self.report.skipped.files.section_(entry)
|
|
662
|
+
skipSect = getattr(self.report.skipped.files, entry)
|
|
663
|
+
skipSect.PhysicalFileName = pfn
|
|
664
|
+
skipSect.LogicalFileName = lfn
|
|
665
|
+
self.report.skipped.files.fileCount += 1
|
|
666
|
+
return
|
|
667
|
+
|
|
668
|
+
def addFallbackFile(self, lfn, pfn):
|
|
669
|
+
"""
|
|
670
|
+
_addFallbackFile_
|
|
671
|
+
|
|
672
|
+
Report a fallback attempt for input file
|
|
673
|
+
"""
|
|
674
|
+
count = self.report.fallback.files.fileCount
|
|
675
|
+
entry = "file%s" % count
|
|
676
|
+
self.report.fallback.files.section_(entry)
|
|
677
|
+
fallbackSect = getattr(self.report.fallback.files, entry)
|
|
678
|
+
fallbackSect.PhysicalFileName = pfn
|
|
679
|
+
fallbackSect.LogicalFileName = lfn
|
|
680
|
+
self.report.fallback.files.fileCount += 1
|
|
681
|
+
return
|
|
682
|
+
|
|
683
|
+
def addSkippedEvent(self, run, event):
|
|
684
|
+
"""
|
|
685
|
+
_addSkippedEvent_
|
|
686
|
+
|
|
687
|
+
Add a skipped event.
|
|
688
|
+
"""
|
|
689
|
+
self.report.skipped.events.section_(str(run))
|
|
690
|
+
runsect = getattr(self.report.skipped.events, str(run))
|
|
691
|
+
if not hasattr(runsect, "eventList"):
|
|
692
|
+
runsect.eventList = []
|
|
693
|
+
runsect.eventList.append(event)
|
|
694
|
+
return
|
|
695
|
+
|
|
696
|
+
def addStep(self, reportname, status=1):
|
|
697
|
+
"""
|
|
698
|
+
_addStep_
|
|
699
|
+
|
|
700
|
+
This creates a report section into self.report
|
|
701
|
+
"""
|
|
702
|
+
if hasattr(self.data, reportname):
|
|
703
|
+
msg = "Attempted to create pre-existing report section %s" % reportname
|
|
704
|
+
logging.error(msg)
|
|
705
|
+
return
|
|
706
|
+
|
|
707
|
+
self.data.steps.append(reportname)
|
|
708
|
+
|
|
709
|
+
self.reportname = reportname
|
|
710
|
+
self.data.section_(reportname)
|
|
711
|
+
self.report = getattr(self.data, reportname)
|
|
712
|
+
self.report.id = None
|
|
713
|
+
self.report.status = status
|
|
714
|
+
self.report.outputModules = []
|
|
715
|
+
|
|
716
|
+
# structure
|
|
717
|
+
self.report.section_("site")
|
|
718
|
+
self.report.section_("output")
|
|
719
|
+
self.report.section_("input")
|
|
720
|
+
self.report.section_("performance")
|
|
721
|
+
self.report.section_("analysis")
|
|
722
|
+
self.report.section_("errors")
|
|
723
|
+
self.report.section_("skipped")
|
|
724
|
+
self.report.section_("fallback")
|
|
725
|
+
self.report.section_("parameters")
|
|
726
|
+
self.report.section_("logs")
|
|
727
|
+
self.report.section_("cleanup")
|
|
728
|
+
self.report.analysis.section_("files")
|
|
729
|
+
self.report.cleanup.section_("removed")
|
|
730
|
+
self.report.cleanup.section_("unremoved")
|
|
731
|
+
self.report.skipped.section_("events")
|
|
732
|
+
self.report.skipped.section_("files")
|
|
733
|
+
self.report.fallback.section_("files")
|
|
734
|
+
self.report.skipped.files.fileCount = 0
|
|
735
|
+
self.report.fallback.files.fileCount = 0
|
|
736
|
+
self.report.analysis.files.fileCount = 0
|
|
737
|
+
self.report.cleanup.removed.fileCount = 0
|
|
738
|
+
|
|
739
|
+
return
|
|
740
|
+
|
|
741
|
+
def setStep(self, stepName, stepSection):
|
|
742
|
+
"""
|
|
743
|
+
_setStep_
|
|
744
|
+
|
|
745
|
+
"""
|
|
746
|
+
if stepName not in self.listSteps():
|
|
747
|
+
self.data.steps.append(stepName)
|
|
748
|
+
else:
|
|
749
|
+
logging.info("Step %s is now being overridden by a new step report", stepName)
|
|
750
|
+
self.data.section_(stepName)
|
|
751
|
+
setattr(self.data, stepName, stepSection)
|
|
752
|
+
return
|
|
753
|
+
|
|
754
|
+
def retrieveStep(self, step):
|
|
755
|
+
"""
|
|
756
|
+
_retrieveStep_
|
|
757
|
+
|
|
758
|
+
Grabs a report in the raw and returns it.
|
|
759
|
+
"""
|
|
760
|
+
reportSection = getattr(self.data, step, None)
|
|
761
|
+
return reportSection
|
|
762
|
+
|
|
763
|
+
def load(self, filename):
|
|
764
|
+
"""
|
|
765
|
+
_load_
|
|
766
|
+
|
|
767
|
+
This just maps to unpersist
|
|
768
|
+
"""
|
|
769
|
+
self.unpersist(filename)
|
|
770
|
+
return
|
|
771
|
+
|
|
772
|
+
def save(self, filename):
|
|
773
|
+
"""
|
|
774
|
+
_save_
|
|
775
|
+
|
|
776
|
+
This just maps to persist
|
|
777
|
+
"""
|
|
778
|
+
self.persist(filename)
|
|
779
|
+
return
|
|
780
|
+
|
|
781
|
+
def getOutputModule(self, step, outputModule):
|
|
782
|
+
"""
|
|
783
|
+
_getOutputModule_
|
|
784
|
+
|
|
785
|
+
Get the output module from a particular step
|
|
786
|
+
"""
|
|
787
|
+
stepReport = self.retrieveStep(step=step)
|
|
788
|
+
|
|
789
|
+
if not stepReport:
|
|
790
|
+
return None
|
|
791
|
+
|
|
792
|
+
return getattr(stepReport.output, outputModule, None)
|
|
793
|
+
|
|
794
|
+
def getOutputFile(self, fileName, outputModule, step):
|
|
795
|
+
"""
|
|
796
|
+
_getOutputFile_
|
|
797
|
+
|
|
798
|
+
Takes a fileRef object and returns a DataStructs/File object as output
|
|
799
|
+
"""
|
|
800
|
+
|
|
801
|
+
outputMod = self.getOutputModule(step=step, outputModule=outputModule)
|
|
802
|
+
|
|
803
|
+
if not outputMod:
|
|
804
|
+
return None
|
|
805
|
+
|
|
806
|
+
fileRef = getattr(outputMod.files, fileName, None)
|
|
807
|
+
newFile = File(locations=set())
|
|
808
|
+
|
|
809
|
+
# Locations
|
|
810
|
+
newFile.setLocation(getattr(fileRef, "location", None))
|
|
811
|
+
|
|
812
|
+
# Runs
|
|
813
|
+
runList = fileRef.runs.listSections_()
|
|
814
|
+
for run in runList:
|
|
815
|
+
lumis = getattr(fileRef.runs, run)
|
|
816
|
+
if isinstance(lumis, dict):
|
|
817
|
+
newRun = Run(int(run), *listitems(lumis))
|
|
818
|
+
else:
|
|
819
|
+
newRun = Run(int(run), *lumis)
|
|
820
|
+
newFile.addRun(newRun)
|
|
821
|
+
|
|
822
|
+
newFile["lfn"] = getattr(fileRef, "lfn", None)
|
|
823
|
+
newFile["pfn"] = getattr(fileRef, "pfn", None)
|
|
824
|
+
newFile["events"] = int(getattr(fileRef, "events", 0))
|
|
825
|
+
newFile["size"] = int(getattr(fileRef, "size", 0))
|
|
826
|
+
newFile["branches"] = getattr(fileRef, "branches", [])
|
|
827
|
+
newFile["input"] = getattr(fileRef, "input", [])
|
|
828
|
+
newFile["inputpfns"] = getattr(fileRef, "inputpfns", [])
|
|
829
|
+
newFile["branch_hash"] = getattr(fileRef, "branch_hash", None)
|
|
830
|
+
newFile["catalog"] = getattr(fileRef, "catalog", "")
|
|
831
|
+
newFile["guid"] = getattr(fileRef, "guid", "")
|
|
832
|
+
newFile["module_label"] = getattr(fileRef, "module_label", "")
|
|
833
|
+
newFile["checksums"] = getattr(fileRef, "checksums", {})
|
|
834
|
+
newFile["merged"] = bool(getattr(fileRef, "merged", False))
|
|
835
|
+
newFile["dataset"] = getattr(fileRef, "dataset", {})
|
|
836
|
+
newFile["acquisitionEra"] = getattr(fileRef, 'acquisitionEra', None)
|
|
837
|
+
newFile["processingVer"] = getattr(fileRef, 'processingVer', 0)
|
|
838
|
+
newFile["validStatus"] = getattr(fileRef, 'validStatus', None)
|
|
839
|
+
newFile["globalTag"] = getattr(fileRef, 'globalTag', None)
|
|
840
|
+
newFile["prep_id"] = getattr(fileRef, 'prep_id', None)
|
|
841
|
+
newFile['configURL'] = getattr(fileRef, 'configURL', None)
|
|
842
|
+
newFile['inputPath'] = getattr(fileRef, 'inputPath', None)
|
|
843
|
+
newFile["outputModule"] = outputModule
|
|
844
|
+
newFile["fileRef"] = fileRef
|
|
845
|
+
|
|
846
|
+
return newFile
|
|
847
|
+
|
|
848
|
+
def getAllFilesFromStep(self, step):
|
|
849
|
+
"""
|
|
850
|
+
_getAllFilesFromStep_
|
|
851
|
+
|
|
852
|
+
For a given step, retrieve all the associated files
|
|
853
|
+
"""
|
|
854
|
+
|
|
855
|
+
stepReport = self.retrieveStep(step=step)
|
|
856
|
+
if not stepReport:
|
|
857
|
+
logging.debug("Asked to retrieve files from non-existant step %s", step)
|
|
858
|
+
return []
|
|
859
|
+
|
|
860
|
+
# steps with no outputModules can be ok (even for CMSSW steps)
|
|
861
|
+
listOfModules = getattr(stepReport, 'outputModules', None)
|
|
862
|
+
if not listOfModules:
|
|
863
|
+
return []
|
|
864
|
+
|
|
865
|
+
listOfFiles = []
|
|
866
|
+
for module in listOfModules:
|
|
867
|
+
listOfFiles.extend(self.getFilesFromOutputModule(step=step, outputModule=module))
|
|
868
|
+
|
|
869
|
+
return listOfFiles
|
|
870
|
+
|
|
871
|
+
def getAllFiles(self):
|
|
872
|
+
"""
|
|
873
|
+
_getAllFiles_
|
|
874
|
+
|
|
875
|
+
Grabs all files in all output modules in all steps
|
|
876
|
+
"""
|
|
877
|
+
listOfFiles = []
|
|
878
|
+
|
|
879
|
+
for step in self.listSteps():
|
|
880
|
+
listOfFiles.extend(self.getAllFilesFromStep(step=step))
|
|
881
|
+
|
|
882
|
+
return listOfFiles
|
|
883
|
+
|
|
884
|
+
def getAllInputFiles(self):
|
|
885
|
+
"""
|
|
886
|
+
_getAllInputFiles_
|
|
887
|
+
|
|
888
|
+
Gets all the input files
|
|
889
|
+
"""
|
|
890
|
+
|
|
891
|
+
listOfFiles = []
|
|
892
|
+
for step in self.listSteps():
|
|
893
|
+
tmp = self.getInputFilesFromStep(stepName=step)
|
|
894
|
+
if tmp:
|
|
895
|
+
listOfFiles.extend(tmp)
|
|
896
|
+
|
|
897
|
+
return listOfFiles
|
|
898
|
+
|
|
899
|
+
def getInputFilesFromStep(self, stepName, inputSource=None):
|
|
900
|
+
"""
|
|
901
|
+
_getInputFilesFromStep_
|
|
902
|
+
|
|
903
|
+
Retrieve a list of input files from the given step.
|
|
904
|
+
"""
|
|
905
|
+
step = self.retrieveStep(stepName)
|
|
906
|
+
|
|
907
|
+
if inputSource is None:
|
|
908
|
+
inputSources = step.input.listSections_()
|
|
909
|
+
else:
|
|
910
|
+
inputSources = [inputSource]
|
|
911
|
+
|
|
912
|
+
inputFiles = []
|
|
913
|
+
for inputSource in inputSources:
|
|
914
|
+
source = getattr(step.input, inputSource)
|
|
915
|
+
for fileNum in range(source.files.fileCount):
|
|
916
|
+
fwjrFile = getattr(source.files, "file%d" % fileNum)
|
|
917
|
+
|
|
918
|
+
lfn = getattr(fwjrFile, "lfn", None)
|
|
919
|
+
pfn = getattr(fwjrFile, "pfn", None)
|
|
920
|
+
size = getattr(fwjrFile, "size", 0)
|
|
921
|
+
events = getattr(fwjrFile, "events", 0)
|
|
922
|
+
branches = getattr(fwjrFile, "branches", [])
|
|
923
|
+
catalog = getattr(fwjrFile, "catalog", None)
|
|
924
|
+
guid = getattr(fwjrFile, "guid", None)
|
|
925
|
+
inputSourceClass = getattr(fwjrFile, "input_source_class", None)
|
|
926
|
+
moduleLabel = getattr(fwjrFile, "module_label", None)
|
|
927
|
+
inputType = getattr(fwjrFile, "input_type", None)
|
|
928
|
+
|
|
929
|
+
inputFile = File(lfn=lfn, size=size, events=events)
|
|
930
|
+
inputFile["pfn"] = pfn
|
|
931
|
+
inputFile["branches"] = branches
|
|
932
|
+
inputFile["catalog"] = catalog
|
|
933
|
+
inputFile["guid"] = guid
|
|
934
|
+
inputFile["input_source_class"] = inputSourceClass
|
|
935
|
+
inputFile["module_label"] = moduleLabel
|
|
936
|
+
inputFile["input_type"] = inputType
|
|
937
|
+
|
|
938
|
+
runSection = getattr(fwjrFile, "runs")
|
|
939
|
+
runNumbers = runSection.listSections_()
|
|
940
|
+
|
|
941
|
+
for runNumber in runNumbers:
|
|
942
|
+
lumiTuple = getattr(runSection, str(runNumber))
|
|
943
|
+
inputFile.addRun(Run(int(runNumber), *lumiTuple))
|
|
944
|
+
|
|
945
|
+
inputFiles.append(inputFile)
|
|
946
|
+
|
|
947
|
+
return inputFiles
|
|
948
|
+
|
|
949
|
+
def getFilesFromOutputModule(self, step, outputModule):
|
|
950
|
+
"""
|
|
951
|
+
_getFilesFromOutputModule_
|
|
952
|
+
|
|
953
|
+
Grab all the files in a particular output module
|
|
954
|
+
"""
|
|
955
|
+
|
|
956
|
+
outputMod = self.getOutputModule(step=step, outputModule=outputModule)
|
|
957
|
+
|
|
958
|
+
if not outputMod:
|
|
959
|
+
return []
|
|
960
|
+
|
|
961
|
+
listOfFiles = []
|
|
962
|
+
for n in range(outputMod.files.fileCount):
|
|
963
|
+
aFile = self.getOutputFile(fileName='file%i' % (n), outputModule=outputModule, step=step)
|
|
964
|
+
if aFile:
|
|
965
|
+
listOfFiles.append(aFile)
|
|
966
|
+
else:
|
|
967
|
+
msg = "Could not find file%i in module" % (n)
|
|
968
|
+
logging.error(msg)
|
|
969
|
+
return []
|
|
970
|
+
|
|
971
|
+
return listOfFiles
|
|
972
|
+
|
|
973
|
+
def getAllSkippedFiles(self):
|
|
974
|
+
"""
|
|
975
|
+
_getAllSkippedFiles_
|
|
976
|
+
|
|
977
|
+
Get a list of LFNs for all the input files
|
|
978
|
+
listed as skipped on the report.
|
|
979
|
+
"""
|
|
980
|
+
listOfFiles = []
|
|
981
|
+
for step in self.listSteps():
|
|
982
|
+
tmp = self.getSkippedFilesFromStep(stepName=step)
|
|
983
|
+
if tmp:
|
|
984
|
+
listOfFiles.extend(tmp)
|
|
985
|
+
|
|
986
|
+
return listOfFiles
|
|
987
|
+
|
|
988
|
+
def getAllFallbackFiles(self):
|
|
989
|
+
"""
|
|
990
|
+
_getAllFallbackFiles_
|
|
991
|
+
|
|
992
|
+
Get a list of LFNs for all the input files
|
|
993
|
+
listed as fallback attempt on the report
|
|
994
|
+
"""
|
|
995
|
+
listOfFiles = []
|
|
996
|
+
for step in self.listSteps():
|
|
997
|
+
tmp = self.getFallbackFilesFromStep(stepName=step)
|
|
998
|
+
if tmp:
|
|
999
|
+
listOfFiles.extend(tmp)
|
|
1000
|
+
|
|
1001
|
+
return listOfFiles
|
|
1002
|
+
|
|
1003
|
+
def getSkippedFilesFromStep(self, stepName):
|
|
1004
|
+
"""
|
|
1005
|
+
_getSkippedFilesFromStep_
|
|
1006
|
+
|
|
1007
|
+
Get a list of LFNs skipped in the given step
|
|
1008
|
+
"""
|
|
1009
|
+
skippedFiles = []
|
|
1010
|
+
|
|
1011
|
+
step = self.retrieveStep(stepName)
|
|
1012
|
+
|
|
1013
|
+
filesSection = step.skipped.files
|
|
1014
|
+
fileCount = getattr(filesSection, "fileCount", 0)
|
|
1015
|
+
|
|
1016
|
+
for fileNum in range(fileCount):
|
|
1017
|
+
fileSection = getattr(filesSection, "file%d" % fileNum)
|
|
1018
|
+
lfn = getattr(fileSection, "LogicalFileName", None)
|
|
1019
|
+
if lfn is not None:
|
|
1020
|
+
skippedFiles.append(lfn)
|
|
1021
|
+
else:
|
|
1022
|
+
logging.error("Found no LFN in file %s", str(fileSection))
|
|
1023
|
+
|
|
1024
|
+
return skippedFiles
|
|
1025
|
+
|
|
1026
|
+
def getFallbackFilesFromStep(self, stepName):
|
|
1027
|
+
"""
|
|
1028
|
+
_getFallbackFilesFromStep_
|
|
1029
|
+
|
|
1030
|
+
Get a list of LFNs which triggered a fallback in the given step
|
|
1031
|
+
"""
|
|
1032
|
+
fallbackFiles = []
|
|
1033
|
+
|
|
1034
|
+
step = self.retrieveStep(stepName)
|
|
1035
|
+
try:
|
|
1036
|
+
filesSection = step.fallback.files
|
|
1037
|
+
except AttributeError:
|
|
1038
|
+
return fallbackFiles
|
|
1039
|
+
fileCount = getattr(filesSection, "fileCount", 0)
|
|
1040
|
+
|
|
1041
|
+
for fileNum in range(fileCount):
|
|
1042
|
+
fileSection = getattr(filesSection, "file%d" % fileNum)
|
|
1043
|
+
lfn = getattr(fileSection, "LogicalFileName", None)
|
|
1044
|
+
if lfn is not None:
|
|
1045
|
+
fallbackFiles.append(lfn)
|
|
1046
|
+
else:
|
|
1047
|
+
logging.error("Found no LFN in file %s", str(fileSection))
|
|
1048
|
+
|
|
1049
|
+
return fallbackFiles
|
|
1050
|
+
|
|
1051
|
+
def getStepErrors(self, stepName):
|
|
1052
|
+
"""
|
|
1053
|
+
_getStepErrors_
|
|
1054
|
+
|
|
1055
|
+
Get all errors for a given step
|
|
1056
|
+
"""
|
|
1057
|
+
if self.retrieveStep(stepName) is None:
|
|
1058
|
+
# Create a step and set it to failed
|
|
1059
|
+
# Assumption: Adding an error fails a step
|
|
1060
|
+
self.addStep(stepName, status=1)
|
|
1061
|
+
|
|
1062
|
+
stepSection = self.retrieveStep(stepName)
|
|
1063
|
+
|
|
1064
|
+
errorCount = getattr(stepSection.errors, "errorCount", 0)
|
|
1065
|
+
if errorCount == 0:
|
|
1066
|
+
return {}
|
|
1067
|
+
else:
|
|
1068
|
+
return stepSection.errors.dictionary_()
|
|
1069
|
+
|
|
1070
|
+
def stepSuccessful(self, stepName):
|
|
1071
|
+
"""
|
|
1072
|
+
_stepSuccessful_
|
|
1073
|
+
|
|
1074
|
+
Determine wether or not a step was successful.
|
|
1075
|
+
"""
|
|
1076
|
+
stepReport = self.retrieveStep(step=stepName)
|
|
1077
|
+
status = getattr(stepReport, 'status', 1)
|
|
1078
|
+
# We have too many possibilities
|
|
1079
|
+
if status not in [0, '0', 'success', 'Success']:
|
|
1080
|
+
return False
|
|
1081
|
+
|
|
1082
|
+
return True
|
|
1083
|
+
|
|
1084
|
+
def taskSuccessful(self, ignoreString='logArch'):
|
|
1085
|
+
"""
|
|
1086
|
+
_taskSuccessful_
|
|
1087
|
+
|
|
1088
|
+
Return True if all steps successful, False otherwise
|
|
1089
|
+
"""
|
|
1090
|
+
value = True
|
|
1091
|
+
|
|
1092
|
+
if len(self.listSteps()) == 0:
|
|
1093
|
+
# Mark jobs as failed if they have no steps
|
|
1094
|
+
msg = "Could not find any steps"
|
|
1095
|
+
logging.error(msg)
|
|
1096
|
+
return False
|
|
1097
|
+
|
|
1098
|
+
for stepName in self.listSteps():
|
|
1099
|
+
# Ignore specified steps
|
|
1100
|
+
# i.e., logArch steps can fail without causing
|
|
1101
|
+
# the task to fail
|
|
1102
|
+
if ignoreString and re.search(ignoreString, stepName):
|
|
1103
|
+
continue
|
|
1104
|
+
if not self.stepSuccessful(stepName=stepName):
|
|
1105
|
+
value = False
|
|
1106
|
+
|
|
1107
|
+
return value
|
|
1108
|
+
|
|
1109
|
+
def getAnalysisFilesFromStep(self, step):
|
|
1110
|
+
"""
|
|
1111
|
+
_getAnalysisFilesFromStep_
|
|
1112
|
+
|
|
1113
|
+
Retrieve a list of all the analysis files produced in a step.
|
|
1114
|
+
"""
|
|
1115
|
+
stepReport = self.retrieveStep(step=step)
|
|
1116
|
+
|
|
1117
|
+
if not stepReport or not hasattr(stepReport.analysis, 'files'):
|
|
1118
|
+
return []
|
|
1119
|
+
|
|
1120
|
+
analysisFiles = stepReport.analysis.files
|
|
1121
|
+
|
|
1122
|
+
results = []
|
|
1123
|
+
for fileNum in range(analysisFiles.fileCount):
|
|
1124
|
+
results.append(getattr(analysisFiles, "file%s" % fileNum))
|
|
1125
|
+
|
|
1126
|
+
# filter out duplicates
|
|
1127
|
+
duplicateCheck = []
|
|
1128
|
+
filteredResults = []
|
|
1129
|
+
for result in results:
|
|
1130
|
+
inputtag = getattr(result, 'inputtag', None)
|
|
1131
|
+
if (result.fileName, inputtag) not in duplicateCheck:
|
|
1132
|
+
duplicateCheck.append((result.fileName, inputtag))
|
|
1133
|
+
filteredResults.append(result)
|
|
1134
|
+
|
|
1135
|
+
return filteredResults
|
|
1136
|
+
|
|
1137
|
+
def getAllFileRefsFromStep(self, step):
|
|
1138
|
+
"""
|
|
1139
|
+
_getAllFileRefsFromStep_
|
|
1140
|
+
|
|
1141
|
+
Retrieve a list of all files produced in a step. The files will be in
|
|
1142
|
+
the form of references to the ConfigSection objects in the acutal
|
|
1143
|
+
report.
|
|
1144
|
+
"""
|
|
1145
|
+
stepReport = self.retrieveStep(step=step)
|
|
1146
|
+
if not stepReport:
|
|
1147
|
+
return []
|
|
1148
|
+
|
|
1149
|
+
outputModules = getattr(stepReport, "outputModules", [])
|
|
1150
|
+
fileRefs = []
|
|
1151
|
+
for outputModule in outputModules:
|
|
1152
|
+
outputModuleRef = self.getOutputModule(step=step, outputModule=outputModule)
|
|
1153
|
+
|
|
1154
|
+
for i in range(outputModuleRef.files.fileCount):
|
|
1155
|
+
fileRefs.append(getattr(outputModuleRef.files, "file%i" % i))
|
|
1156
|
+
|
|
1157
|
+
analysisFiles = self.getAnalysisFilesFromStep(step)
|
|
1158
|
+
fileRefs.extend(analysisFiles)
|
|
1159
|
+
|
|
1160
|
+
return fileRefs
|
|
1161
|
+
|
|
1162
|
+
def addInfoToOutputFilesForStep(self, stepName, step):
|
|
1163
|
+
"""
|
|
1164
|
+
_addInfoToOutputFilesForStep_
|
|
1165
|
+
|
|
1166
|
+
Add the information missing from output files to the files
|
|
1167
|
+
This requires the WMStep to be passed in
|
|
1168
|
+
"""
|
|
1169
|
+
|
|
1170
|
+
stepReport = self.retrieveStep(step=stepName)
|
|
1171
|
+
fileInfo = FileInfo()
|
|
1172
|
+
|
|
1173
|
+
if not stepReport:
|
|
1174
|
+
return
|
|
1175
|
+
|
|
1176
|
+
listOfModules = getattr(stepReport, 'outputModules', None)
|
|
1177
|
+
|
|
1178
|
+
for module in listOfModules:
|
|
1179
|
+
outputMod = getattr(stepReport.output, module, None)
|
|
1180
|
+
for n in range(outputMod.files.fileCount):
|
|
1181
|
+
aFile = getattr(outputMod.files, 'file%i' % n, None)
|
|
1182
|
+
if not aFile:
|
|
1183
|
+
msg = "Could not find file%i in module" % n
|
|
1184
|
+
logging.error(msg)
|
|
1185
|
+
return
|
|
1186
|
+
fileInfo(fileReport=aFile, step=step, outputModule=module)
|
|
1187
|
+
|
|
1188
|
+
return
|
|
1189
|
+
|
|
1190
|
+
def deleteOutputModuleForStep(self, stepName, moduleName):
|
|
1191
|
+
"""
|
|
1192
|
+
_deleteOutputModuleForStep_
|
|
1193
|
+
|
|
1194
|
+
Delete any reference to the given output module in the step report
|
|
1195
|
+
that includes deleting any output file it produced
|
|
1196
|
+
"""
|
|
1197
|
+
stepReport = self.retrieveStep(step=stepName)
|
|
1198
|
+
|
|
1199
|
+
if not stepReport:
|
|
1200
|
+
return
|
|
1201
|
+
|
|
1202
|
+
listOfModules = getattr(stepReport, 'outputModules', [])
|
|
1203
|
+
|
|
1204
|
+
if moduleName not in listOfModules:
|
|
1205
|
+
return
|
|
1206
|
+
|
|
1207
|
+
delattr(stepReport.output, moduleName)
|
|
1208
|
+
listOfModules.remove(moduleName)
|
|
1209
|
+
|
|
1210
|
+
return
|
|
1211
|
+
|
|
1212
|
+
def setStepStartTime(self, stepName):
|
|
1213
|
+
"""
|
|
1214
|
+
_setStepStatus_
|
|
1215
|
+
|
|
1216
|
+
Set the startTime for a step.
|
|
1217
|
+
"""
|
|
1218
|
+
reportStep = self.retrieveStep(stepName)
|
|
1219
|
+
reportStep.startTime = time.time()
|
|
1220
|
+
return
|
|
1221
|
+
|
|
1222
|
+
def setStepStopTime(self, stepName):
|
|
1223
|
+
"""
|
|
1224
|
+
_setStepStatus_
|
|
1225
|
+
|
|
1226
|
+
Set the stopTime for a step.
|
|
1227
|
+
"""
|
|
1228
|
+
reportStep = self.retrieveStep(stepName)
|
|
1229
|
+
reportStep.stopTime = time.time()
|
|
1230
|
+
return
|
|
1231
|
+
|
|
1232
|
+
def getTimes(self, stepName):
|
|
1233
|
+
"""
|
|
1234
|
+
_getTimes_
|
|
1235
|
+
|
|
1236
|
+
Return a dictionary with the start and stop times
|
|
1237
|
+
"""
|
|
1238
|
+
reportStep = self.retrieveStep(stepName)
|
|
1239
|
+
|
|
1240
|
+
startTime = getattr(reportStep, 'startTime', None)
|
|
1241
|
+
stopTime = getattr(reportStep, 'stopTime', None)
|
|
1242
|
+
|
|
1243
|
+
return {'startTime': startTime, 'stopTime': stopTime}
|
|
1244
|
+
|
|
1245
|
+
def getFirstStartLastStop(self):
|
|
1246
|
+
"""
|
|
1247
|
+
_getFirstStartLastStop_
|
|
1248
|
+
|
|
1249
|
+
Get the first startTime, last stopTime
|
|
1250
|
+
"""
|
|
1251
|
+
|
|
1252
|
+
steps = self.listSteps()
|
|
1253
|
+
|
|
1254
|
+
if len(steps) < 1:
|
|
1255
|
+
return None
|
|
1256
|
+
|
|
1257
|
+
firstStep = self.getTimes(stepName=steps[0])
|
|
1258
|
+
startTime = firstStep['startTime']
|
|
1259
|
+
stopTime = firstStep['stopTime']
|
|
1260
|
+
|
|
1261
|
+
for stepName in steps:
|
|
1262
|
+
timeStamps = self.getTimes(stepName=stepName)
|
|
1263
|
+
if timeStamps['startTime'] is None or timeStamps['stopTime'] is None:
|
|
1264
|
+
# Unusable times
|
|
1265
|
+
continue
|
|
1266
|
+
if startTime is None or startTime > timeStamps['startTime']:
|
|
1267
|
+
startTime = timeStamps['startTime']
|
|
1268
|
+
if stopTime is None or stopTime < timeStamps['stopTime']:
|
|
1269
|
+
stopTime = timeStamps['stopTime']
|
|
1270
|
+
|
|
1271
|
+
return {'startTime': startTime, 'stopTime': stopTime}
|
|
1272
|
+
|
|
1273
|
+
def setTaskName(self, taskName):
|
|
1274
|
+
"""
|
|
1275
|
+
_setTaskName_
|
|
1276
|
+
|
|
1277
|
+
Set the task name for the report
|
|
1278
|
+
"""
|
|
1279
|
+
self.data.task = taskName
|
|
1280
|
+
return
|
|
1281
|
+
|
|
1282
|
+
def getTaskName(self):
|
|
1283
|
+
"""
|
|
1284
|
+
_getTaskName_
|
|
1285
|
+
|
|
1286
|
+
Return the task name
|
|
1287
|
+
"""
|
|
1288
|
+
return getattr(self.data, 'task', None)
|
|
1289
|
+
|
|
1290
|
+
def setJobID(self, jobID):
|
|
1291
|
+
"""
|
|
1292
|
+
_setJobID_
|
|
1293
|
+
|
|
1294
|
+
Set the WMBS jobID
|
|
1295
|
+
"""
|
|
1296
|
+
|
|
1297
|
+
self.data.jobID = jobID
|
|
1298
|
+
return
|
|
1299
|
+
|
|
1300
|
+
def getJobID(self):
|
|
1301
|
+
"""
|
|
1302
|
+
_getJobID_
|
|
1303
|
+
|
|
1304
|
+
Get the WMBS job ID if attached
|
|
1305
|
+
"""
|
|
1306
|
+
|
|
1307
|
+
return getattr(self.data, 'jobID', None)
|
|
1308
|
+
|
|
1309
|
+
def getAllFileRefs(self):
|
|
1310
|
+
"""
|
|
1311
|
+
_getAllFileRefs_
|
|
1312
|
+
|
|
1313
|
+
Get references for all file in the step
|
|
1314
|
+
"""
|
|
1315
|
+
|
|
1316
|
+
fileRefs = []
|
|
1317
|
+
for step in self.listSteps():
|
|
1318
|
+
tmpRefs = self.getAllFileRefsFromStep(step=step)
|
|
1319
|
+
if len(tmpRefs) > 0:
|
|
1320
|
+
fileRefs.extend(tmpRefs)
|
|
1321
|
+
|
|
1322
|
+
return fileRefs
|
|
1323
|
+
|
|
1324
|
+
def setAcquisitionProcessing(self, acquisitionEra, processingVer, processingStr=None):
|
|
1325
|
+
"""
|
|
1326
|
+
_setAcquisitionProcessing_
|
|
1327
|
+
|
|
1328
|
+
Set the acquisition and processing era for every output file
|
|
1329
|
+
ONLY run this after all files have been accumulated; it doesn't
|
|
1330
|
+
set things for future files.
|
|
1331
|
+
"""
|
|
1332
|
+
fileRefs = self.getAllFileRefs()
|
|
1333
|
+
|
|
1334
|
+
# Should now have all the fileRefs
|
|
1335
|
+
for f in fileRefs:
|
|
1336
|
+
f.acquisitionEra = acquisitionEra
|
|
1337
|
+
f.processingVer = processingVer
|
|
1338
|
+
f.processingStr = processingStr
|
|
1339
|
+
|
|
1340
|
+
return
|
|
1341
|
+
|
|
1342
|
+
def updateSubprocessInfo(self, sysTime, userTime, startTime, endTime):
|
|
1343
|
+
"""
|
|
1344
|
+
Add process information to WMCore FJR
|
|
1345
|
+
:param sysTime: systtem time reported by subprocess job
|
|
1346
|
+
:param userTime: user time reported by subprocess job
|
|
1347
|
+
:param startTime: start time of subprocess (in seconds)
|
|
1348
|
+
:param endTime: endtime time of subprocess (in seconds)
|
|
1349
|
+
"""
|
|
1350
|
+
self.report.section_('WMCMSSWSubprocess')
|
|
1351
|
+
self.report.WMCMSSWSubprocess.startTime = startTime
|
|
1352
|
+
self.report.WMCMSSWSubprocess.endTime = endTime
|
|
1353
|
+
self.report.WMCMSSWSubprocess.wallClockTime = endTime - startTime
|
|
1354
|
+
self.report.WMCMSSWSubprocess.userTime = userTime
|
|
1355
|
+
self.report.WMCMSSWSubprocess.sysTime = sysTime
|
|
1356
|
+
|
|
1357
|
+
def setValidStatus(self, validStatus):
|
|
1358
|
+
"""
|
|
1359
|
+
_setValidStatus_
|
|
1360
|
+
|
|
1361
|
+
Set the validStatus for all steps and all files.
|
|
1362
|
+
ONLY run this after all files have been attached.
|
|
1363
|
+
"""
|
|
1364
|
+
|
|
1365
|
+
fileRefs = self.getAllFileRefs()
|
|
1366
|
+
|
|
1367
|
+
# Should now have all the fileRefs
|
|
1368
|
+
for f in fileRefs:
|
|
1369
|
+
f.validStatus = validStatus
|
|
1370
|
+
|
|
1371
|
+
return
|
|
1372
|
+
|
|
1373
|
+
def setGlobalTag(self, globalTag):
|
|
1374
|
+
"""
|
|
1375
|
+
_setGlobalTag_
|
|
1376
|
+
|
|
1377
|
+
Set the global Tag from the spec on the WN
|
|
1378
|
+
ONLY run this after all the files have been attached
|
|
1379
|
+
"""
|
|
1380
|
+
|
|
1381
|
+
fileRefs = self.getAllFileRefs()
|
|
1382
|
+
|
|
1383
|
+
# Should now have all the fileRefs
|
|
1384
|
+
for f in fileRefs:
|
|
1385
|
+
f.globalTag = globalTag
|
|
1386
|
+
|
|
1387
|
+
return
|
|
1388
|
+
|
|
1389
|
+
def setCampaign(self, campaign):
|
|
1390
|
+
"""
|
|
1391
|
+
_setCampaign_
|
|
1392
|
+
Set the campaign for the report
|
|
1393
|
+
"""
|
|
1394
|
+
self.data.campaign = campaign
|
|
1395
|
+
return
|
|
1396
|
+
|
|
1397
|
+
def getCampaign(self):
|
|
1398
|
+
"""
|
|
1399
|
+
_getCampaign_
|
|
1400
|
+
Return the campaign
|
|
1401
|
+
"""
|
|
1402
|
+
return getattr(self.data, 'campaign', "")
|
|
1403
|
+
|
|
1404
|
+
def setPrepID(self, prep_id):
|
|
1405
|
+
"""
|
|
1406
|
+
_setGlobalTag_
|
|
1407
|
+
|
|
1408
|
+
Set the global Tag from the spec on the WN
|
|
1409
|
+
ONLY run this after all the files have been attached
|
|
1410
|
+
"""
|
|
1411
|
+
|
|
1412
|
+
fileRefs = self.getAllFileRefs()
|
|
1413
|
+
|
|
1414
|
+
# Should now have all the fileRefs
|
|
1415
|
+
for f in fileRefs:
|
|
1416
|
+
f.prep_id = prep_id
|
|
1417
|
+
|
|
1418
|
+
self.data.prep_id = prep_id
|
|
1419
|
+
return
|
|
1420
|
+
|
|
1421
|
+
def getPrepID(self):
|
|
1422
|
+
"""
|
|
1423
|
+
_getPrepID_
|
|
1424
|
+
|
|
1425
|
+
Return the PrepID
|
|
1426
|
+
"""
|
|
1427
|
+
return getattr(self.data, 'prep_id', "")
|
|
1428
|
+
|
|
1429
|
+
def getWMTiming(self):
|
|
1430
|
+
"""
|
|
1431
|
+
Returns a WMTiming metrics
|
|
1432
|
+
:return: dictionary of WMTiming metrics
|
|
1433
|
+
"""
|
|
1434
|
+
data = getattr(self.data, 'WMTiming', {})
|
|
1435
|
+
if isinstance(data, dict):
|
|
1436
|
+
return data
|
|
1437
|
+
return data.dictionary_()
|
|
1438
|
+
|
|
1439
|
+
def setConfigURL(self, configURL):
|
|
1440
|
+
"""
|
|
1441
|
+
_setConfigURL_
|
|
1442
|
+
|
|
1443
|
+
Set the config URL in a portable storage form
|
|
1444
|
+
"""
|
|
1445
|
+
|
|
1446
|
+
fileRefs = self.getAllFileRefs()
|
|
1447
|
+
|
|
1448
|
+
# Should now have all the fileRefs
|
|
1449
|
+
for f in fileRefs:
|
|
1450
|
+
f.configURL = configURL
|
|
1451
|
+
|
|
1452
|
+
return
|
|
1453
|
+
|
|
1454
|
+
def setInputDataset(self, inputPath):
|
|
1455
|
+
"""
|
|
1456
|
+
_setInputDataset_
|
|
1457
|
+
|
|
1458
|
+
Set the input dataset path for the task in each file
|
|
1459
|
+
"""
|
|
1460
|
+
|
|
1461
|
+
fileRefs = self.getAllFileRefs()
|
|
1462
|
+
|
|
1463
|
+
# Should now have all the fileRefs
|
|
1464
|
+
for f in fileRefs:
|
|
1465
|
+
f.inputPath = inputPath
|
|
1466
|
+
return
|
|
1467
|
+
|
|
1468
|
+
def setStepRSS(self, stepName, minimum, maximum, average):
|
|
1469
|
+
"""
|
|
1470
|
+
_setStepRSS_
|
|
1471
|
+
|
|
1472
|
+
Set the Performance RSS information
|
|
1473
|
+
"""
|
|
1474
|
+
|
|
1475
|
+
reportStep = self.retrieveStep(stepName)
|
|
1476
|
+
reportStep.performance.section_('RSSMemory')
|
|
1477
|
+
reportStep.performance.RSSMemory.min = minimum
|
|
1478
|
+
reportStep.performance.RSSMemory.max = maximum
|
|
1479
|
+
reportStep.performance.RSSMemory.average = average
|
|
1480
|
+
|
|
1481
|
+
return
|
|
1482
|
+
|
|
1483
|
+
def setStepPMEM(self, stepName, minimum, maximum, average):
|
|
1484
|
+
"""
|
|
1485
|
+
_setStepPMEM_
|
|
1486
|
+
|
|
1487
|
+
Set the Performance PMEM information
|
|
1488
|
+
"""
|
|
1489
|
+
|
|
1490
|
+
reportStep = self.retrieveStep(stepName)
|
|
1491
|
+
reportStep.performance.section_('PhysicalMemory')
|
|
1492
|
+
reportStep.performance.PhysicalMemory.min = minimum
|
|
1493
|
+
reportStep.performance.PhysicalMemory.max = maximum
|
|
1494
|
+
reportStep.performance.PhysicalMemory.average = average
|
|
1495
|
+
|
|
1496
|
+
return
|
|
1497
|
+
|
|
1498
|
+
def setStepPCPU(self, stepName, minimum, maximum, average):
|
|
1499
|
+
"""
|
|
1500
|
+
_setStepPCPU_
|
|
1501
|
+
|
|
1502
|
+
Set the Performance PCPU information
|
|
1503
|
+
"""
|
|
1504
|
+
|
|
1505
|
+
reportStep = self.retrieveStep(stepName)
|
|
1506
|
+
reportStep.performance.section_('PercentCPU')
|
|
1507
|
+
reportStep.performance.PercentCPU.min = minimum
|
|
1508
|
+
reportStep.performance.PercentCPU.max = maximum
|
|
1509
|
+
reportStep.performance.PercentCPU.average = average
|
|
1510
|
+
|
|
1511
|
+
return
|
|
1512
|
+
|
|
1513
|
+
def setStepVSize(self, stepName, minimum, maximum, average):
|
|
1514
|
+
"""
|
|
1515
|
+
_setStepVSize_
|
|
1516
|
+
|
|
1517
|
+
Set the Performance PCPU information
|
|
1518
|
+
"""
|
|
1519
|
+
|
|
1520
|
+
reportStep = self.retrieveStep(stepName)
|
|
1521
|
+
reportStep.performance.section_('VSizeMemory')
|
|
1522
|
+
reportStep.performance.VSizeMemory.min = minimum
|
|
1523
|
+
reportStep.performance.VSizeMemory.max = maximum
|
|
1524
|
+
reportStep.performance.VSizeMemory.average = average
|
|
1525
|
+
|
|
1526
|
+
return
|
|
1527
|
+
|
|
1528
|
+
def setStepCounter(self, stepName, counter):
|
|
1529
|
+
"""
|
|
1530
|
+
_setStepCounter_
|
|
1531
|
+
|
|
1532
|
+
Assign a number to the step
|
|
1533
|
+
"""
|
|
1534
|
+
|
|
1535
|
+
reportStep = self.retrieveStep(stepName)
|
|
1536
|
+
reportStep.counter = counter
|
|
1537
|
+
|
|
1538
|
+
return
|
|
1539
|
+
|
|
1540
|
+
def checkForAdlerChecksum(self, stepName):
|
|
1541
|
+
"""
|
|
1542
|
+
_checkForAdlerChecksum_
|
|
1543
|
+
|
|
1544
|
+
Some steps require that all output files have adler checksums
|
|
1545
|
+
This will go through all output files in a step and make sure they
|
|
1546
|
+
have an adler32 checksum. If they don't it creates an error with
|
|
1547
|
+
code 60451 for the step, failing it.
|
|
1548
|
+
"""
|
|
1549
|
+
error = None
|
|
1550
|
+
files = self.getAllFilesFromStep(step=stepName)
|
|
1551
|
+
for f in files:
|
|
1552
|
+
if 'adler32' not in f.get('checksums', {}):
|
|
1553
|
+
error = f.get('lfn', None)
|
|
1554
|
+
elif f['checksums']['adler32'] is None:
|
|
1555
|
+
error = f.get('lfn', None)
|
|
1556
|
+
|
|
1557
|
+
if error:
|
|
1558
|
+
msg = '%s, file was %s' % (WM_JOB_ERROR_CODES[60451], error)
|
|
1559
|
+
self.addError(stepName, 60451, "NoAdler32Checksum", msg)
|
|
1560
|
+
self.setStepStatus(stepName=stepName, status=60451)
|
|
1561
|
+
|
|
1562
|
+
return
|
|
1563
|
+
|
|
1564
|
+
def checkForRunLumiInformation(self, stepName):
|
|
1565
|
+
"""
|
|
1566
|
+
_checkForRunLumiInformation_
|
|
1567
|
+
|
|
1568
|
+
Some steps require that all output files have run lumi information.
|
|
1569
|
+
This will go through all output files in a step and make sure
|
|
1570
|
+
they have run/lumi informaiton. If they don't it creates an error
|
|
1571
|
+
with code 70452 for the step, failing it.
|
|
1572
|
+
|
|
1573
|
+
"""
|
|
1574
|
+
error = None
|
|
1575
|
+
files = self.getAllFilesFromStep(step=stepName)
|
|
1576
|
+
for f in files:
|
|
1577
|
+
if not f.get('runs', None):
|
|
1578
|
+
error = f.get('lfn', None)
|
|
1579
|
+
else:
|
|
1580
|
+
for run in f['runs']:
|
|
1581
|
+
lumis = run.lumis
|
|
1582
|
+
if not lumis:
|
|
1583
|
+
error = f.get('lfn', None)
|
|
1584
|
+
break
|
|
1585
|
+
if error:
|
|
1586
|
+
msg = '%s, file was %s' % (WM_JOB_ERROR_CODES[70452], error)
|
|
1587
|
+
self.addError(stepName, 70452, "NoRunLumiInformation", msg)
|
|
1588
|
+
self.setStepStatus(stepName=stepName, status=70452)
|
|
1589
|
+
return
|
|
1590
|
+
|
|
1591
|
+
def checkForOutputFiles(self, stepName):
|
|
1592
|
+
"""
|
|
1593
|
+
_checkForOutputFiles_
|
|
1594
|
+
|
|
1595
|
+
Verify that there is at least an output file, either from
|
|
1596
|
+
analysis or from an output module.
|
|
1597
|
+
"""
|
|
1598
|
+
files = self.getAllFilesFromStep(step=stepName)
|
|
1599
|
+
analysisFiles = self.getAnalysisFilesFromStep(step=stepName)
|
|
1600
|
+
if len(files) == 0 and len(analysisFiles) == 0:
|
|
1601
|
+
msg = WM_JOB_ERROR_CODES[60450]
|
|
1602
|
+
msg += "\nList of skipped files is:\n"
|
|
1603
|
+
for skipF in self.getSkippedFilesFromStep(stepName=stepName):
|
|
1604
|
+
msg += " %s\n" % skipF
|
|
1605
|
+
self.addError(stepName, 60450, "NoOutput", msg)
|
|
1606
|
+
self.setStepStatus(stepName=stepName, status=60450)
|
|
1607
|
+
return
|
|
1608
|
+
|
|
1609
|
+
def stripInputFiles(self):
|
|
1610
|
+
"""
|
|
1611
|
+
_stripInputFiles_
|
|
1612
|
+
|
|
1613
|
+
If we need to compact the FWJR the easiest way is just to
|
|
1614
|
+
trim the number of input files.
|
|
1615
|
+
"""
|
|
1616
|
+
|
|
1617
|
+
for stepName in self.listSteps():
|
|
1618
|
+
step = self.retrieveStep(stepName)
|
|
1619
|
+
inputSources = step.input.listSections_()
|
|
1620
|
+
for inputSource in inputSources:
|
|
1621
|
+
source = getattr(step.input, inputSource)
|
|
1622
|
+
for fileNum in range(source.files.fileCount):
|
|
1623
|
+
delattr(source.files, "file%d" % fileNum)
|
|
1624
|
+
source.files.fileCount = 0
|
|
1625
|
+
return
|
|
1626
|
+
|
|
1627
|
+
def getWorkerNodeInfo(self):
|
|
1628
|
+
wnInfo = {"HostName": getattr(self.data, 'hostName', ''),
|
|
1629
|
+
"MachineFeatures": getattr(self.data, 'machineFeatures', {}),
|
|
1630
|
+
"JobFeatures": getattr(self.data, 'jobFeatures', {})}
|
|
1631
|
+
|
|
1632
|
+
return wnInfo
|
|
1633
|
+
|
|
1634
|
+
def setLogURL(self, url):
|
|
1635
|
+
"""
|
|
1636
|
+
Set log url for the this job report.
|
|
1637
|
+
https://eoscmsweb.cern.ch/eos/cms/store/logs/prod/recent/
|
|
1638
|
+
"""
|
|
1639
|
+
self.data.logURL = url
|
|
1640
|
+
|
|
1641
|
+
def getLogURL(self):
|
|
1642
|
+
"""
|
|
1643
|
+
_getLogURL_
|
|
1644
|
+
Return the log URL
|
|
1645
|
+
"""
|
|
1646
|
+
return getattr(self.data, 'logURL', '')
|