cloudflare / cloudflare/developer-platform
Unexpected behaviour setting env vars can lead to production outtages
- 主要言語
- 言語のデータがありません
- スター
- 1
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### Please provide a link to a minimal reproduction
https://discord.com/channels/595317990191398933/1468179236803182736
### Describe the Bug
**The Issue:**
When adding Environment Variables or Secrets via the Cloudflare Workers dashboard, the system automatically creates a new deployment based on the **latest entry in the Version History**, rather than the currently **Active Deployment.**
**Steps to Reproduce:**
1. Deploy a stable version to production (e.g., "Production v1").
2. Upload a "Preview" deployment (e.g., "Preview v2") that is not set to active (simulating a Pull Request or staging build).
3. Go to Settings > Variables and Secrets and add a new variable.
4. The system deploys the change.
**The Consequence:**
The new deployment created by adding the variable will contain the code from the Preview/Staging build (Preview v2) instead of the Production build. This causes untested or unreleased code to accidentally overwrite the live production environment. The user expects the variable to be applied to the currently active production code.
### Please provide any relevant error logs
https://github.com/user-attachments/assets/a00f6998-4ccb-498b-a9a6-b88c9291bb3b
コントリビューションガイド
調査の方向性
リンクされた Discord の再現手順から始めて、ダッシュボードのフローを繰り返します。安定した本番 deployment を active にし、非 active の preview deployment をアップロードしてから、Settings > Variables and Secrets で変数を追加します。結果の deployment に最新の preview コードではなく active な本番コードが含まれていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 領域
- cloud, devops
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100