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

Update defaultwhenmodified to include **/terragrunt.hcl #858

Merged
merged 8 commits into from
Jan 20, 2020
Merged

Update defaultwhenmodified to include **/terragrunt.hcl #858

merged 8 commits into from
Jan 20, 2020

Conversation

JoshiiSinfield
Copy link
Contributor

This allows a pre-existing TG 0.19+ project to autoplan if no when_modified is set.

Closes #803

I haven't spun this up and tested it yet, not had time but wanted to get the code change up here.

@lkysow
Copy link
Member

lkysow commented Nov 27, 2019

Thanks for the PR :D, looks like you're on the right track. You'll need to update the tests before I can merge though.

@lkysow lkysow added the waiting-on-response Waiting for a response from the user label Nov 27, 2019
@codecov
Copy link

codecov bot commented Nov 28, 2019

Codecov Report

Merging #858 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #858      +/-   ##
==========================================
- Coverage   71.87%   71.83%   -0.04%     
==========================================
  Files          65       65              
  Lines        5244     5213      -31     
==========================================
- Hits         3769     3745      -24     
+ Misses       1188     1183       -5     
+ Partials      287      285       -2
Impacted Files Coverage Δ
server/events/runtime/env_step_runner.go 100% <ø> (ø) ⬆️
server/events/yaml/raw/autoplan.go 100% <100%> (ø) ⬆️
server/events/vcs/azuredevops_client.go 73.12% <0%> (-0.93%) ⬇️
server/events/project_finder.go 93.82% <0%> (-0.56%) ⬇️
server/events/project_command_runner.go 74.1% <0%> (-0.23%) ⬇️
server/events/yaml/raw/global_cfg.go 0% <0%> (ø) ⬆️
server/events/models/models.go 75% <0%> (ø) ⬆️
server/events/working_dir.go 75% <0%> (+0.71%) ⬆️

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 50089f3...eab42dd. Read the comment docs.

@JoshiiSinfield
Copy link
Contributor Author

Hi @lkysow ,

Hopefully looking better now. :)

Hope you're OK with me extracting the duplication to a function also?

Cheers,
Josh

This allows a pre-existing TG 0.19+ project ot autoplan if no when_modified is set

Closes #803
Also added setter for Autoplan type to allow overriding enabled from default struct
Copy link
Member

@lkysow lkysow left a comment

Choose a reason for hiding this comment

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

I think a helper in the tests is fine however I don't like the new model or set function.

I prefer the config to be explicit. It's a personal preference but that's how I feel.

server/events/project_command_runner_test.go Outdated Show resolved Hide resolved
@JoshiiSinfield
Copy link
Contributor Author

Thanks for the review 👍. OK, I'll remove the functions and put the config back then. Just seemed daft to have the same thing repeated 20+ times, following the DRY principle 😄

…ments

This reverts commit 0f93976.

Revert "Fix formatting via make fmt"

This reverts commit 8ba1b6d.

Revert "Update tests to remove duplicate code by adding helper function."

This reverts commit c2275ed.
@JoshiiSinfield
Copy link
Contributor Author

Hi @lkysow,

I sorted out the explicit config and removed the new method etc.

I can't seem to resolve the "Changes requested" from the PR though?

Cheers,
Josh

@lkysow
Copy link
Member

lkysow commented Dec 2, 2019

I think I have to re-review. Will get to it when I can.

@JoshiiSinfield
Copy link
Contributor Author

Hi @lkysow ,

hope you had a good break over new year etc.

Have you had a chance to take another look at this at all?

Cheers,
Josh

@lkysow lkysow merged commit e78cdd9 into runatlantis:master Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-response Waiting for a response from the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

autoplan not working for .hcl files with default auto plan
2 participants