lark.exceptions.UnexpectedToken
when creating alert rules via Grafana's Terraform Provider
#21845
Labels
lark.exceptions.UnexpectedToken
when creating alert rules via Grafana's Terraform Provider
#21845
Describe the bug
When using Grafana's Terraform Provider with Pants to create some alert rules, the provider has a for keyword that represents "for how long" the condition is met before firing (e.g.
for = "5m"
). Thatfor
keyword is causingKeyError: 'FOR'
in lark/larl and I'm not sure how to even go about addressing it. I've dug through the provider's and Lark's GitHub issues but came up empty. This seems like it's only an issue when Pants uses lark to parse terraform (i.e. the perfect storm of variables).Running the same code with just Terraform outside of Pants works fine, and removing the
for
keyword and running it with Pants also works.Pants version
2.23.0
OS
5.15.167.4-microsoft-standard-WSL2 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Have not tested it with Mac.
Additional info
Full Traceback:
It looks like lark is parsing it as a
for
block instead of the keyword inside therule
block.The text was updated successfully, but these errors were encountered: