sfpowerkit icon indicating copy to clipboard operation
sfpowerkit copied to clipboard

Only warn where newer dependency exists on org sfpowerkit:package:dependencies:install

Open DougMidgley opened this issue 3 years ago • 10 comments

Is your feature request related to a problem? Please describe. When using this to install relevant package dependencies, sometimes the one on the org has been updated automatically, which means that there is a version clash. It is good not to revert the version, but it also would be good to allow this to fail "quietly" and continue with the other dependencies, rather than failing completely.

Describe the solution you'd like Add a flag like "ignoreNewerVersions" to CLI to skip install/update when a newer version is on org

Describe alternatives you've considered We could use the metadata approach rather than the sfdx json, but this also means updating everything, even if it is the same verison installed.

DougMidgley avatar Dec 07 '21 10:12 DougMidgley

@DougMidgley If I am right, there is no way to determine the version of a package from the 04t id unless its installed to the org. I will definitely check with product team

@manisfdcsfdx @ImJohnMDaniel @FabienTaillon thoughts?

azlam-abdulsalam avatar Dec 07 '21 10:12 azlam-abdulsalam

Hey @azlam-abdulsalam, also my understanding. In this case, we could for example, just ignore the error with a warning and continue without stopping the install of other dependencies, but happy for suggestions also :)

DougMidgley avatar Dec 07 '21 10:12 DougMidgley

If I understand correctly, the command tries to install let's say v1.1, whereas org is already migrated to v1.2 or v2.0, right ?

FabienTaillon avatar Dec 07 '21 14:12 FabienTaillon

@azlam-abdulsalam, I am aware of two ways to check the version number of a 04t:

  1. Check the DevHub that the package was created by
  2. Check the org that it was installed to

ImJohnMDaniel avatar Dec 07 '21 15:12 ImJohnMDaniel

@ImJohnMDaniel this usually happens with managed packages, so no hope ;)

azlam-abdulsalam avatar Dec 09 '21 12:12 azlam-abdulsalam

Indeed, most affected aspects are managed packages (think Salesforce Maps or FSL). As mentioned, a more graceful error handling could work, even it essentially still ignored specific packages

DougMidgley avatar Dec 09 '21 21:12 DougMidgley

I have requested the Packaging team, whether there is any chance to bake in an API to query provided a 04t id. Meanwhile I will check how we can handle it using error strings

azlam-abdulsalam avatar Dec 13 '21 21:12 azlam-abdulsalam

@Caitlyn-Mills This has been resolved in sfpowerscripts. Please switch over to the new implementation

azlam-abdulsalam avatar Aug 15 '22 00:08 azlam-abdulsalam

@azlam-abdulsalam when you say "resolved" - is it something we can use?

DougMidgley avatar Aug 29 '22 07:08 DougMidgley

@DougMidgley not yet.. but in next release. This is fixed in sfpowerscripts, we are slowly deprecating or switching over the implementation of sfpowerkit to a unified library

azlam-abdulsalam avatar Aug 29 '22 23:08 azlam-abdulsalam