cf-terraforming icon indicating copy to clipboard operation
cf-terraforming copied to clipboard

accounting for path where value is float64

Open jeff-onepeloton opened this issue 2 years ago • 3 comments

jeff-onepeloton avatar Mar 28 '23 20:03 jeff-onepeloton

@jeff-onepeloton thanks for the PR! for any maintainer to review this we're going to need more information.

  • overview of why this is needed and an example of where this is being encountered; and
  • a test case covering this new codepath (best done with an example resource).

without either of these we are flying blind and can't have confidence in the change does what it says it does.

jacobbednarz avatar Mar 28 '23 21:03 jacobbednarz

if you run generate on the cloudflare_load_balancer resource, it errors out on the pool_weights dictionary because the key in the dictionary passes the hasNumber() check but the value is a float64

panic: interface conversion: interface {} is float64, not string

Just wanted to bring this to attention since I spent some time investigating

jeff-onepeloton avatar Mar 28 '23 21:03 jeff-onepeloton

thanks for the context. if you can add a test case for this, i'm happy to review and get it merged.

jacobbednarz avatar Mar 28 '23 22:03 jacobbednarz

#702 solves this with updated test cases

jacobbednarz avatar May 16 '24 04:05 jacobbednarz