Fix an error when trying to load default variables #719
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I simply removed a lot of code that was handling error recovery. The new library we use returns the desired values even if there are error in the code. So, there is no need to try the whole retry process.
Generated
This pull request includes several changes to the
util/terraform.go
file, primarily aimed at simplifying the code and removing unnecessary functionality. The most important changes include the removal of unused imports, the elimination of redundant retry logic, and the deletion of thecreateTerraformVariablesTemporaryFolder
function. Additionally, minor adjustments were made to the test cases inutil/terraform_test.go
.Code simplification and cleanup:
path
,regexp
, andutils
fromutil/terraform.go
.reTfVariables
regex and theisOverride
function, as they are no longer needed. [1] [2]loadDefaultValues
function by removing the retry mechanism and associated temporary folder creation logic. [1] [2]Test adjustments:
TestLoadDefaultValues
function inutil/terraform_test.go
to remove the test case for an invalid folder, which is no longer applicable.