Closed durgesh077 closed 1 month ago
@durgesh077 You are sending half data and its not expected, also you are sending the wrong key for zip file, it should be blob.
but the correct way is
{
id: string;
type?: string;
jsons: MetaCallJSON[];
runners?: string[];
path: string;
}
Although thanks for reporting this, I am already working on the way to verify data coming from user request, it will be patched soon.
@ashutosh887 how will you proceed?
@Creatoon I have a view point. I had already pushed a PR related to it. It was based on random id generation and then checking if the randomly generated has already been assigned. If not then fine, else I was adding a stub. We can add an optional parameter into formdata which provides id from user end. If user provides it, then we'll try to assign it else randomly generated id will work fine.
https://github.com/metacall/faas/pull/17 this my PR
or we can make ID by adding some required stub at the end of zip file name:- Like it file name is Func.zip we can try Func-stub1 , Func-stub2 so on where stub is randomly generated
@durgesh077 At the end, users will be using with @metacall/deploy CLI to interact with this FAAS, and It will auto generate the id for you, if user did not provided it.
See how it generated multipart data - https://github.com/metacall/protocol/blob/master/src/protocol.ts#L160
And we should validate the incoming form data, if it consists or fields or not, if not, we will simply notify user by throwing an error, instead of generating names randomly.
Yes , but finding new id that has not been used may find user but annoying. That's why
Thanks @durgesh077, we will be needing unique name and will surely tell you how to proceed with this, for now we have to implement few endpoints that will support your issue.
Sure, You can assign me some of the task which you like .I'll be happy to work with you. I have good experience at backend.
The id is a required field, we are trying to mimic the behavior of the FaaS. We obtain the name of the deployment from the current directory name or from the repository url when deploying from repo.
@durgesh077 if you are interested in keep working on the project, maybe we can find other issues which are more interesting than this one.