Back

Git Push creates new deployment for every function linked to repository, not just for one subfolder?

  • 0
  • Self Hosted
  • Functions
Leo
22 Jan, 2024, 11:49

I was curious about the best practice on how to organise functions code in git repositories, and if the experienced behaviour is a bug or intentional.

Setup: All my Appwrite functions are linked to github and are stored in a subfolder with the same name as the function has in the console, within the functions folder, within the main branch of the one connected repo. i.e:

  • Function1 is stored in repository "appwrite-functions", branch "main", path "[gitroot]/functions/Function1"
  • Function2 is stored in repository "appwrite-functions", branch "main", path "[gitroot]/functions/Function2"
  • ...

Expected Behaviour: When I push a change to the github repository editing code in the folder for a function, I expect an automatic deployment in appwrite to be triggered for that specific function. i.e:

  • I changed code in folder "[gitroot]/functions/Function1", Appwrite creates a new git deployment for "Function1"

Experienced Behaviour: Appwrite create a new git deployment for ALL functions that are linked to this specific git repositor.

My question: Is this expected behaviour? Is this intended or will it be changed in the future? Should I put each function in its own specific branch, would that stop the creation of new deployments for all linked functions? And then why is appwrite console suggesting the "functions/..." syntax for the repo when I create a new function in the console, if there is only supposed to be one function per repository/branch?

Thank you very much in advance, and looking forward to help or a discussion :D

TL;DR
Developers are wondering if the behavior they're experiencing where Appwrite creates a new deployment for all functions linked to a repository is intentional or a bug. They want to know the best practice for organizing function code in Git repositories. If they push a change to a specific function's folder, they expect only that function to trigger a deployment. However, currently, all linked functions are triggering deployments. They're asking if this is intended and if it will be changed in the future. They also question if putting each function in its own branch would stop the creation of new deployments for all linked functions. They are looking for help or a discussion on this
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more