I tried to setup a gitlab CI that push functions from an appwrite.json, tho when doing a first push it fails saying it needs a session. Tho it does create the function but without a domain. And if i relaunch the CI, it can deploy without issues.
After looking at the cli sdk i saw that it came from this : https://github.com/appwrite/sdk-for-cli/blob/master/lib/commands/push.js#L1490
try {
const variables = await consoleVariables({ parseOutput: false, sdk: await sdkForConsole() });
domain = ID.unique() + '.' + variables['_APP_DOMAIN_FUNCTIONS'];
} catch (error) {
console.error('Error fetching console variables.');
throw error;
}
and i suspect that the sdkForConsole needs a session but the key doesn't have one.
Maybe as a fix, it could be nice to have an option like --no-domain or to just warn instead of completely stop the deployement.
and also yes the function is created inside the CI, as the ID is manually generated with a npm command and put in the appwrite.json before the first main push
and i don't really want to create a console user for the gitlab CI
Recommended threads
- Can't really use the S3 storage device
hi, I've linked my local MinIO Instance (it's just for testing, not for prod.) to my appwrite instance, when i'm uploading a file it's getting uploaded to the S...
- Next.js SSR Site Times Out on First Visi...
Hey everyone, I'm running a Next.js SSR site on a self-hosted Appwrite server (v1.9.0), and I've noticed a strange behavior that I'm hoping someone can help me...
- Appwrite migration stuck on pending
Migration an existing self hosted 1.9.0 to a new VPS tuning self hosted 1.9.0.. import data recognises the api url, project id and api and then when I create, i...