-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Forge - App Deployment
-
Severity 3 - Minor
-
Scale & Infra
Issue Summary:
During deployment of a Forge app it goes though enrichment/conversation process. If converted manifest is exceeds the size limit of 257634 bytes, deployment fails at the step "Release CaaS manifest" with 500 Internal server error.
This can happen, especially, if the manifest has lots of functions defined (approx. 40 functions)
Steps to Reproduce
- Create a Forge application and define many functions in the manifest - at least 40
- deploy the forge application with "forge deploy --verbose" command
Expected Results
The deployment should be successful, or a proper error message should be returned explaining that the manifest size is too large.
Actual Results
The below exception is thrown in the cli response:
Step: "Release CaaS manifest"
Status: FAILED
Error: App environment update failed
Validation errors: {
"extensions": {
"errorType": "INTERNAL_SERVER_ERROR",
"statusCode": 500
}
}
Workaround
The workaround is to reduce the converted manifest size. In the case of many functions, we can reduce the function count in manifest by re-using them. For example, we can have one function for many rovo:action
modules: action: - key: create-issue-action function: sharedActionHandler # Shared function - key: update-issue-action function: sharedActionHandler # Same function reused function: - key: sharedActionHandler handler: index.run
Then the run method can check moduleKey and run separate logic for each, like this
export function run(payload) {
const { moduleKey } = payload.context;
// Check which action was invoked
switch(moduleKey) {
case 'create-issue-action':
return handleCreateIssue(payload);
case 'update-issue-action':
return handleUpdateIssue(payload);
default:
return `Unknown action: ${moduleKey}`;
}
}
- is related to
-
ECO-1346 Deploying a Forge app with a large manifest fails even when the manifest size is below the published limit
-
- Long Term Backlog
-