datamade / how-to

📚 Doing all sorts of things, the DataMade way
MIT License
89 stars 12 forks source link

Create automation tool that updates cookiecutter whenever a pypi or node package upgrades #354

Closed smcalilly closed 1 month ago

smcalilly commented 11 months ago

Similar to dependabot with security updates, we could create a github action that upgrades python and javascript dependencies for the django cookiecutter. This would obsolete the manual, tedious process where we upgrade those dependencies whenever we notice they're old (which isn't the best method).

Here's one downside to this approach: what if the bot upgrades the dependencies and the changes break something in the cookiecutter? For example, IIRC, in the past a React upgrade broke how we render the react components and we had to upgrade React + change something in the cookiecutter. To address this problem, we can review the changes with a review app deployed to heroku (fully automated by gh actions!), and add some automated tests to ensure all parts of the cookiecutter app still works.

Are there any other downsides to this?

fgregg commented 11 months ago

i think some CI for the cookie cutter is brilliant.

hancush commented 11 months ago

I have used npm-check-updates for this exact task: https://www.npmjs.com/package/npm-check-updates

xmedr commented 7 months ago

The new github workflow was merged in and successfully upgraded dependencies this past Sunday!

The concern about dependencies breaking each other makes sense. And I do like the idea of tests to make sure things still run well with the upgrades, but what would that look like?

fgregg commented 7 months ago

as a one test, we could instantiate the cookie cutter instances and check that the main page loads?

antidipyramid commented 2 months ago

@xmedr will try CI integration with Heroku/Github Actions next.

xmedr commented 1 month ago

@hancush are there any general changes during your work getting NOAH set up to use wagtail after the cookiecutter updates that you think would be particularly useful for me to make in here while i'm fiddling around? i'm imagining there'd be some template adjustments to make

antidipyramid commented 1 month ago

Work continued in #371.