celest
celest copied to clipboard
Understanding the Celest Cloud Limitations
Hi i want to understand what can we do inside the celest cloud. Are there specifications or any doc about that? Im new with the "Cloud Functions" concept, i come from the traditionals VPS virtual private servers where you can for example read write files. So, Wat can and can´t do inside the celest cloud or inside a celest function? For example if i use path_provider and run "celest deploy" this give me an error: Failed to deploy project. Please contact the Celest team and reference deployment ID: deployment_01htfvcf0eetahaf9qhwg93ttp
Hi @starklord, yes good point. Celest is going for more of a serverless model at the moment, which I definitely need to document better. Every function has a 500MB scratch space located at /tmp
which can be used for processing files, but is not guaranteed to persist between executions.
Regarding your deployment, I'm not seeing an error for that deployment in my logs 🤔 It's showing as successful on my end, oddly. It might be because of path_provider
depending on Flutter--I will try to replicate the error locally.
Does celest start
work?
Okay, yeah I'm very certain it's because of path_provider
. The transitive dependency on Flutter pulls in the dart:ui
library, which is not available in server contexts. This issue has been on my radar for a while now. I'm happy to dig more into it and see what a fix could be.
In the meantime, unfortunately, it's required to use packages that do not depend on Flutter.
Does
celest start
work? celest start doesnt work if i import the path_provider library in my function file. PS D:\workspaces\flutter\celest_app2> celest start ⠦ Starting Celest... (6.9s)Project has errors. Please fix them and save the corresponding files.
Okay, yeah I'm very certain it's because of
path_provider
. The transitive dependency on Flutter pulls in thedart:ui
library, which is not available in server contexts. This issue has been on my radar for a while now. I'm happy to dig more into it and see what a fix could be. Ah ok i see now, its reasonable.
In the meantime, unfortunately, it's required to use packages that do not depend on Flutter. What about the dart:io library ? i have this error reading/writing files(and i dont know if this is for any streaming) and this happens in local and production environment server dateTime: #0 _checkForErrorResponse (dart:io/common.dart:55:9) ...
my code is just as simple as:
Future<String> createFile(String fileName) async { try { var file = File("filenew.txt"); var text = await file.readAsString(); return text; } catch (e, s) { log(s.toString()); return s.toString(); } }
@starklord Could it be the file does not exist?
The method says createFile
but if filenew.txt
does not exist already, then reading it is expected to throw an error.
Ah ok it can be possible the file does not exist because you told me the files created are temporary isnt it? Oky doky ill keep making more testings :3 thank you so much for this product. Its getting better and better!
I appreciate it!
Yes, the filesystem support is something that needs some thought and care. I've created a new issue to track this! https://github.com/celest-dev/celest/issues/102