My understanding of building 2GMP validated version was that validation already checks if upgrade flow is working fine, but to my great surprize on this weekend, the validation and successful build of released managed package version does not guarantee the successful upgrade from the previous package version to the new one.
I received the following error on package upgrade which wasn't detected when package version was created and validated.
ERROR running force:package:install: Installation errors:
- (approvers) lwc/approvers/approvers.js-meta.xml: You can't remove the property tag named 'defaultCollapsed,displayHeader' specified in targetConfig lightning__RecordPage. The component is part of a managed package. lwc/approvers/approvers.js-meta.xml: You can’t remove the following public properties: recordId,objectApiName,displayHeader,defaultCollapsed, because the component is part of a managed package., Details: approvers: lwc/approvers/approvers.js-meta.xml: You can't remove the property tag named 'defaultCollapsed,displayHeader' specified in targetConfig lightning__RecordPage. The component is part of a managed package. lwc/approvers/approvers.js-meta.xml: You can’t remove the following public properties: recordId,objectApiName,display
How can I prevent such upgrade fail scenario blocker issues in the future?