botpress / studio

The studio is the main interface you'll use to build and edit your chatbot.
https://botpress.com/docs/quickstart#conversation-studio
39 stars 38 forks source link

feat(studio): allow disabling file listeners for read-only deployments #242

Closed davidvitora closed 2 years ago

davidvitora commented 2 years ago

Related to https://github.com/botpress/botpress/pull/5664

Another PR is open on Core to also provide the variable to studio: https://github.com/botpress/botpress/pull/11614

Since the Studio is started with Botpress core, even though it's not used in RODs, this becomes a problem.

samuelmasse commented 2 years ago

Closing due to inactivity. Feel free to reopen on new commits

davidvitora commented 2 years ago

This fix was tested and it is working

laurentlp commented 2 years ago

Related to botpress/botpress#5664

Since the Studio is started with Botpress core, even though it's not used in DDs, this becomes a problem.

DD? Also, how does it becomes a problem and how does your fix solves the issue?

davidvitora commented 2 years ago

@laurentlp same as the related PR that was done a while ago for the Core, basically containers on AWS and other services have a limited amount of watchers that can't be changed, since DDs (Dumb Deployments) store all files on the disk, Botpress breaks. This was fixed in the core but the studio also create watchers for files.

laurentlp commented 2 years ago

@laurentlp same as the related PR that was done a while ago for the Core, basically containers on AWS and other services have a limited amount of watchers that can't be changed, since DDs (Dumb Deployments) store all files on the disk, Botpress breaks. This was fixed in the core but the studio also create watchers for files.

Okay, then, in this case, this seems like a reasonable solution. But wouldn't it be better if we were to have a configuration that allows you to set the maximum number of watchers? Do you know how many we configure when running Botpress (one per file, folder or the whole project)?.

davidvitora commented 2 years ago

@laurentlp looking at the code, it looks like we are setting one per file and folder since we want to know when each file changes and for our folder structure, I believe changing this behavior can bring multiple bugs to the product since Botpress heavily realies on files in bpfs=disk mode. Since this use case doesn't need watchers, this is the safest option in my opinion. This is not going to be a problem when using bpfs=database, since all files will be in the database.

OBS: this is really a problem only on really large bots, with 700+ flows and other files.