Skip to content

[IMPROVE][APPS] New storage strategy for Apps-Engine file packages#22657

Merged
thassiov merged 22 commits intodevelopfrom
apps/change-storage-strategy
Sep 23, 2021
Merged

[IMPROVE][APPS] New storage strategy for Apps-Engine file packages#22657
thassiov merged 22 commits intodevelopfrom
apps/change-storage-strategy

Conversation

@d-gubert
Copy link
Member

Proposed changes (including videos or screenshots)

This is an enabler for our initiative to support NPM packages in the Apps-Engine.

Currently, the packages (zip files) for Rocket.Chat Apps are stored as a base64 encoded string in a document in the database, which constrains us due to the size limit of a document in MongoDB (16Mb).

When we allow apps to include NPM packages, the size of the App package itself will be potentially very large (I'm looking at you node_modules). Thus we'll be changing the strategy to store apps either with GridFS or the host's File System itself.

Issue(s)

Steps to test or reproduce

Further comments

Implementation on the Apps-Engine side: RocketChat/Rocket.Chat.Apps-engine#427

@d-gubert d-gubert force-pushed the apps/change-storage-strategy branch from a863bca to 3de2473 Compare July 13, 2021 17:03
d-gubert and others added 7 commits July 22, 2021 10:41
* Enable the user to choose a storage for the apps' source code

* Rename app storage proxy module

* Adjust operation of the app source storage proxy module

* Make setting fs path for app storage its own function

* Remove log statement
* Migrate apps source file to gridfs

* Remove unused dependencies

* Convert base64 zip to buffer

* Prevent AppServerOrchestrator from initializing twice

* Refactor migration to use existing models instead of custom code

* Add description for noop on promise catch

Co-authored-by: Douglas Gubert <douglas.gubert@gmail.com>
@d-gubert d-gubert added this to the 4.0.0 milestone Sep 6, 2021
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have added 1 .js files, please convert to ts(x).
server/startup/migrations/v236.js

@github-actions github-actions bot dismissed their stale review September 23, 2021 22:06

js files removed

@thassiov thassiov marked this pull request as ready for review September 23, 2021 22:07
@thassiov thassiov changed the title [IMPROVE] New store strategy for Apps-Engine file packages [IMPROVE][APPS] New storage strategy for Apps-Engine file packages Sep 23, 2021
@thassiov thassiov merged commit 0a32226 into develop Sep 23, 2021
@thassiov thassiov deleted the apps/change-storage-strategy branch September 23, 2021 22:59
@sampaiodiego sampaiodiego mentioned this pull request Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments