You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
afsalthaj
changed the title
Give warnings in UI when user specify a global variable that's not part of the request path or body
Rib Robustness: Give warnings in UI when user specify a global variable that's not part of the request path or body
Sep 18, 2024
Shouldn't ordinary type-checking provide this? We know that request may contain path, headers, body, so really the only thing we don't know, initially, is body. Once we learn 'body', if we back-propagate that, and combine it with the other types we know, won't we have a complete picture of the type of request?
@jdegoes I was more of talking about tagging any variable as global input. At golem-rib side, anything that's not declared is turning out to be a gobal variable. Example
let my_record = request.path;
let result = foo-function(my_record);
match result {
some(_) => "success"
none => msg
}
The global input requirement for the above script is a request record
May be that example is an over-kill. Here is a compilable Rib,which tags some random variable as input, which our golem platfrom (that calls Rib through worker-service) can never satisfy
let x: str = msg;
x
Here we tag msg as a global input. It's a very simple 1-2 pointer fix I hope
@jdegoes Yes Rib is now providing the complete type information of a "request" and is sent back to UI. Example: After compilation Rib returns The RibInputTypeInfo (the input requirements as something like below)
afsalthaj
changed the title
Rib Robustness: Give warnings in UI when user specify a global variable that's not part of the request path or body
Rib Robustness: Make sure Rib doesn't condsider random variables as global variables
Sep 30, 2024
No description provided.
The text was updated successfully, but these errors were encountered: