Closed MGarfOppLoans closed 2 years ago
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
This issue has been linked to a new work item: W-9955301
Yeah, I see how you got that one...deleting something from the org that doesn't exist in the local project, right?
Nah, we actually do a source retrieve before the delete to avoid that exact issue funny enough because that caused issues in the past
Essentially our process is.
- PermissionSet:Quick_Text_Admin
- PermissionSet:View_All_Data_System_Permission
Do a retrieve of all metadata in the list.
Anything retrieved is then added to a destructive list (we ignore what doesn't get pulled down)
Then do a delete
Found the issue. The retrieve response changed, thank you you led me in the right direction
retrieveResult.result {
inboundFiles: [
{
fullName: 'View_All_Data_System_Permission',
type: 'PermissionSet',
state: 'Failed',
error: "Entity of type 'PermissionSet' named 'View_All_Data_System_Permission' cannot be found",
problemType: 'Error'
},
{
fullName: 'Quick_Text_Admin',
type: 'PermissionSet',
state: 'Failed',
error: "Entity of type 'PermissionSet' named 'Quick_Text_Admin' cannot be found",
problemType: 'Error'
}
],
packages: [],
warnings: [
{
fileName: 'unpackaged/package.xml',
problem: "Entity of type 'PermissionSet' named 'View_All_Data_System_Permission' cannot be found"
},
{
fileName: 'unpackaged/package.xml',
problem: "Entity of type 'PermissionSet' named 'Quick_Text_Admin' cannot be found"
}
],
response: {
done: true,
fileProperties: [ [Object] ],
id: '09S2V000002123pUAA',
messages: [ [Object], [Object] ],
status: 'Succeeded',
success: true
}
}
What's causing your retrieve to fail? Something with the CLI, or something else?
[I'm still keeping this as a bug because you should be able to delete stuff from the org even if it doesn't exist locally]
Huge fan of that, will speed up our builds if we don't have to retrieve first.
Based on the snippet it seems it failed to retrieve those items because they aren't in the org. Historically it would just silently not pull them but some recent change to the CLI now has it returning which caused our builds to break since we assumed any items returned were the ones in the org
This has been fixed and released in 7.122.1
. See release notes here
Summary
When issuing a destructive change of any kind (just code, just permission sets) we are seeing it fail without a stated reason. This just started happening at random and is causing all our ci/cd pipelines to fail. This is happening across 10 environments in through branch groups each with their own destructive changes with different combination of metadata. Running with local copy successfully deletes it
Steps To Reproduce:
Run
sfdx force:source:delete -m "PermissionSet:View_All_Data_System_Permission,PermissionSet:Quick_Text_Admin" -r --json
Expected result
Actual result
System Information
Running in Github Actions on image:
salesforce/salesforcedx:latest-full
Run
sfdx version --verbose --json
and paste the output here.