▲ | MrDarcy 9 days ago | ||||||||||||||||||||||
I’ll bite. We’re expanding into Europe. I literally copied and pasted our entire infrastructure into a new folder named “Europe” Now there’s a new requirement that only applies to Europe and nowhere else and it’s super easy and straight forward to change the infrastructure. I don’t see how it was a poor choice to literally copy and paste configs that result in hundreds of thousands of lines of yaml and I have 25 yoe. | |||||||||||||||||||||||
▲ | chipsrafferty 9 days ago | parent | next [-] | ||||||||||||||||||||||
I think the most common way to approach that problem would be to have a "default config", and overrides. Could you go into more detail about why you didn't do this instead? Downsides with your approach is: 1. Now whenever you want to change something both in Europe and (assuming) USA you have to do it in 2 places. If the change is the same for both, in my system, you could just update the default/shared config. If the change is different for both it's equally easy, but faster, since the overrides are smaller files. 2. It's not clear what the difference is between Europe and USA if there is 1 line different amongst thousands. If there are more differences in the future, it becomes increasingly difficult to tell the difference easily. 3. If in the future you also need to add Africa, you just compounded the problems of 1. and 2. | |||||||||||||||||||||||
| |||||||||||||||||||||||
▲ | tasuki 9 days ago | parent | prev [-] | ||||||||||||||||||||||
> I don’t see how it was a poor choice to literally copy and paste configs that result in hundreds of thousands of lines of yaml Perhaps one day you will. I'm a dev who worked with infra people who had your philosophy: many copy pasted config files. Sometimes I needed to add an env var to a service. Expressing "default to false and only set it to true in these three environments" took changing about 30 files. I always made mistakes (usually of omission), and the infra people only ever caught them at deployment time. It was hell. |