3 ms·
I would argue the opposite, actually. The storage model or database layer should be in a single repo. And thus there would be less code to grep through.
by dotancohen 4y ago
I would argue the opposite, actually. The storage model or database layer should be in a single repo. And thus there would be less code to grep through.
- hinkley 4y agoThat doesn't work because that repo needs to expose an API that accesses that table, now you have to prove the API is never called, and you're back to searching the entire code base for that function call (hopefully you've used meaningful function names instead of DRY ones...)
- willcipriano 4y agoAdd: log.info("get_user_by_user_id has been deprecated, please use the alternative API.") Into the repo method, push up the change, redeploy the projects that depend on the library and wait a while and grep the logs to see if it ever gets used. Monorepo is easier though.
- hinkley 4y agoDude, that just tells you if the table is used on the happy path. It does not tell you if it's only used by a customer whose godson is the CEO's favorite kid. Or if customers only use it right before a federal deadline for filing forms, or at the end of the quarter when it's time to generate reports. Which you didn't collect for 2 months.
- dotancohen 4y ago> Or if customers only use it right before a federal deadline for filing > forms, or at the end of the quarter when it's time to generate reports. You're right. How would you suggest to defend against these situations? I personally like to version my APIs, but that is robust insofar as code changes, not for database changes.
- hinkley 4y agoThe other responder liked monorepos for this. It’s not perfect, but it does help with making sure you had all of the code to search from, and once in a while the commit history adds additional clues.