azure-functions-host icon indicating copy to clipboard operation
azure-functions-host copied to clipboard

%rand-guid% behavior is broken

Open mathewc opened this issue 10 years ago • 4 comments

The binding refactors we released in the last 0.3 update ended up inadvertently breaking this. Recent changes were introduced to BindingMetadata to pre-resolve all metadata properties at index time, meaning out bindings that use %rand-guid% won't get a unique ID per invocation.

mathewc avatar Jul 12 '16 00:07 mathewc

Thanks!

everyonce avatar Jul 12 '16 21:07 everyonce

FYI: We're planning on getting this fix out by end of week.

mathewc avatar Jul 12 '16 21:07 mathewc

@mathewc Was this ever pushed out?

I am still seeing this issue after updating to the 0.4 runtime... :'(

scottzilla avatar Aug 10 '16 21:08 scottzilla

Yes it was fixed. As part of the fix, the syntax has changed. In a binding expression, you should use {rand-guid} rather than %rand-guid%, example below. You'll get a new guid each time :)

{
    "bindings": [
        {
            "type": "queueTrigger",
            "direction": "in",
            "name": "input",
            "queueName": "scenarios"
        },
        {
            "type": "blob",
            "name": "blob",
            "direction": "out",
            "path": "{Container}/{rand-guid}"
        }
    ]
}

mathewc avatar Aug 10 '16 21:08 mathewc