Sfdx-git-delta: Auth Provider not added to generated package.xml

Created on 12 Jul 2021  ยท  6Comments  ยท  Source: scolladon/sfdx-git-delta

Issue verification check :

  • [ ] does the current repository is fully deployable at the commit sha given to the from parameter of the command ?

What is the problem


Committed Auth Provider metadata is not returned in the generated package.xml file.

What is parameter and their value you used

sfdx sgd:source:delta --from commitId --to HEAD --output . --ignore .sfdxgitdeltaignore

What is the expected result

The packages.xml file generated in packages/package.xml includes:

    <types>
        <members>myAuthProvider</members>
        <name>AuthProvider</name>
    </types>

What is the actual result

A package.xml which does not contain an AuthProvider node.

Steps to reproduce


  • Create an Auth Provider in source org.
  • Retrieve and commit changes
  • Run sfdx sgd:source:delta --from HEAD^ --to HEAD --output . --ignore .sfdxgitdeltaignore
  • Verify the package.xml does not contain an AuthProvider node.

Execution context


Operating System: MacOs Catalina 10.15.7 (19H1217)

yarn version: N/A

node version: v14.17.0

git version: git version 2.21.0 (Apple Git-122.2)

sfdx version: sfdx-cli/7.109.0 darwin-x64 node-v14.17.0

sgd plugin version: sfdx-git-delta 4.7.1

Optional more information


This might be more of a question than a bug @scolladon. It may have been a design decision to exclude Auth Providers as I know they can be a devil to deploy/overwrite ๐Ÿ˜„

good first issue question

Most helpful comment

Yep, that was the issue. No idea how we ended up with that folder name but I'm getting the expected out with that tweak in place.

Thanks for the detective work!

All 6 comments

Hi @RichardBeadle !

Thanks for raising this issue, thanks in your interest to make this plugin better ๐Ÿ˜„

AuthProvider are included by design ! You can have a look to the metadata file we are using.

I've done a few test on the sgd reproduction playground (look at the 6 last commit of the branch issue/165) and it seems working fine on my side...

Could you give us the result of the diff related to the commit span which create the issue on your side ?

$ git --no-pager diff --name-status --no-renames <fromSHA> <toSHA>

If you could also manage to reproduce it in the reproduction playground branch issue/165 (by forking it) it could be very helpful as I cannot reproduce the issue currently

Thanks in advance !

That's super strange!

I'm seeing the AuthProvider in the diff:

Patient-patient-journey-navigator git:(Upgrade-PJN) git --no-pager diff --name-status --no-renames ec639330b204bc5c7945f2da202c96632d7e684d HEAD

A       packages/patient-journey-navigator/main/default/authProviders/PJN_Veeva_CRM.authprovider-meta.xml
....

but in the package.xml output I'm getting:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    </types>
    <version>52.0</version>
</Package>

I've been able to work around this just find by adding this as a manual deployment step, and if it's handled under "normal" circumstances and can't be replicated then we should be good to close. I can replicate in my instance though.

P.s.

Thanks for raising this issue, thanks in your interest to make this plugin better ๐Ÿ˜„

Absolutely love this plugin and it's an absolute god send. Always happy to help wherever possible!

Thanks for the giff diff detail.

I think there is something here, if possible could you reproduce it in the reproduction playground ? This way I will be able to reproduce it on my side also I hope. Maybe it is related to context.

Also, if you could update git and retry, just to be sure it is not just that

Thanks for the kind message and for your support !

@scolladon I was able to replicate this in a playground here: https://github.com/RichardBeadle/sgd-authprovider-playground - I've pinged you an invite so you can access.

Commit ID be5e2ee added an Auth Provider. I can see that outputted in the diff:

โžœ  sgd-authprovider-playground git:(master) โœ— git --no-pager diff --name-status --no-renames HEAD^ HEAD                                   
A       force-app/main/default/authProviders/Example.authprovider-meta.xml

However in the sgd delta output the Auth Provider doesn't drop into the package.xml:

image

Great !!

Thank you very much.
I have also been able to reproduce on my side, thanks to your help.

I think the issue comes from the name of the authproviders folder.

In the documentation it is named authproviders. This is what we also have in our metadata definition file and this is also what I used in the reproduction playground.

On the reproduction you provided, the authproviders folder is named "authProviders" (with a capital P) which is not interpreted by the code has it does not match a folder in the metadata definition file.

If using the right folder name fix the issue on your side too, please close this issue :)

Yep, that was the issue. No idea how we ended up with that folder name but I'm getting the expected out with that tweak in place.

Thanks for the detective work!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

afzal-tag picture afzal-tag  ยท  4Comments

nickytorstensson picture nickytorstensson  ยท  6Comments

ashishshukla38 picture ashishshukla38  ยท  4Comments

struthe picture struthe  ยท  3Comments

robertoamd90 picture robertoamd90  ยท  4Comments