Giter VIP home page Giter VIP logo

Comments (3)

JustinGrote avatar JustinGrote commented on May 29, 2024

Posting here rather than a new issue as it is likely related: The timertrigger returns the Schedule and IsPastDue properties, but trying to call the ScheduleStatus property returns

[6/4/2019 4:00:50 AM] ERROR: Cannot bind argument to parameter 'InputObject' because it is null.
[6/4/2019 4:00:50 AM] Result: ERROR: Cannot bind argument to parameter 'InputObject' because it is null.
Exception: Cannot bind argument to parameter 'InputObject' because it is null.
Stack:    at System.Management.Automation.CmdletParameterBinderController.BindValueFromPipeline(PSObject inputToOperateOn, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)
[6/4/2019 4:00:50 AM]    at System.Management.Automation.CmdletParameterBinderController.BindUnboundParametersForBindingStateInParameterSet(PSObject inputToOperateOn, CurrentlyBinding currentlyBinding, UInt32 validParameterSets)
[6/4/2019 4:00:50 AM]    at System.Management.Automation.CmdletParameterBinderController.BindUnboundParametersForBindingState(PSObject inputToOperateOn, CurrentlyBinding currentlyBinding, UInt32 validParameterSets)
[6/4/2019 4:00:50 AM]    at System.Management.Automation.CmdletParameterBinderController.BindPipelineParametersPrivate(PSObject inputToOperateOn)
[6/4/2019 4:00:50 AM]    at System.Management.Automation.CmdletParameterBinderController.BindPipelineParameters(PSObject inputToOperateOn)
[6/4/2019 4:00:50 AM]    at System.Management.Automation.CommandProcessor.Read().

Use Case: Measuring from when the function was scheduled to when it reached the environment, for benchmarking/monitoring cold/warm start times.

EDIT: Was able to workaround this with triggerdata from UTCNow

from azure-functions-powershell-worker.

JustinGrote avatar JustinGrote commented on May 29, 2024

Additional Use Case: I have a function with a queue trigger that I want to "fail", but I don't want it to retry in the queue 5 more times (or whatever), say because the exception is a known configuration exception and not a transient exception such as the server temporarily offline. Currently I have no way to get at the queue object and dequeue it before throwing the error, and as soon as I throw the error, Azure Functions will retry the queue object.

EDIT: Crappy temporary workaround, requires the function to run twice and slightly pollutes the telemetry, but it's better than repeating the error X times.

try {
    throw "Configuration Error"
} catch {
    if ($TriggerMetadata.dequeuecount -gt 1) {
        Write-Output "Skipping Retry of Queue Item $($TriggerMetadata.id)"
        exit 0
    } else {
        throw $PSItem
    }
}

from azure-functions-powershell-worker.

TylerLeonhardt avatar TylerLeonhardt commented on May 29, 2024

Do we get any sort of information as to what Queue the queue item data came from? Without that, this issue would need some help from the Azure Functions Host.

from azure-functions-powershell-worker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.