Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Convection detects re-ordered scalar resources as a diff #215

Open
tomhart-r7 opened this issue Oct 14, 2016 · 1 comment
Open

Convection detects re-ordered scalar resources as a diff #215

tomhart-r7 opened this issue Oct 14, 2016 · 1 comment

Comments

@tomhart-r7
Copy link

tomhart-r7 commented Oct 14, 2016

Description

When doing a convection diff, convection may re-order resources, resulting in a configuration that is correct, but a diff that contains extra noise. This means the developer must carefully read a diff to be satisfied that it is correct. Eventually this will cause someone to miss an error.

Expected behavior

When I add a new resource, I see only Create statements, and not a list of idempotent Update statements.

Observed behavior

When I add a new resource, I see a Create statements buried in a list of idempotent Update statements.

Steps to Reproduce

  1. Create a stack s3buckets whose template contains a single s3_bucket resource.
  2. Converge the s3buckets stack.
  3. Add two s3_bucket_policy resources linked to the bucket to the s3buckets stack.
  4. Converge the s3buckets again (notice only Create events being emitted).
  5. Add a new s3_bucket_policy between the other two in your convection template.
  6. Notice that there are updates to the second stack and a new create.

The expected behavior would be that only the new policy get printed as create but since the policy elements are scalar and the order changes we interpret it as a diff.

@erran-r7
Copy link
Contributor

erran-r7 commented Nov 2, 2016

Example reordering: rapid7/...#653

@tomhart-r7 that's an internal convection repository. 😉 External users won't be able to access that link but we shouldn't leak locations either. (edited your message)

@erran-r7 erran-r7 changed the title Convection re-orders resources Convection re-orders policy resources Nov 2, 2016
@erran-r7 erran-r7 changed the title Convection re-orders policy resources Convection detects re-ordered policy resources as a diff Nov 2, 2016
@erran-r7 erran-r7 changed the title Convection detects re-ordered policy resources as a diff Convection detects re-ordered scalar resources as a diff Nov 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants