cloudflare / cloudflare/developer-platform
Unexpected behaviour setting env vars can lead to production outtages
- Langage dominant
- Aucune donnée de langage
- Étoiles
- 1
- Forks
- 0
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction Discord liée et répétez le parcours du dashboard : rendez actif un deployment de production stable, téléversez un deployment de preview non actif, puis ajoutez une variable sous Settings > Variables and Secrets. C’est terminé lorsque le deployment résultant contient le code de production actif plutôt que le dernier code de preview.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Domaine
- cloud, devops
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100