cityofaustin / atd-data-tech

Austin Transportation Data & Technology Services
17 stars 2 forks source link

Create a Github Action in the Moped repo to test DB migrations and metadata on PRs against `main` #10468

Open mddilley opened 2 years ago

mddilley commented 2 years ago

As Moped developers, we would like to make sure that the local Hasura cluster spins up successfully so that we can catch any conflicts between the migrations and metadata before merge. In the past, we have had a few occasions where the order that updates to the project_list_view are applied locally (in order by migration timestamps) and in staging/production (as they are merged) have created regressions or de-sync'd the DB schema from permissions metadata.

To catch this before merge, we could add a Github Action that runs when a PR is opened against main. The action would be almost identical to the SchemaSpy build action except it wouldn't run the documentation bash script.

A failure of this action would:

See: https://github.com/cityofaustin/atd-moped/pull/822 https://github.com/cityofaustin/atd-moped/pull/680 https://austininnovation.slack.com/archives/CNUEPKLB1/p1665179295381869

frankhereford commented 2 years ago

Thanks for writing this up Mike! I'm going to close #10446 in deference to this issue. I had some thoughts on there, and it looks like they are very tightly aligned to what you have here.

I think we'd have to maybe ensure (or test in the github action) is that main merges into the feature branches && that it builds. Am I thinking this through right?

mddilley commented 2 years ago

@frankhereford Sorry for the dupe - totally didn't see the other issue. And, yes, bringing main into the feature branch is key. You are spot on about that! 🎯

chiaberry commented 2 years ago

https://github.com/cityofaustin/atd-data-tech/issues/9724