AI summary
Vercel Flags 现在可以在部署即将进入生产环境时进行拦截:如果代码中声明了某个标志,但项目中尚未创建它,部署就会被阻止。否则应用可能静默回退到该标志的默认值,甚至意外开启本应关闭的功能。该检查在部署就绪时运行,发现缺失标志会失败并列出清单,便于在重新部署前逐一创建。检查会读取 Flags SDK 的发现端点,并要求项目环境中设置 FLAGS_SECRET。所有套餐的团队都可以在项目的构建与部署设置中启用该检查并将其标记为必需。
Translation(model translation, not the source's own text)
文章标题:在功能标志进入生产环境前捕获缺失项
正文: Vercel Flags 现在可以在以下情况下阻止部署进入生产环境:你在代码中声明了某个标志,但尚未在项目中创建它。缺少该定义时,你的应用可能会静默回退到该标志的默认值,即使这会开启一个你本打算保持关闭的功能。
Flag Definitions Present Deployment Check 会在部署就绪时运行。如果有任何标志缺失,该检查会失败并在结果中列出它们,你可以在重新部署前逐一创建。
该检查会读取你的 Flags SDK 发现端点,并要求在项目环境中设置 FLAGS_SECRET。
要开启阻止功能,所有套餐的团队都可以在项目的 Build and Deployment 设置中启用该检查并将其标记为必需。有关设置详情,请参阅 Deployment Checks 文档。
Only about 373 characters could be extracted — the rest did not come through (common on sites that need scrolling or a login). Read the original for the full piece.
Published by Vercel Blog
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗