Squarespace / pgbedrock

Manage a Postgres cluster's roles, role memberships, schema ownership, and privileges
https://pgbedrock.readthedocs.io/en/latest/
Other
313 stars 35 forks source link

Ensure objects are not referenced multiple times within a spec #5

Closed zcmarine closed 6 years ago

zcmarine commented 6 years ago

Summary If a user referenced an object multiple times in a spec (e.g. schema ownership) then pgbedrock will just make the change at each spot (e.g. change ownership to role1 and then later change ownership to role2). While this isn't strictly wrong, it makes it too easy to make a mistake. Before running any of our analyzers we should verify that no object appears multiple times in the following cases:

I don't think there are any other areas at present where an object occurring multiple times would cause unexpected behavior, though it'd be worth doing a bit more deliberating on this to see if I've missed anything.

Key Actions

johnshiver commented 6 years ago

This is complete! https://github.com/Squarespace/pgbedrock/commit/958d08b35614a533291f4f542d0ce3939ee1dc4e

zcmarine commented 6 years ago

Well done! 👏👏