scripting / feedlandInstall

Instructions for setting up a FeedLand server.
GNU General Public License v3.0
3 stars 1 forks source link

Static files in SQL feature #39

Open scripting opened 9 months ago

scripting commented 9 months ago

What is this?

There's a new release of FeedLand that can store static files in a MySQL table instead of the local filesystem or S3.

Converting data is automatic

You don't have to worry about converting the data from the previous format to the new format, we do that automatically.

How to

If you have an existing installation and want to upgrade --

  1. npm update to get the new versions of daveappserver (0.7.6) and feedland (0.5.74).
  2. Add "flStaticFilesInSql": true, to config.json.
  3. Run the SQL code to create the new staticfiles table in your feedland database.

Code review

If you want to review the new code (please do), the new stuff in appserver.js and feedland.js.

Questions are welcome below

fmfernandes commented 9 months ago

Running npm update I didn't get 0.5.74, I got 0.5.73 instead, which seems correct on NPM. Probably missed publishing the newer version on NPM? 🙂

scripting commented 9 months ago

@fmfernandes -- thanks for the report. :-)

i just re-published feedland and you should now have 0.5.74.

scripting commented 9 months ago

there are so many moving parts in a release like this, i probably forgot something else too. thanks for checking. ;-)

fmfernandes commented 9 months ago

Thanks @scripting, that worked. FeedLand is now at 0.5.74, but requiring it and then running a fresh npm install didn't bring daveappserver@0.7.6, instead it's on 0.6.42. I could force it to download the latest daveappserver by adding:

  "overrides": {
    "feedland": {
      "daveappserver": "0.7.6"
    }
  }

to my package.json.

I can see that on feedland package.json daveappserver is set to version ^0.6.24, I'm wondering if npm doesn't like when version starts with 0.x.x to update to the next minor version, i.e. from 6 to 7.

scripting commented 9 months ago

@fmfernandes -- i don't really understand how all that stuff works, chris was just telling me what to do, so you should do the same here. anyway i just changed the version number in the package.json for feedland. you should get 0.5.76 now and the correct daveappserver. and there's an easter egg in 0.5.75 which I will show you when you've done the update. ;-)

scripting commented 9 months ago

Here's a clue to the easter egg. :-)

image
fmfernandes commented 9 months ago

That worked, thanks!

FeedLand is now at 0.5.76 and daveappserver on 0.7.6. Testing now 🚀

scripting commented 9 months ago

Are you sure you have 0.5.76? I added a feature in 75 that isn't showing up..

scripting commented 9 months ago

You should see this in the upper right corner of the screen when you go to A8C.

image

I'm seeing [%feedlandVersion%] for the first number.

scripting commented 9 months ago

Now it's working. We are testing the new software. ;-)

fmfernandes commented 9 months ago

I'm seeing [%feedlandVersion%] for the first number.

~That's interesting. I'm not seeing it at all. But if I click on username > about FeedLand the popup correctly says FeedLand v0.7.6.~

It's showing up now. Always cache, huh?

scripting commented 9 months ago

Do a hard reload there's a new version of the client software.

scripting commented 9 months ago

I have to take a break.

What you can do is watch the new staticfiles table, as you use the software. You should see your appPrefs.json file update. Use the Bookmark menu, that will also save bookmarks.opml into the table.

When I come back I'll check out settings at a functional level, I already see a problem, but need a break before I dig in.

Make sense?

fmfernandes commented 9 months ago

Sure thing! 😎

scripting commented 9 months ago

@fmfernandes -- first thing -- the test I wrote the other day fails here.

testUserDatafiles ()

So that's the very first thing to check. Is anything showing up in the staticfiles table?

I will add some console.log's that make it clear that we're going through the callbacks in feedland.js.

Screen shot

image

scripting commented 9 months ago

@fmfernandes -- there's a new version, v0.5.77 that has two new console.log messages, one for each:

  1. getStaticFileInSql
  2. publishStaticFileInSql
scripting commented 9 months ago

BTW, I wanted to be sure this stuff works on a server, I had developed it on a local machine, so I set up feedland.org to store static files in an sql table, and it looks like it's working.

image

fmfernandes commented 9 months ago

Hi Dave, I've just pushed 0.5.77 to our server. I'll check the database for entries on staticfiles and report back.

scripting commented 9 months ago

It doesn't pass the testUserDatafiles () test.

fmfernandes commented 9 months ago

I can see entries on staticfiles for both our users but I'm still having the same issue when trying to save my feed title or description. It doesn't load the new values when opening the modal again.

scripting commented 9 months ago

don't worry about that now. first let's get basic storage working. one step at a time. ;-)

scripting commented 9 months ago

testUserDatafiles () still doesn't work.

very puzzling..

scripting commented 9 months ago

nothing is going to work until that works

i'm wiped out for the day, have to pick this up again tomorrow...