Bootstrap: bootstrapping multiple environments with same bootstrap-bucket-name causes inconsistent stack creation
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- aws, typescript
Línea de trabajo
Comienza con BootstrapEnvironmentOptions y la implementación de la CLI en packages/aws-cdk/lib/cli/cdk-toolkit.ts en las líneas 963-989; después, inspecciona BootstrappingParameters en packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts. Traza cómo bootstrapEnvironment recibe estas opciones y determina cómo se pueden definir los parámetros por entorno. La tarea estará terminada cuando inicializar varias entornos con un nombre de bucket personalizado ya no haga que los entornos posteriores fallen debido a una configuración compartida.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bootstrap fails when multiple environments are being bootstrapped with a custom bucketName
Description
Users can pass in BootstrappingParameters to modify how resources are created during bootstrap:
https://github.com/aws/aws-cdk-cli/blob/7517ecc2ded9169028540bc3bfdc8e320b161043/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts#L66-L72
If bucketName is passed in, bootstrap will attempt to create the bucket. If the bucket already exists, the bootstrap operation will fail.
When bootstrapping multiple environments, it is possible to pass in bucketName. However, this will cause at least one environment to fail bootstrapping. Assuming the bucket name is not already taken, the first environment that is bootstrapped will use that bucket name and succeed. All other environments will fail to bootstrap, since the bucket name is already taken.
Reproduction
Command-line:
cdk bootstrap --all \
--bootstrap-bucket-name my-custom-parameters-bucket-481665128236 \
aws://481665128236/us-east-2 \
aws://481665128236/us-west-1
Result:
Only one environment is bootstrapped successfully.
Proposed fix
BootstrappingParameters should be passed in per-environment. It should remain optional. The current CLI implementation is as follows:
https://github.com/aws/aws-cdk-cli/blob/7517ecc2ded9169028540bc3bfdc8e320b161043/packages/aws-cdk/lib/cli/cdk-toolkit.ts#L963-L989
BootstrapEnvironmentOptions is bootstrap-action-scoped (i.e. account-scoped), but it is passed into bootstrapEnvironment, an environment-scoped (i.e. region-scoped) function.
Consider something like the following as a param for bootstrap:
interface EnvironmentBootstrapConfig {
readonly environment: string; // The environment descriptor (e.g. 'aws://123456789012/us-east-1')
readonly parameters?: BootstrappingParameters;
// Other environment-specific options that were previously in BootstrapOptions
}
- Lenguaje dominante
- TypeScript
- Estrellas
- 110
- Forks
- 138
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 55
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aws/aws-cdk-cli
-
aws-cdk bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
aws/aws-cdk-cli#2179 ·
Los mantenedores suelen responder en 1 día
-
(cli): deploy waits forever when an AWS API call gets no response, because requestTimeout only logs a warningPosiblemente ocupada @abhiramshaji-cyber la tomó hace 27 días. Abiertoaws-cdk bug p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
aws/aws-cdk-cli#2097 ·
Los mantenedores suelen responder en 1 día
-
(bootstrap) FilePublishingRoleDefaultPolicy permission incorrect when FileAssetsBucketKmsKeyId is an ARN valuePosiblemente ocupada @lemon0333 la tomó hace 95 días. Abiertobug p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
aws/aws-cdk-cli#921 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
(garbage-collection): cdk gc takes hours on a large bootstrap bucketPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
aws/aws-cdk-cli#2165 ·
Los mantenedores suelen responder en 1 día
-
(cli): cdk flags --set always reports no template differences before applying flagsPosiblemente ocupada @go-to-k la tomó hace 9 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
aws/aws-cdk-cli#2153 ·
Los mantenedores suelen responder en 1 día
Todos los issues de aws/aws-cdk-cli
Issues similares
-
Diagram: Gantt qa-manually-tested Type: Bug / Error
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
mermaid-js/mermaid-v13#1255 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Name Option For /gifAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
BaseAdresseNationale/adresse.data.gouv.fr#2620 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día