Repository navigation
First pass at a hooks definition. - #45
Conversation
toddbaert
left a comment
There was a problem hiding this comment.
Seems like a very good first pass, I left a few comments and look forward to the full version.
The parser script is a bit finicky - it could benefit from some improvement on edge-cases - let me know if you have issues with it.
Also, once #36 is done, we should be able to .gitignore all the JSON files and do some nice automation.
Co-authored-by: Michael Beemer <[email protected]>
include some sample code.
|
|
||
| > When an error occurs in hook evaluation, further evaluation **MUST** stop and error hook evaluation begins. | ||
|
|
||
| > If an error is encountered in the error stage, it **MUST** not be returned to the user. |
There was a problem hiding this comment.
for consistency, it seems like this should also be the case for errors in the finally stage?
There was a problem hiding this comment.
The intent of this line was: If you have an error from the provider and that somehow triggers an error in the error flow.. don't overwrite their original error with this new one.
I'm not actually clear what an error in finally should do. Our whole MO seems to be "never throw, except maybe around client initialization", but also I don't want to have this logic complexity in the finally handler.
try:
before()
eval()
after()
except:
error()
finally:
try:
finally()
except:
error()|
|
||
| > `Flag evalution options` must contain a list of hooks to evaluate. | ||
|
|
||
| > `Flag evaluation options` may contain `state`, a map of data to be provided to hook invocations. |
There was a problem hiding this comment.
maybe we'd specify this somewhere else, but I'm left a bit unclear as to how exactly an Application Author would pass this state in to an invocation
There was a problem hiding this comment.
I imagine this would be done via the EvaluationOptions. To your earlier point, I think a HookHints option would be apropos here.
|
I can't speak for @moredip , but besides the comments I just made (which I think are already resolved and just yet to be updated) I'm good with this. Approving, assuming it's clear how to resolve those. |
|
no additional concerns on my end 👍 |
- js-yaml 3.15.1 -> 3.15.2 (high, alert #45) - js-yaml 4.3.1 -> 4.3.2 (high, alert #44) - ignore cloud-native.slack.com archive links in markdown-link-check (403 due to Slack blocking unauthenticated crawlers, unrelated to dependency changes but needed to keep json-lint CI green) Signed-off-by: Jonathan Norris <[email protected]>
- js-yaml 3.15.1 -> 3.15.2 (high, alert #45) - js-yaml 4.3.1 -> 4.3.2 (high, alert #44) - ignore cloud-native.slack.com archive links in markdown-link-check (403 due to Slack blocking unauthenticated crawlers, unrelated to dependency changes but needed to keep json-lint CI green) Signed-off-by: Jonathan Norris <[email protected]>
I'm explicitly not structuring this into the requirements language at first. I'd like to get some general feedback on the content before I fight with the spec parser. I also want to avoid the situation where some folks comment on the json and others on the text. :)