I'm currently trying to get patching working for our 2gp managed package but it's consistently hitting the same set of errors around report folders and report filters (see screenshot). Now I know what you're going to say "Hey Shane, why don't you just fix the errors? Duh" - I know, but there're multiple layers to this:
Firstly, it doesn't seem to matter what changes there are in the package, this error will blow. The screenshot below was when I tried to patch a small change I made to a comment(I only patched a comment to see what it would blow up for, a comment change is not the need for the patch).
I have tried to remove the filters on the errant reports but regardless, these errors still fire as if the reports were never updated
As per this stack exchange question, the package version I'm patching has been Security Reviewed and patching is enabled in our PBO org
So my question is twofold -
Why won't sfdx patch a version that is essentially identical to its parent package? I imagine the patch process is different from initial packaging but surely something that packaged OK can be patched with something as minor as a comment? We have packaged many times since with no problems.
Am I missing something here to get this to work?
The project.json is below followed by the packaging command
sfdx-project.json
{
"packageDirectories": [
{
"path": "force-app",
"default": true,
"package": "PackageXY",
"definitionFile": "config/project-scratch-def.json",
"postInstallScript": "PostInstall",
"ancestorId": "PackageXY@1.9.0-8",
"versionName": "1.0",
"versionNumber": "1.9.1.NEXT"
}
],
"namespace": "xy",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "51.0",
"packageAliases": {
"PackageXY@1.9.0-8": "04tXXXXXXXXXXXX"
}
}
Package Command
sfdx force:package:version:create --package "PackageXY" --versionname "COMMIT#-patch" --versiondescription "Desc" --targetdevhubusername "user@email.com" --installationkey "XXXXX" --codecoverage --wait 25