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
- I'm getting an error on the console "j?....
On my self hosted instance version 1.8.1 the console is giving me this error when trying to view the rows for a table I recently created. My application is read...
- local build `composer installer:dev` iss...
setup - dev container (default linux universal) WSL (test with gh codespace too) - php 8.5.7 - all extensions installed - `composer install` fine - `composer...
- Function global variables
when i create a top-level global variable in go or bun how will it behave? is the heap getting renewed on every execution or could i do some kind of temp. cachi...