1

Is anyone else experiencing Cumulus CI Flow delays, particularly in deploying force-app data to a newly created scratch org?

Have you ever had a Cumulus CI flow suddenly take a lot longer to run? Was it due to a specific change in the contents of force-app, or a new type of metadata in your sfdx project?

Thanks so much!


Details:

  • What used to take about 10-15 minutes to run has started taking 25 minutes to over an hour to finish running (and then it does run successfully at least...).
  • It seems to get stuck processing "Converting from SFDX to MDAPI format."
  • Similarly, it gets stuck process unpackaged/config files as well in the task: deploy_unpackaged_content (a custom task, see below).

Task "deploy"

[06/02/22 09:38:12] Anonymous Apex Executed Successfully!
Skipping task update_package_xml (skipped unless project_config.project__source_format != "sfdx" or not org_config.scratch)
Skipping task deploy (skipped unless project_config.project__source_format != "sfdx" or not org_config.scratch)
Running task: deploy
Options:
path: force-app
Beginning task: Deploy
Converting from SFDX to MDAPI format.
[06/02/22 09:38:14] Cleaning meta.xml files of packageVersion elements for deploy
Payload size: 123304 bytes
Pending [06/02/22 09:38:15] [Pending]: next check in 1 seconds
[06/02/22 09:38:16] [Pending]: next check in 1 seconds
[06/02/22 09:38:17] [Pending]: next check in 2 seconds
[06/02/22 09:38:19] [Pending]: next check in 2 seconds
[06/02/22 09:38:22] [Pending]: next check in 2 seconds
[06/02/22 09:38:24] [Pending]: next check in 3 seconds
[06/02/22 09:38:27] [Pending]: next check in 3 seconds
[06/02/22 09:38:30] [Pending]: next check in 3 seconds
[06/02/22 09:38:34] [Pending]: next check in 4 seconds
[06/02/22 09:38:38] [Pending]: next check in 4 seconds
[06/02/22 09:38:43] [Pending]: next check in 4 seconds
[06/02/22 09:38:47] [Pending]: next check in 5 seconds
[06/02/22 09:38:52] [Pending]: next check in 5 seconds
[Lots more pending messages between 9:38 - 10:18...]
[06/02/22 10:18:35] [Pending]: next check in 40 seconds
[06/02/22 10:19:15] [InProgress]: Processing Type: Flow
[06/02/22 10:19:39] [InProgress]: Processing Type: Flow
[06/02/22 10:19:41] [InProgress]: Processing Type: Flow
[06/02/22 10:19:42] [InProgress]: Processing Type: ApexClass
[06/02/22 10:19:43] [InProgress]: Processing Type: ApexClass
[06/02/22 10:19:44] [InProgress]: Processing Type: ApexClass
[06/02/22 10:19:45] [InProgress]: Processing Type: ApexClass
[06/02/22 10:19:47] [InProgress]: Processing Type: PermissionSet
[06/02/22 10:19:48] [InProgress]: Processing Type: CspTrustedSite
[06/02/22 10:20:02] [Done]
[06/02/22 10:20:03] [Success]: Succeeded

deploy_unpackaged_content tasks

Running task: deploy_unpackaged_content
Options:
path: unpackaged/config/dev
unmanaged: True
namespace_inject: None
Beginning task: Deploy
Stripping namespace tokens from metadata for unmanaged deployment
Cleaning meta.xml files of packageVersion elements for deploy
Payload size: 97200 bytes
Pending
[06/02/22 10:24:24] [Pending]: next check in 1 seconds
[06/02/22 10:24:25] [Pending]: next check in 1 seconds
[06/02/22 10:24:27] [Pending]: next check in 2 seconds
[06/02/22 10:24:29] [Pending]: next check in 2 seconds
[06/02/22 10:24:31] [Pending]: next check in 2 seconds
[06/02/22 10:24:34] [Pending]: next check in 3 seconds
[06/02/22 10:24:37] [Pending]: next check in 3 seconds
[Lots more pending messages between 10:24-10:30...]
[06/02/22 10:30:10] [Pending]: next check in 15 seconds
[06/02/22 10:30:27] [Pending]: next check in 15 seconds

The "deploy_unpackaged_content" task in the cumulusci.yml file:

description: Deploys configuration for Development.
class_path: cumulusci.tasks.salesforce.Deploy
options:
    namespace_inject: $project_config.project__package__namespace
    path: unpackaged/config/dev
    unmanaged: True

                                                                                     

The flow steps:

1. flow: dependencies [from current folder]                                                                                         
   1. task: update_dependencies                                                                                                    
   2. task: deploy_pre                                                                                                                                    

2. flow: deploy_unmanaged                                                                                                          
   0. task: dx_convert_from                                                                                                        
      when: project_config.project__source_format == "sfdx" and not org_config.scratch                                             
   1. task: unschedule_apex                                                                                                        
   2. task: update_package_xml                                                                                                     
      when: project_config.project__source_format != "sfdx" or not org_config.scratch                                              
   3. task: deploy                                                                                                                 
      when: project_config.project__source_format != "sfdx" or not org_config.scratch                                              
      3.1 task: deploy                                                                                                               
      when: project_config.project__source_format == "sfdx" and org_config.scratch                                               
   4. task: uninstall_packaged_incremental                                                                                         
     when: project_config.project__source_format != "sfdx" or not org_config.scratch                                              
   5. task: snapshot_changes                                                                                                       
   6. task: deploy_uwmsn_ciam_od                                                                                                   

3. flow: config_qa                                                                                                                  
    1. task: deploy_post                                                                                                            
    2. task: update_admin_profile                                                                                                   
    3. task: create_community                                                                                                       
    4. task: deploy_unpackaged_content                                                                                              
    5. task: snapshot_changes                                                                                                       
    6. task: deploy_qa_config                                                                                                       
    7. task: dx_test_data_tree_import                                                                                               

4. task: snapshot_changes 

1 Answer 1

1

I am on the CumulusCI team at Salesforce.

The logs that you've shared show that the slowdown is taking place during CumulusCI's monitoring of a Metadata API deployment. Unfortunately, that means that the slowdown is in the platform layer, not in CumulusCI itself.

The slowdown should reproduce if you use sfdx to perform the same deployment against the same org.

I would encourage you to open a support case and be very specific that what you are seeing is a slowdown in Metadata API deployments. If you can provide time stamps, the Org Id, or even the deployment id (from your Salesforce Setup), this will help Support trace the issue.

3
  • 1
    This links to what I am seeing too, and what I raised on twitter. I haven't yet raised a support case but will if the performance issue still exists next Monday.
    – Phil W
    Commented Jun 2, 2022 at 16:58
  • Thank you so much David for helping point me in the right direction! I’ll open a support ticket with the details you suggested. Just to confirm the SFDX commands to use, would they be the ones below? sfdx force:org:create -f ./orgs/dev.json -a timing-test sfdx force:source:deploy -p force-app/ -u timing-test I've primarily used CCI for scratch org creation/management, which has been SO helpful, especially working with Experience Cloud & scratch orgs, but that also means I have only really needed to use SFDX for scratch org creation when doing Trailhead challenges :)
    – BethWebDev
    Commented Jun 2, 2022 at 17:58
  • Yes, I think that should do it.
    – David Reed
    Commented Jun 2, 2022 at 18:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .