olmps/memo

[Server support] - Update collection-listing strategy from client filesystem

matuella opened this issue · 2 comments

This issue should solve adding new collections using only Firebase, thus allowing much more flexibility to the client applications when receiving new collection updates.

What it should do, technically speaking, is:

  • move all collections from flutter/ to firebase/;
  • then, with the admin SDK capabilities, every time an update occurs (in main branch) within this new folder of collections, run a script (using Github Actions, through a new workflow) to evaluate such changes, compare this new state to what's stored in the production firestore, and make the required writes to mirror this new state.

This is similar to what's occurring locally in VersionServices, although there is an additional complexity of handling both global and user collections - meaning that removing/updating past existing user collections should be made with extra care, as to not create any inconsistency.


Sub-issue that relates to the Server support - #136.

then, with the admin SDK capabilities, every time an update occurs (in main branch) within this new folder of collections, run a script (using Github Actions, through a new workflow) to evaluate such changes, compare this new state to what's stored in the production firestore, and make the required writes to mirror this new state.

Maybe there is a way for the action to pass the specific collections that changed when a push to main and has passed the conditional filters.

The syntax to filter are called paths (https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths) but I'm not sure if we are able to collect the file names that changed in a particular sub-folder.

but I'm not sure if we are able to collect the file names that changed in a particular sub-folder.

I've found a couple of alternatives if there is no default way to get these: