Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Teams): team manifest logical IDs are dependent on file order #730

Open
paulchambers opened this issue Jun 16, 2023 · 0 comments
Open

(Teams): team manifest logical IDs are dependent on file order #730

paulchambers opened this issue Jun 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@paulchambers
Copy link

paulchambers commented Jun 16, 2023

Describe the bug

yaml-utils / applyYamlFromDir uses the index into the list of files as part of the logical ID for each manifest.

This results in the ID of each resource changing if the order of files in the directory changes.

Expected Behavior

Adding or removing manifests in a team directory should not result in logical ID changes

Current Behavior

Adding or removing manifests in a team directory results in unexpected logical ID changes and deployment errors

Reproduction Steps

  1. Deploy a cluster with a team with a teamManifestDir and a manifest "b.yaml"

This manifest will get a logical ID containing b0

  1. Add another manifest "a.yaml"

  2. Run synth

You will now have two resources to add:

a0
b1

and one resource to remove:

b0

  1. Run deploy

a0 will be added successfully
b1 will fail to be added as the kubectl handler considers it a new resource and uses create but the resource added by b0 still exists

  1. Deployment will then fail and rollback

Possible Solution

Don't use the file index as part of the logical ID

Additional Information/Context

No response

CDK CLI Version

2.81.0 (build bd920f2)

EKS Blueprints Version

1.9.1

Node.js Version

v18.16.0

Environment details (OS name and version, etc.)

Windows 11

Other information

No response

@paulchambers paulchambers added the bug Something isn't working label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant