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

fix diff with local yaml templates #541

Merged
merged 3 commits into from
Feb 27, 2018

Conversation

troyready
Copy link
Contributor

#540 fixed the generally broken diffs in #530 , but introduced a problem with yaml templates.

@codecov-io
Copy link

codecov-io commented Feb 23, 2018

Codecov Report

Merging #541 into master will increase coverage by 0.1%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #541     +/-   ##
=========================================
+ Coverage   87.47%   87.57%   +0.1%     
=========================================
  Files          95       95             
  Lines        6114     6123      +9     
=========================================
+ Hits         5348     5362     +14     
+ Misses        766      761      -5
Impacted Files Coverage Δ
stacker/tests/actions/test_diff.py 100% <100%> (ø) ⬆️
stacker/actions/diff.py 59.57% <61.53%> (+4.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ae24af...1083a58. Read the comment docs.

Copy link
Contributor

@ejholmes ejholmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a functional test to tests/suite.bats that reproduces the problem?

' }\n',
'}\n'
]
self.assertEquals(normalized_template, diff._normalize_json(template))
Copy link
Contributor

@ejholmes ejholmes Feb 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just pull _normalize_json off of the Diff class and into a function. Easier to test since you don't need to initialize anything.

@troyready
Copy link
Contributor Author

@ejholmes good thought; helped me catch another error in the display logic. I also moved the normalize_json function out as requested.

Copy link
Contributor

@ejholmes ejholmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks @troyready!

else:
param_diffs = diff_parameters(old_params, new_params)
param_diffs = diff_parameters(old_params, new_params)
if param_diffs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I noticed this bug recently as well. Thanks for fixing!

@ejholmes ejholmes merged commit fdc433a into cloudtools:master Feb 27, 2018
@troyready troyready deleted the fix_diff_with_yaml_template branch February 27, 2018 15:47
phrohdoh pushed a commit to phrohdoh/stacker that referenced this pull request Dec 18, 2018
…emplate

fix diff with local yaml templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants