Back

"appwrite push functions" not pushing env variables with it

  • 0
  • Self Hosted
Aarush Acharya
9 Oct, 2024, 12:54

I have a appwrite.json which has a function object like this

TypeScript

{
  "functions": [
      {
        "$id": "65368a58ef47cf6861200",
        "name": "Upcoming Rooms Time Checker",
        "runtime": "node-16.0",
        "path": "functions/upcomingRoom-isTime-checker",
        "entrypoint": "src/main.js",
        "ignore": [
            "node_modules",
            ".npm"
        ],
        "variables": {
            "UpcomingRoomsDataBaseID": "6522fcf27a1bbc4238df",
            "UpcomingRoomsCollectionID": "6522fd163103bd453183",
            "SubscriberCollectionID": "6522fd267db6fdad3392"
        },
        "execute": [
            "any"
        ],
        "events": [],
        "schedule": "*/5 * * * *",
        "timeout": 15,
        "commands": "npm install"
      }
  ]
}

When i do appwrite push functions it creates a new function in my self hosted instance running locally but does not push the function variables mentioned in the json with the function so I have to manually go and assign them.

I have 10 functions like this and it becomes really laborious and it should ideally push the function varibales with it which it did in the prev versions of the CLI i am not aware why is it not doing so now

TL;DR
Developers facing issue with 'appwrite push functions' command not pushing function variables specified in the appwrite.json file along with functions when deploying to self-hosted instance. This was working in previous CLI versions. Manually assigning variables is a laborious task with multiple functions.
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