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 pre plan output being removed. #367

Merged
merged 1 commit into from
Nov 30, 2018
Merged

Fix pre plan output being removed. #367

merged 1 commit into from
Nov 30, 2018

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Nov 30, 2018

Prior to this change, we were formatting the output from terraform plan
inside the markdown_renderer. Part of this formatting is to remove all
output relating to refreshing state. The way we were doing this was to
simply delete all lines before the refreshing completes.

The problem with this approach was that any output from custom steps
that ran before plan would also be deleted. This change moves the
formatting of the plan output inside the plan step. Then the
markdown_renderer deals with the pre-formatted output and doesn't need
to delete anything before it combines all the step outputs into one.

Prior to this change, we were formatting the output from terraform plan
inside the markdown_renderer. Part of this formatting is to remove all
output relating to refreshing state. The way we were doing this was to
simply delete all lines before the refreshing completes.

The problem with this approach was that any output from custom steps
that ran before plan would also be deleted. This change moves the
formatting of the plan output inside the plan step. Then the
markdown_renderer deals with the pre-formatted output and doesn't need
to delete anything before it combines all the step outputs into one.
@codecov
Copy link

codecov bot commented Nov 30, 2018

Codecov Report

Merging #367 into master will decrease coverage by 0.03%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #367      +/-   ##
==========================================
- Coverage   70.54%   70.51%   -0.04%     
==========================================
  Files          61       61              
  Lines        3718     3720       +2     
==========================================
  Hits         2623     2623              
- Misses        908      909       +1     
- Partials      187      188       +1
Impacted Files Coverage Δ
server/events/markdown_renderer.go 91.89% <ø> (-0.88%) ⬇️
server/events/runtime/plan_step_runner.go 91.54% <83.33%> (-1.79%) ⬇️

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 01aca29...70d1948. Read the comment docs.

@lkysow lkysow merged commit a2c7e7a into master Nov 30, 2018
@lkysow lkysow deleted the output-bug branch November 30, 2018 15:06
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.

1 participant