aws / aws/aws-codedeploy-agent
Feature request: Guarantee deployment order on race conditions
- Lingua principale
- Rust
- Stelle
- 337
- Fork
- 195
- Merge medio
- 10h 54m
- PR unite (30g)
- 4
Descrizione
This is not exactly an issue for the CodeDeploy Agent itself, but rather for the product API. Anyway, I am posting it here since I hope it will make it way into the CodeDeploy product team and I don't know a better place to try. So:
When calling the CodeDeploy API to trigger a new deployment from build pipelines (GitHub Actions, in my case, if that matters), it may happen that a `CreateDeployment` call fails with a `DeploymentLimitExceededException` because another deployment is currently running.
In this case, all you can do with the [JavaScript SDK](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CodeDeploy.html) is to call the `waitFor` method to... well... wait for the current deployment to finish and then try again.
Now, with long-running deployments and/or frequent commits, this effectively makes different builds race for the next deployment to happen. The result might not be what you would expect, regarding the order of deployments as well as the final (last) deployment made.
My suggestion is to add a new, optional parameter to the `CreateDeployment` call that can pass some kind of identifier. The API could reject `CreateDeployment` calls with a dedicated error code if this parameter is not monotonically increasing with regard to the last deployment created (or the currently active deployment?).
With this, things like CI build sequence numbers, build start timestamps or similar could be used to make sure we deploy "in order", possibly skipping deployments if they have been "overtaken" by newer ones.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Questa richiesta riguarda l’API del prodotto CodeDeploy, non un file agent denominato. Inizia esaminando il comportamento di CreateDeployment, DeploymentLimitExceededException e la documentazione di waitFor dell’SDK JavaScript menzionata nell’issue. Il lavoro sarebbe completato quando esistessero una progettazione e un’implementazione a livello di API in grado di garantire o rifiutare i deployment fuori ordine.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, javascript
- Ambito
- api, cloud, devops
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 15/100