知识卡片
跨栈依赖需要契约
拆成可独立部署的小栈后,消费者仍可能依赖提供者创建的子网等资源。把固定资源名写进消费者,会让提供者改名时必须同步修改消费者,也令消费者难以单独测试。发现机制需要约定稳定的输出契约,不能仅把硬编码换成另一种隐式耦合。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 集成基础设施栈 · 查看原书依据
This example hardcodes the dependency between the two stacks, creating very tight coupling. Testing changes to the cluster stack code won’t be possible without an instance of the networking stack. If someone makes a change to the networking stack that involves changing the names of the subnets, they must know and remember to update the
参考来源
- 位置:《Infrastructure As Code》第9章《集成基础设施栈》(来源项目:book-sources;源文件:extracted/Infrastructure As Code/_epub-src/OEBPS/ch09.html)
- 结论依据:原文说明拆成可独立部署的小栈后,消费者仍可能依赖提供者创建的子网等资源;本卡据此解释其用途及适用边界。
- 原始内容:This example hardcodes the dependency between the two stacks, creating very tight coupling. Testing changes to the cluster stack code won’t be possible without an instance of the networking stack. If someone makes a change to the networking stack that involves changing the names of the subnets, they must know and remember to update the