flxbl-io / sfp

A build system for modular development in Salesforce
https://docs.flxbl.io/sfp/
MIT License
31 stars 18 forks source link

sfp which uses sfpowerkit: Cache gets not cleaned after switching orgs or new command session #121

Open Schuchie opened 2 months ago

Schuchie commented 2 months ago

Describe the bug Every time a profile reconcile happens, it tries to use the sfpowerkit cache. Problem with that, if you execute the commands locally (or multiple in a CI, which uses the reconcile). Every command uses the same cache. This results in various strange bugs, because it uses the cache of another org, with different fields, apps etc..

To Reproduce Steps to reproduce the behavior:

  1. Create a profile in org-1 and org-2 with the same name
  2. Add an CustomApplication/Field on org-1
  3. Add profile access for the previous CustomApplication on org-1
  4. sfp profile reconcile -o org-1 <Test-Profile>
  5. sfp profile reconcile -o org-2 <Test-Profile>

--> Same profile of org-2 has the CustomApplication included, because the cache of org-1 was used.

Expected behavior Cache should be reseted after command lifetime or before.

Screenshots

Platform Details (please complete the following information):

Additional context Problem can be solved, when I would always delete the .sfdx/sfpowerkit/sfpowerkit-cache.db