28mm / blast-radius

Interactive visualizations of Terraform dependency graphs using d3.js
https://28mm.github.io/blast-radius-docs/
MIT License
2.03k stars 256 forks source link

updated pyhcl #79

Closed SebastianAtWork closed 4 years ago

SebastianAtWork commented 4 years ago

Hi, just a very small but significant update to pyhcl. See https://github.com/28mm/blast-radius/issues/63

techdragon commented 4 years ago

This build failure doesn't appear to be due to the code changes.

SebastianAtWork commented 4 years ago

Unfortunately, this change does not remove all pyhcl errors -.- still getting others like: File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2311, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1834, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1737, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise raise value File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1832, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1818, in dispatch_request return self.view_functionsrule.endpoint File "/src/blastradius/server/server.py", line 61, in graph_json tf = Terraform(os.getcwd()) File "/src/blastradius/handlers/terraform.py", line 67, in init self.modules[name] = Terraform(directory=self.directory+'/'+source, settings=mod) File "/src/blastradius/handlers/terraform.py", line 26, in init self.config = hcl.load(config_io) File "/usr/local/lib/python3.7/site-packages/hcl/api.py", line 62, in load return loads(fp.read(), export_comments=export_comments) File "/usr/local/lib/python3.7/site-packages/hcl/api.py", line 81, in loads return HclParser().parse(s, export_comments=export_comments) File "/usr/local/lib/python3.7/site-packages/hcl/parser.py", line 643, in parse s, lexer=Lexer(export_comments=export_comments), debug=DEBUG File "/usr/local/lib/python3.7/site-packages/hcl/ply/yacc.py", line 503, in parse tok = self.errorfunc(errtoken) File "/usr/local/lib/python3.7/site-packages/hcl/parser.py", line 634, in p_error raise ValueError(msg) ValueError: Line 60, column 1624: unexpected LEFTPAREN; expected COMMA, IDENTIFIER, STRING, COMMENT, MULTICOMMENT, MINUS, NUMBER, FLOAT, $end, RIGHTBRACE, QMARK, EQ, NE, LT, GT, LE, GE on perfectly running terraform

techdragon commented 4 years ago

@SebastianAtWork I've checked and it looks like it doesn't resolve my current issues either. Different error in my case, but its the same before and after the PR

SebastianAtWork commented 4 years ago

@techdragon Thansk for the checking. Then i will close this as it doesnt really help. I try to investigate further but I´m out of time (At Work) for now so it could take some time