Summary
This PR enhances error handling during application redeployment and improves testing flexibility by adding conditional requirement validation.
Changes
Error Broadcasting for Failed Redeployments
Files: advancedWorkflows.js, appInstaller.js
Added network broadcast messaging when hard redeploy operations fail
Modified registerAppLocally() to accept a sendRemovalMessage parameter
Ensures the network is properly notified when apps are removed due to installation errors
Improves cluster state consistency by broadcasting failure states
Impact: Nodes will now be aware when an app fails to redeploy on a peer, preventing stale state issues.
Enhanced Testing Flexibility
File: appInstaller.js
Added conditional validation parameters to checkAppRequirements():
skipGeolocation - bypasses geolocation requirements
skipStaticIp - bypasses static IP requirements
skipHardware - bypasses hardware requirements
Test installations now skip all requirement validations
Enables testing without meeting production constraints
Impact: Developers can test app installations without needing production-level infrastructure.
Technical Details
Modified Functions
registerAppLocally(appSpecs, res, forceRecreate, sendRemovalMessage)
New param: sendRemovalMessage (default: false)
Broadcasts app removal when true and installation fails
checkAppRequirements(appSpecs, skipGeolocation, skipStaticIp, skipHardware)
New params allow selective requirement bypass
Maintains backward compatibility with defaults
Files Changed
advancedWorkflows.js (+1, -1)
appInstaller.js (+29, -17)
Testing
✅ Hard redeploy error scenarios broadcast removal messages
✅ Test installations bypass requirement validations
✅ Normal installations still enforce all requirements