Open jhenry82 opened 7 years ago
Ha, ok, I found the problem. It's unescaped star (*) characters in the YAML produced by "biplane dump". Those are special characters in YAML and they break the parser. If I manually edit the file and wrap the stars in double quotes, "biplane diff" works as expected.
The stars are coming from the config for the cors plugin, which looks something like this from "biplane dump". Note the last line.
$ cat config.yaml
---
apis:
- name: heartbeat
attributes:
uris: /api/heartbeat
strip_uri: true
upstream_url: http://coolurl/api
plugins:
- name: search
attributes:
uris: /api/search
strip_uri: true
upstream_url: http://coolurl/api
plugins:
- name: cors
attributes:
config:
max_age: 86400
credentials: true
preflight_continue: false
origin: *
So at least there's an easy workaround, but it seems like there is a bug in the dump command not escaping special chars.
...and to basically close my own ticket, this is apparently a bug in the Crystal language which is fixed in the 0.19.3 release. Their YAML generator wasn't quoting stars. Welp. Probably nothing to be done here, then, until/unless your project is able to get over the Crystal 0.15 hump.
Love the effort and debugging put in here. Thanks for the info. We had major problems getting off 0.15 initially. I have not tried updating our compile target since the 0.16 releases. They had some significant backwards compat issues that I couldn't get past. I may try to update as I'd love to be on a later version but we're also planning a rewrite of this project in JS at some point so there isn't a lot of effort to maintain this beyond our own usage as we upgrade versions of Kong.
In either case, I'm glad you found the workaround and appreciate the info on the 0.19.3 fixes.
Hi there, I just came across your project as a new user looking for a declarative config tool compatible with Kong 0.10. Love the idea.
Unfortunately, I am getting errors on the basic operation of trying to to run the "biplane diff" command against a dump of the config. I am totally unfamiliar with Crystal so I'm not sure if this is user error or a bug.
Relevant info: Platform: CentOS Linux 6.8 Biplane: Self-built binary using Crystal 0.15.0. Source cloned from github today 3/14/17. Kong: 0.10.0, admin service running at http://localhost:8001. No authentication.
I haven't attached the dumped YAML but let me know if that's significant. It contains a bunch of proprietary company info but I can sanitize it if it helps.