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

Better logging and error handling when cloning terraform src code #178

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

shadycuz
Copy link
Member

Closes #29

Better late than never?

Sometimes the terraform source code repo is not cloned correctly. When
this happens the InvalidGitRepositoryError exception is raised. To fix
it the user must delete the directory and try again but they did't know
the path to the directory. This commit logs the path to the directory
but also catches the exception and removes the directory and reclones it.
@shadycuz shadycuz added bug Something isn't working patch labels Jun 14, 2023
@codecov
Copy link

codecov bot commented Jun 14, 2023

Codecov Report

Merging #178 (2494707) into develop (7890d8f) will increase coverage by 1.95%.
The diff coverage is 76.00%.

@@             Coverage Diff             @@
##           develop     #178      +/-   ##
===========================================
+ Coverage    73.41%   75.37%   +1.95%     
===========================================
  Files           16       16              
  Lines         1042     1076      +34     
  Branches       153      158       +5     
===========================================
+ Hits           765      811      +46     
+ Misses         237      229       -8     
+ Partials        40       36       -4     
Flag Coverage Δ
unit 75.37% <76.00%> (+1.95%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/cf2tf/conversion/overrides.py 76.19% <ø> (ø)
src/cf2tf/save.py 36.17% <ø> (ø)
src/cf2tf/terraform/_configuration.py 90.90% <ø> (ø)
src/cf2tf/terraform/doc_file.py 85.71% <ø> (+7.93%) ⬆️
src/cf2tf/terraform/hcl2/_block.py 90.00% <ø> (ø)
src/cf2tf/terraform/hcl2/complex.py 94.87% <ø> (ø)
src/cf2tf/terraform/hcl2/primitive.py 76.19% <0.00%> (ø)
src/cf2tf/conversion/expressions.py 85.20% <65.00%> (-1.33%) ⬇️
src/cf2tf/terraform/code.py 91.13% <76.47%> (-3.07%) ⬇️
src/cf2tf/convert.py 60.20% <100.00%> (+5.95%) ⬆️
... and 1 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@shadycuz shadycuz merged commit 45e3737 into develop Jun 14, 2023
@shadycuz shadycuz deleted the enhance_repo_checkout branch June 14, 2023 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant