Repository: dmwm/wmcore
Issue: Output data placement not skipped for Resubmission workflows

**Impact of the bug**
ReqMgr2MS - MSOutput

**Describe the bug**
Just found Resubmission workflows being considered by MSOutputConsumer and getting multiple data placements done, e.g.
```
2020-10-12 09:18:54,564:INFO:MSOutput: MSOutputConsumer: PipelineNonRelVal: Processed 'msOutDoc' with '_id': cmsunified_ACDC1_task_TOP-RunIISummer19UL18wmLHEGEN-00130__v1_T_200830_005630_9026.
2020-10-12 09:18:54,565:DEBUG:MSOutput: {u'Campaign': u'RunIISummer19UL18wmLHEGEN',
 u'CreationTime': 1602483169,
 u'IsRelVal': False,
 u'LastUpdate': 1602487134,
 u'OutputDatasets': [u'/ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_13TeV-powheg-madspin-pythia8/RunIISummer19UL18RECO-106X_upgrade2018_realistic_v11_L1v1-v1/AODSIM',
                     u'/ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_13TeV-powheg-madspin-pythia8/RunIISummer19UL18MiniAOD-106X_upgrade2018_realistic_v11_L1v1-v1/MINIAODSIM'],
 u'OutputMap': [{u'Campaign': u'RunIISummer19UL18wmLHEGEN',
                 u'Copies': 0,
                 u'Dataset': u'/ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_13TeV-powheg-madspin-pythia8/RunIISummer19UL18RECO-106X_upgrade2018_realistic_v11_L1v1-v1/AODSIM',
                 u'DatasetSize': 0,
                 u'DiskDestination': u'',
                 u'DiskRuleID': u'',
                 u'TapeDestination': u'T1_RU_JINR_Tape',
                 u'TapeRuleID': u'4d3b0bb5c5a240b9b43b4cc1dfa0081c'},
                {u'Campaign': u'RunIISummer19UL18wmLHEGEN',
                 u'Copies': 0,
                 u'Dataset': u'/ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_13TeV-powheg-madspin-pythia8/RunIISummer19UL18MiniAOD-106X_upgrade2018_realistic_v11_L1v1-v1/MINIAODSIM',
                 u'DatasetSize': 0,
                 u'DiskDestination': u'',
                 u'DiskRuleID': u'',
                 u'TapeDestination': u'T1_RU_JINR_Tape',
                 u'TapeRuleID': u'ea1f738911a14e5191e838c78a44d9af'}],
 u'RequestName': u'cmsunified_ACDC1_task_TOP-RunIISummer19UL18wmLHEGEN-00130__v1_T_200830_005630_9026',
 u'RequestType': u'Resubmission',
 u'TransferStatus': u'done',
 u'_id': u'cmsunified_ACDC1_task_TOP-RunIISummer19UL18wmLHEGEN-00130__v1_T_200830_005630_9026'}
```

and this dataset:
```
ID                                ACCOUNT        SCOPE:NAME                                                                                                                                                         STATE[OK/REPL/STUCK]     RSE_EXPRESSION                                 COPIES  EXPIRES (UTC)        CREATED (UTC)
--------------------------------  -------------  -----------------------------------------------------------------------------------------------------------------------------------------------------------------  -----------------------  -------------------------------------------  --------  -------------------  -------------------
6fa5cc1202bd4ba2ba850a5478cd446a  wmcore_output  cms:/ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_13TeV-powheg-madspin-pythia8/RunIISummer19UL18MiniAOD-106X_upgrade2018_realistic_v11_L1v1-v1/MINIAODSIM  OK[211/0/0]              (tier=2|tier=1)&cms_type=real&rse_type=DISK         1  2020-11-11 07:18:58  2020-10-12 07:18:58
0bcdf007064749559c5595c5e24e72d2  wmcore_output  cms:/ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_13TeV-powheg-madspin-pythia8/RunIISummer19UL18MiniAOD-106X_upgrade2018_realistic_v11_L1v1-v1/MINIAODSIM  WAITING_APPROVAL[0/0/0]  T1_DE_KIT_Tape                                      1                       2020-10-12 07:19:02
14ab85bb97da40e888859dc3f6ee0cfb  wmcore_output  cms:/ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_13TeV-powheg-madspin-pythia8/RunIISummer19UL18MiniAOD-106X_upgrade2018_realistic_v11_L1v1-v1/MINIAODSIM  WAITING_APPROVAL[0/0/0]  T1_ES_PIC_Tape                                      1                       2020-10-12 07:18:55
3ba087e814e1409f9985ef25dfe2dadd  wmcore_output  cms:/ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_13TeV-powheg-madspin-pythia8/RunIISummer19UL18MiniAOD-106X_upgrade2018_realistic_v11_L1v1-v1/MINIAODSIM  REPLICATING[196/15/0]    T1_FR_CCIN2P3_Tape                                  1                       2020-10-12 07:19:02
8d4d2666cf94406fb5f4eb586134fb19  wmcore_output  cms:/ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_13TeV-powheg-madspin-pythia8/RunIISummer19UL18MiniAOD-106X_upgrade2018_realistic_v11_L1v1-v1/MINIAODSIM  REPLICATING[175/36/0]    T1_IT_CNAF_Tape                                     1                       2020-10-12 07:18:59
ea1f738911a14e5191e838c78a44d9af  wmcore_output  cms:/ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_13TeV-powheg-madspin-pythia8/RunIISummer19UL18MiniAOD-106X_upgrade2018_realistic_v11_L1v1-v1/MINIAODSIM  REPLICATING[99/112/0]    T1_RU_JINR_Tape                                     1                       2020-10-12 07:18:54
c96a6ff1acc84ea9837e30c8b81abfe2  wmcore_output  cms:/ST_t-channel_top_4f_InclusiveDecays_mtop1755_TuneCP5_13TeV-powheg-madspin-pythia8/RunIISummer19UL18MiniAOD-106X_upgrade2018_realistic_v11_L1v1-v1/MINIAODSIM  WAITING_APPROVAL[0/0/0]  T1_US_FNAL_Tape                                     1                       2020-10-12 07:18:53
```

**How to reproduce it**
close out an ACDC workflow

**Expected behavior**
Resubmission workflows should not have any data placement done.

**Additional context and error message**
Service was enabled in Rucio mode at: `2020-10-12 09:15:25,863`

Changed files:
src/python/WMCore/MicroService/Unified/MSOutput.py

diff --git a/src/python/WMCore/MicroService/Unified/MSOutput.py b/src/python/WMCore/MicroService/Unified/MSOutput.py
index 335f65c96..480e7e2ff 100644
--- a/src/python/WMCore/MicroService/Unified/MSOutput.py
+++ b/src/python/WMCore/MicroService/Unified/MSOutput.py
@@ -915,6 +915,9 @@ class MSOutput(MSCore):
         # it - for the moment - at least.
         if workflow['IsRelVal'] and not self.msConfig['enableRelValCustodial']:
             return False
+        if workflow['RequestType'] == "Resubmission":
+            # their parent/original workflow will take care of all the data placement
+            return False
 
         if dataItem['TapeRuleID']:
             msg = "Output dataset: {} from workflow: {} ".format(dataItem['Dataset'], workflow['RequestName'])