logicFunction sourceHandlerPath and builtHandlerPath manifest updates are not saved#18230
logicFunction sourceHandlerPath and builtHandlerPath manifest updates are not saved#18230
Conversation
Greptile SummaryThis PR fixes a bug where updates to Key Changes:
Observations:
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: ef3db98 |
Additional Comments (1)
|
There was a problem hiding this comment.
1 issue found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/logic-function/services/update-logic-function-action-handler.service.ts">
<violation number="1" location="packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/logic-function/services/update-logic-function-action-handler.service.ts:98">
P2: Deleting by subfolder when sourceHandlerPath changes wipes the entire logic-function source folder. If the new source handler path is in the same folder, this deletes the new file too. Use the previous sourceHandlerPath so only the old file is removed.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| workspaceId, | ||
| applicationUniversalIdentifier, | ||
| fileFolder: FileFolder.Source, | ||
| resourcePath: getLogicFunctionSubfolderForFromSource(entityId), |
There was a problem hiding this comment.
P2: Deleting by subfolder when sourceHandlerPath changes wipes the entire logic-function source folder. If the new source handler path is in the same folder, this deletes the new file too. Use the previous sourceHandlerPath so only the old file is removed.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/twenty-server/src/engine/workspace-manager/workspace-migration/workspace-migration-runner/action-handlers/logic-function/services/update-logic-function-action-handler.service.ts, line 98:
<comment>Deleting by subfolder when sourceHandlerPath changes wipes the entire logic-function source folder. If the new source handler path is in the same folder, this deletes the new file too. Use the previous sourceHandlerPath so only the old file is removed.</comment>
<file context>
@@ -58,5 +89,23 @@ export class UpdateLogicFunctionActionHandlerService extends WorkspaceMigrationR
+ workspaceId,
+ applicationUniversalIdentifier,
+ fileFolder: FileFolder.Source,
+ resourcePath: getLogicFunctionSubfolderForFromSource(entityId),
+ });
+ }
</file context>
| resourcePath: getLogicFunctionSubfolderForFromSource(entityId), | |
| resourcePath: existingLogicFunction.sourceHandlerPath, |
| update as Parameters<typeof logicFunctionRepository.update>[1], | ||
| ); | ||
|
|
||
| if (sourcePathChanged) { |
There was a problem hiding this comment.
I would not touch source at all, it's not their responsibility
I could even argue that built source is not but as there is a 1 for 1 logicFunction / built files, why not
and delete legacy files