Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Understanding the Celest Cloud Limitations #99

Open
starklord opened this issue Apr 2, 2024 · 8 comments
Open

Understanding the Celest Cloud Limitations #99

starklord opened this issue Apr 2, 2024 · 8 comments
Labels
triaging Initial investigation into the issue

Comments

@starklord
Copy link

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

@dnys1
Copy link
Member

dnys1 commented Apr 2, 2024

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.

@dnys1 dnys1 added the triaging Initial investigation into the issue label Apr 2, 2024
@dnys1
Copy link
Member

dnys1 commented Apr 2, 2024

Does celest start work?

@dnys1
Copy link
Member

dnys1 commented Apr 2, 2024

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.

@dnys1
Copy link
Member

dnys1 commented Apr 2, 2024

In the meantime, unfortunately, it's required to use packages that do not depend on Flutter.

@starklord
Copy link
Author

starklord commented Apr 3, 2024

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 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.
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)
...
image

my code is just as simple as:

image

Future 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();
}
}

@dnys1
Copy link
Member

dnys1 commented Apr 3, 2024

@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.

@starklord
Copy link
Author

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!

@dnys1
Copy link
Member

dnys1 commented Apr 3, 2024

I appreciate it!

Yes, the filesystem support is something that needs some thought and care. I've created a new issue to track this! #102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaging Initial investigation into the issue
Projects
None yet
Development

No branches or pull requests

2 participants