hotosm / tasking-manager

Tasking Manager - The tool to team up for mapping in OpenStreetMap
https://wiki.openstreetmap.org/wiki/Tasking_Manager
BSD 2-Clause "Simplified" License
505 stars 273 forks source link

[ENHANCEMENT] Database snapshotting logic in Circle CI configuration is complex #5677

Open eternaltyro opened 1 year ago

eternaltyro commented 1 year ago

Current snapshot approach in the CI pipeline

Currently, the Database snapshot logic for TM4 PostgreSQL is complex.

Simplifying the snapshot process

The rough approach to simplifying and streamlining this process.

Old snapshot cleanup

If absolutely necessary, we can cleanup old snapshots by fetching snapshots older than "now date" at run time of every production deployment.

    --query "DBSnapshots[?(SnapshotCreateTime<='2023-03-05')].[DBSnapshotIdentifier]"

Ideally, this should be relegated to AWS Backup or a scheduled script.

dakotabenjamin commented 1 year ago

I am considering using this orb: https://circleci.com/developer/orbs/orb/ware2go/aws-rds

eternaltyro commented 1 year ago

Yes, the ORB is MIT licensed too. We have to assess compatibility with OIDC though, since the orb does not seem to take AWS_SESSION_TOKEN as one of the parameters which is required for temporary credentials.

What are your thoughts @dakotabenjamin on removing cleanup steps and snapshot deletion from the CI config altogether?