Francisco "Klogan" BarrosOriginal post
Rank 2: Process
When I create a new user, the ProcessNewUser (id,name) serverless Appwrite Function triggers.
It retrieves the user $id from the event payload (req.body).
It tries to create some default documents for that user.
This function used to work before some personal refactors, related with type-safety, maintainability and most importantly, new data models. Now, I did not expect to get the refactor just right first time around. However, whenever I create a new user and the function triggers, an old version of the code gets executed (tried multiple times over the last hour).
Entrypoint:
./dist/process-new-user/main.js
Git Settings:- Points at branch development
development
Build command: bun install && bun build ./functions/process-new-user/main.ts --outdir ./dist/process-new-user ;
Symptoms
- When doing commits to the repository to the development branch, I have noticed that builds are not triggered as they usually do
- When manually deploying, a new deployment is made, goes to status active, but when the functions executes it shows
Log messagesthat I no longer have (old code, before refactor).
Some help?
Screenshots attached.
Summary
Title: Function not deploying properly
- Developer created a new user triggering the `ProcessNewUser` function
- It tries to create default documents for the user
- However, after personal refactors, an old version of the code keeps executing
- Commits to the repository are not triggering builds as expected
- Manually deploying shows a new deployment with an active status, but the old code runs
- Developer seeks help
Solution:
It seems there may be an issue with the build and deployment process. The developer can try the following steps:
1. Ensure that the build command is correctly set to `bun install &&