jason-johnson / azure-pipelines-tasks-terraform

Azure Pipelines extension for Terraform
MIT License
124 stars 52 forks source link

Fix issue with unexpected token in json #258

Closed jakobsack closed 2 years ago

jakobsack commented 2 years ago

Issue was caused by newlines in the json values \\n being replaced to \. If the following character was not a known escape character then the exception would be thrown.

Fixed by changing the regex to match only on a line ending. Added unit test.

fixes #61

ausfestivus commented 2 years ago

Morning people, any ETA on when 0.7.7 might be pushed out the door? Have just updated something to Azure Provider 3.0 and it is now triggering issue #229 as well.

I note this merge has a failed check in an ADO pipeline.

If this fix is going to go out the door in the next day or two then I can wait, else I need to revert my provider upgrade.

charleszipp commented 2 years ago

apologies for the delays, i have cut 0.7.7 release and should be available today. The failures are due to expiring test accounts for aws and gcp tests so nothing to do with the fix introduced here.

ausfestivus commented 2 years ago

Thanks @charleszipp. How confident are you that the fix works and/or tests cover the fix? We are seeing the same problem with the task in 0.7.7.

re: https://github.com/charleszipp/azure-pipelines-tasks-terraform/issues/61#issuecomment-1083808637

jakobsack commented 2 years ago

Hi Andrew, my PR fixed the issue for me and did not break any existing tests. I‘d highly appreciate it if you could send me the output of „terraform show -json“ via mail or whatever github provides. Note that this file usually contains a lot of sensitive data, so heavy editing might be required. I‘ll try to have a look at your issue on Sunday or early next week (unless someone else is faster). /Jakob

Von meinem iPhone gesendet

Am 31.03.2022 um 02:02 schrieb Andrew Best @.***>:

 Thanks @charleszipp. How confident are you that the fix works and/or tests cover the fix? We are seeing the same problem with the task in 0.7.7.

re: #61 (comment)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.

jakobsack commented 2 years ago

Sorry, didn’t see that Charles deprecated the feature. Won‘t look at it then.

Von meinem iPhone gesendet

Am 31.03.2022 um 02:02 schrieb Andrew Best @.***>:

 Thanks @charleszipp. How confident are you that the fix works and/or tests cover the fix? We are seeing the same problem with the task in 0.7.7.

re: #61 (comment)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.