scripting / a8c-FeedLand-Support

A public repo for discussing FeedLand at A8C.
1 stars 0 forks source link

Updating feedland.com on wpvip #68

Closed cagrimmett closed 10 months ago

cagrimmett commented 10 months ago
  1. Pull in the code from the production branch of https://github.com/wpcomvip/feedland
    • First time you'll need to do git clone https://github.com/wpcomvip/feedland.git and then cd into that directory
    • Other times you'll just need to be in the correct directory and do git fetch && git pull
  2. Make changes to config.js or run npm update or both
    • note that you'll want node v 18.18.2 and npm v 9.8.1
    • Double check that package-lock.json is using the the new version if running npm update
  3. Run git add . and git commit -m "Update packages".
  4. Run git push.

It will take about a minute to deploy. You can see when deployments are triggered here and their progress update: https://dashboard.wpvip.com/apps/7490/production/code/deployments

There is also a rollback button on that page on the far right column of the table if something is going horribly wrong.

scripting commented 10 months ago

@cagrimmett -- thanks for posting this but it's pretty far over my head. i don't use git at this level.

i'm guessing i could use the "GitHub Desktop" app to manage this, I think it's doing what you outline, under the covers.

i don't understand why i care about versions of node or npm -- i'm not going to run those locally, right? those are meant to be run on the cloud system??

what i want to do is this:

  1. edit config.js in the browser in github. i can see how to do that.
  2. then tell vip to run NPM on the feedland package.
  3. then restart the app.

is there a way to do that??

cagrimmett commented 10 months ago

Hi @scripting.

i don't understand why i care about versions of node or npm -- i'm not going to run those locally, right? those are meant to be run on the cloud system??

We run npm update locally on one of our machines to generate the new package-lock.json file and then push that up to the server and the server then updates to use the versions specified in package-lock.json. That is why the node version locally matters, as we want to make sure the generated version of package-lock.json is generated by the same engine the server is using to read it and run the app.

what i want to do is this:

  1. edit config.js in the browser in github. i can see how to do that.
  2. then tell vip to run NPM on the feedland package.
  3. then restart the app.

is there a way to do that??

You can definitely do step 1, edit config.js in the browser version of GitHub and commit it. That will auto deploy.

Step 2 can only be done locally right now and then pushed up to GitHub, which auto deploys to the server. That way all changes are version controlled and we can guarantee that what is in package-lock.json matches what the server is running. Step 3 (restarting the app) happens automatically after code is deployed from GitHub.

scripting commented 10 months ago

@cagrimmett -- that helps a lot.

i think i can see how to do it using the tools i know how to use.

i've never looked inside package-lock.json, btw -- so i'm going to go learn about it.

thanks for the help. ;-)

fmfernandes commented 10 months ago

We now have a GitHub action to do those updates, which can be accessed through the GitHub UI. Here's a step-by-step:

  1. Go to this page — It can be access through the actions tab and clicking on Update NPM packages on the sidebar.
  2. Click on the Run workflow dropdown and then click on the green Run workflow button.
  3. You’ll see a new entry appear below that dropdown and you can leave the page.
  4. Go to the Pull requests tab. There will be an Update NPM packages titled PR. Click on that.
  5. Click the green Merge pull request button that will trigger a deploy to our instance.
scripting commented 10 months ago

I just went through steps 1 through 3 but there were no pull requests as indicated in step 4.

There are new versions of feedland and feedlanddatabase.

fmfernandes commented 10 months ago

Maybe I should've noted that this isn't instant 😅

You can keep on the page that you triggered the workflow to see its status if you want to. I can see a PR open that was triggered by your workflow run judging by the time it took to run.

Feel free to merge it 👍🏻

scripting commented 10 months ago

Guys -- I still want to have you (@fmfernandes or @cagrimmett) do the updates on weekdays, just because I am totally overloaded with systems I am managing. I'm trying close them off so I can focus. My burnout level is reaching new highs, I can't keep this up much longer. The good news is the product is settling down, so I am able to stop worrying about fairly large pieces. But a big problem was reported yesterday that's probably in feedlanddatabase, and that's going to drag me back into the plumbing to which I say arrrrgh!

I wouldn't have thought I could cover this much territory esp at my age (no shit, it really does get harder as you get older). But it's working, and having your support makes a big difference. Just checking my work, because I do make mistakes, or even if I don't it helps me relax a bit to know people who care are watching and will let me know if I f*ck up. ;-)

I also get that it wasn't your intention to make me responsible for the software running on the VIP server, but that wasn't clear in the presentation of the new feature, and it came at the end of a stressful day and I haven't had any time off in forever, so I'm trying to make this come to a "ship" so we can start having the fun of building the systems that this software enables. I desperately want to be on the other side of this, working with smart users exploring new frontiers of internet collaboration.

I'm starting to get ideas for new applications that can be done with FeedLand. That's why we're doing this, for what happens when we can assume FeedLand is there, running at scale, and doing its job quietly without needing fixes. :-)

Onward!

cagrimmett commented 10 months ago

@scripting No worries, we can keep doing the updates and testing!

scripting commented 10 months ago

Thanks @cagrimmett -- so we could use an update now. ;-)

This update will make it possible to discern the feedlanddatabase version from the About dialog.

It also has a fix for reading lists that don't specify categories. Previously it would generate ,undefined, as the category string. This would actually show up like that on Feed Info page.

image
cagrimmett commented 10 months ago

Deployed, putting testing notes in Slack.

scripting commented 9 months ago

I just went through the steps to update feedland.com, and the versions changed. It took a few minutes before it showed up. I guess there must be some latency here.

The Check Now button is on this page and appears to work.

https://feedland.com/?readinglist=https%3A%2F%2Ffeedland.com%2Fopml%3Fscreenname%3Dcagrimmett%26catname%3Dbloggers