🐛 Bug Report: Invalid `specification` param: Specification must be one of:
👟 Reproduction steps
When running appwrite push functions --all the CLI gives the error Invalid 'specification' param: Specification must be one of:
👍 Expected behavior
The push works.
👎 Actual Behavior
Gives an error for every function.
The appwrite.json file contains a line "specification": "s-1vcpu-512mb" for every function. After removing that line the push command works but the line gets added back when pulling the functions (appwrite pull functions).
🎲 Appwrite version
Version 1.6.x
💻 Operating system
Linux
🧱 Your Environment
Self-hosted 1.6.1 with Docker. CLI 6.2.0
👀 Have you spent some time to check if this issue has been raised before?
- [x] I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- [x] I have read the Code of Conduct
@hej2010 thanks for raising this issue! 🙏🏼
Looks like this can happen to orgs on the Free plan if they don't have s-0.5vcpu-512mb for specification.
For self-hosted, you may need to tweak your APP_FUNCTION_CPUS_DEFAULT and APP_FUNCTION_MEMORY_DEFAULT to 8 and 8192 respectively.
Thanks, changing .env to
_APP_FUNCTIONS_CPUS=8
_APP_FUNCTIONS_MEMORY=8192
solved it :)
The fix also worked for me :)
So apparently you check if the specification fit in the envs before showing it, tho if everything is at 0, no specific specification will work (none will use the default).
To fix this issue, could it be possible to add something in the app to check if both values are 0 then:
- don't check the specification and allow all of them
- or check the system CPU/mem and set thoses as the envs value (so the limit is the current server) (i think it's the better)
- or only allow some of the specification like the default
s-1vcpu-512mb
@ibaraki-douji you are right. so now when both values are 0, we treat them as "unlimited" - https://github.com/appwrite/appwrite/pull/9638
should be out in the next release :D