Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Reset the Sfpowerkit on a different target org or include the org name into the cache #1413

Open
@Schuchie

Description

@Schuchie

Describe the bug
Currently the profile reconcile command does not clean all metadata existing to the connected org. This happens only if you execute the command twice and switch the org between the first run and second run.

To Reproduce
Steps to reproduce the behavior:

  1. Connect to Org A
  2. Create a new field (Account.Test__c)
  3. Add this field to the Admin Profile
  4. Run the sfp profile reconcile for the Admin-Profile
  5. Switch to Org B (without the Test-Field)
  6. Run the sfp profile reconcile with target Org B
  7. Field was not cleared, because the Sfpowerkit has still the Account.Test__c-Field from Org A in the cache

Expected behavior
The Sfpowerkit-Cache resets after each change of target org or adds the org alias to the cache.

Screenshots
If applicable, add screenshots to help explain your problem.

Platform Details (please complete the following information):

  • OS: MacBook M2
  • Version: @dxatscale/sfpowerscripts/24.5.0 darwin-arm64 node-v20.6.1
  • Salesforce CLI(sfdx cli) Version: @salesforce/cli/2.9.8 darwin-arm64 node-v20.6.1
  • CI Platform: GitHub and Local

Additional context
If I add the cache reset to the command, the reconcile works correctly or delete the current cache table:

//sfpowerscripts/packages/sfpowerscripts-cli/src/commands/profile/reconcile.ts:86
Sfpowerkit.resetCache();

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions