此卡片不在当前主题的阅读序列中,可返回主题继续阅读。
知识卡片
代码重构不保资源安全
重构是在不改变外部行为的前提下改结构。基础设施代码在编辑器中重构通过测试,不表示应用到真实资源时无损;把资源定义从旧栈移到新栈,工具可能先删除再创建,造成中断或数据丢失。必须分别计划代码结构迁移和运行资源归属迁移。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 变更既有基础设施 · 查看原书依据
With infrastructure, we can differentiate between refactoring the infrastructure code and refactoring infrastructure resources. You can use an IDE to refactor code to improve its structure and even pass automated tests. But applying the refactored code to running infrastructure might wreak havoc, destroying data and
参考来源
- 位置:《Infrastructure As Code》第20章《变更既有基础设施》(来源项目:book-sources;源文件:extracted/Infrastructure As Code/_epub-src/OEBPS/ch20.html)
- 结论依据:原文在该段定义概念并解释相关过程或限制,支撑“重构是在不改变外部行为的前提下改结构”这一核心结论;正文的用途与边界据同小节后续论述整理。
- 原始内容:With infrastructure, we can differentiate between refactoring the infrastructure code and refactoring infrastructure resources. You can use an IDE to refactor code to improve its structure and even pass automated tests. But applying the refactored code to running infrastructure might wreak havoc, destroying data and