Broken Deployments? Deployment report 0/0 components deployed

Issue #1881 resolved
Justin Julicher created an issue

Added flows and quick actions to the deployment custom scope.

Deployed. Seemed to add the 49 components but then reported the deployment as deployed 0/0 components.

See attached log.

Comments (10)

  1. Scott Wells repo owner

    Looking at the package.xml that it's using for deployment, it appears to be adding the names with the -meta.xml extensions from a source format project:

    <?xml version="1.0" encoding="UTF-8"?>
    <Package xmlns="http://soap.sforce.com/2006/04/metadata">
        <types>
            <members>AccountContactRelationshipUpdateDuplicatePrimaryField.flow-meta.xml</members>
            ...
            <name>Flow</name>
        </types>
        <types>
            <members>Account.Child_Account.quickAction-meta.xml</members>
            ...
            <name>QuickAction</name>
        </types>
        <version>51.0</version>
    </Package>
    

    It's also using the API-based metadata deployer and not the CLI-based one. That leads me to think that it's not properly grokking this as a source format project. Is there an sfdx-project.json in the project root directory? How is the metadata subscription configured? A source format project must be configured against a CLI-based org--either scratch or non-scratch--and must also have an sfdx-project.json file in the project root directory. If working against a non-scratch org, there must also be a package.xml file that represents its metadata subscription, typically stored as manifest/package.xml peer to sfdx-project.json, though that's more flexible in recent builds as long as you configure some package.xml file as the metadata subscription.

    My guess is that this project doesn't meet those requirements, but let's see...

  2. Justin Julicher reporter

    Ok so I managed to resolve the issue.

    I had modified the project and changed the module content root from force-app to the root directory. I reverted that change and everything started working again.

    Can close the issue but I guess it shouldn’t really behave like that if you change the content root.

  3. Scott Wells repo owner

    Well, using the project root as the content root should be fine, but there can be issues when the project root is selected as a source root, especially if there are other files under the project root that shouldn't be considered source files but are suddenly found as such. Can you confirm the configuration that wasn't working for you? What were the content roots and source roots?

  4. Justin Julicher reporter

    Hi Scott

    The content root was the project root and the source root was force-app/main (I checked before I changed the content root what it was set to).

  5. Scott Wells repo owner

    Hi, Justin. I've tried to reproduce this behavior but so far unsuccessfully. I created a source format project, populated it with some flow and quick action metadata, and adjusted the configuration so that the content root coincides with the project root and the source root is just force-app under the content root:

    Issue_1881_Config.png

    Then I deployed some flows and a quick action, and the correct package.xml was generated and the deployment succeeded:

    2021-05-12 09:33:49,190 [ 491987]  DEBUG - ilder.ForceComSfdxMetadataUtil - Created temporary package.xml file for selective deployment/retrieval:
    <?xml version="1.0" encoding="UTF-8"?>
    <Package xmlns="http://soap.sforce.com/2006/04/metadata">
        <types>
            <members>Issue280</members>
            <members>Sample_Flow</members>
            <name>Flow</name>
        </types>
        <types>
            <members>Account.Foo</members>
            <name>QuickAction</name>
        </types>
        <version>51.0</version>
    </Package>
    ...
    2021-05-12 09:34:04,329 [ 507126]   INFO - r.ForceComSfdxMetadataDeployer - Deployment status = SUCCEEDED 
    2021-05-12 09:34:04,329 [ 507126]  DEBUG - r.ForceComSfdxMetadataDeployer - Processing 4 component successes. 
    2021-05-12 09:34:04,330 [ 507127]  DEBUG - r.ForceComSfdxMetadataDeployer -   Successfully deployed flows/Sample_Flow.flow-meta.xml 
    2021-05-12 09:34:04,330 [ 507127]  DEBUG - r.ForceComSfdxMetadataDeployer -   Successfully deployed flows/Issue280.flow-meta.xml 
    2021-05-12 09:34:04,330 [ 507127]  DEBUG - r.ForceComSfdxMetadataDeployer -   Successfully deployed quickActions/Account.Foo.quickAction-meta.xml 
    2021-05-12 09:34:04,330 [ 507127]  DEBUG - r.ForceComSfdxMetadataDeployer -   Successfully deployed package.xml 
    

    Is there perhaps something else about your config that I'm not properly emulating?

  6. Justin Julicher reporter

    Possibly - It could be to do with that I had a sfdx-project.json file - it was coming up with ‘push/pull’ in the IC context menu so thinking it was only a SFDX project but I was connected to a sandbox.

    I didn’t have a manifest/package.xml either as previously it was causing some issues.

  7. Scott Wells repo owner

    Ah, I see. Interestingly I implemented a number of fixes in 2.1.7.6 around how IC2 detects and addresses issues with source format projects with a sfdx-project.json file but no package.xml file configured against non-scratch org connections. My own testing was against a build with those fixes. I wonder if that's why I didn't see it. I'm going to resolve this assuming so. If you see this occur in the future, though, don't hesitate to reopen this or log a new issue.

  8. Log in to comment