Replies: 2 comments 1 reply
-
My thoughts... DocumentationI agree about the docs. Needs work. Basic markdown in Github can make it difficult to convey complex concepts. If we make a website, I'd recommend one of the other projects I contribute to, Hugo. ExpressionsI was tinkering with DSLI would love to have HCL solve all of our problems. 😃 I've spent most of my tinker time here. My HCL proof-of-concept playground is https://github.com/moorereason/webhook-hcl. It's not well-documented or meant for anyone else to understand at this point, but feel free to check it out. It doesn't do much compared to webhook. It loads the config, adds a mock request, and evaluates the results. My latest config iteration is in The most interesting thing I've done lately is add functions (which solves the expression problem) that can be seen mainly in the constraints section of the config. It works pretty well, but it may be hard to provide feedback to the user on which condition was false or something for debug purposes. My hunch is that we would need to walk through the constraints expressions to get that level of detail, but I haven't worked that out yet. In order to do that, we'll probably have to get in the weeds of HCL and not be able to use the higher level API for that step. Needs lots of polishing and work, but I think the HCL path has a lot of promise. If you want to play along, PRs are welcome! 😉 |
Beta Was this translation helpful? Give feedback.
-
I bought a |
Beta Was this translation helpful? Give feedback.
-
Just a list of stuff that should be done / discussed, in no particular order.
Documentation
README.md enhancements
The current README.md has become a bit bloated and would greatly benefit from a re-organization, and some sections should probably be rewritten. A lot of issues pop up in relation to compilation issues, so it would be better if we put binary downloads in the first plan, and compilation hidden behind a link to docs or something similar. Maybe the README is not a good choice for this kind of stuff anyway, perhaps a real web-page would make it more flexible and easier to present this stuff?
Development
Expression rule
A trigger-rule that allows for custom expressions.
I've been playing around with cel-go and it seems like a nice candidate for the execution env.
Aside from the integrated cel-go macros, in order to be able to deprecate the "snowflake" trigger rules, we'd have to expose functions that can calculate SHAxyz HMAC digests, IP CIDR matching, and probably few more.
Would solve: #504 #505 #389 #267 #200
Context provider command
The context provider command would be executed with the request details passed through STDIN, and it would be required to output a valid JSON string. The returned JSON object would then be accessible in trigger rules for further evaluation.
Proposal implementation: #356
Would solve: #468 #416 #358 #336 #148
DSL configuration format
The current JSON/YAML can be quite tedious to write, and read. It would be nice if we could move to a DSL that would allow us to write configuration in a more declarative fashion.
It would also be nice to have a specific section for the global configuration which at the moment is only available through command parameters. As a part of this effort, we could seize the opportunity to refactor the route matching logic as well to introduce the support for dynamic URL segments as well as regex route matches.
@moorereason played around with HCL for this.
Beta Was this translation helpful? Give feedback.
All reactions