Azure / Azure/azure-functions-powershell-worker
Invoke-ActivityFunction: Why is the `Input` attribute required?
- Dominant language
- C#
- Stars
- 215
- Forks
- 61
- Avg merge
- 21h 4m
- Merged PRs (30d)
- 6
Description
While running a PowerShell durable function, I've stumbled across an exception I'm confused about:
```powershell
Invoke-ActivityFunction -FunctionName 'FireTheCigarettes'
# Exception:
# Type: System.ArgumentNullException
# Message: Value cannot be null. (Parameter 'input')
```
I've realised that the `Input` parameter is set as `[ValidateNotNull]`, but my activity function `FireTheCigarettes` doesn't require any input. Im wondering why the attribute is required, and doesn't have a sensible default?
https://github.com/Azure/azure-functions-powershell-worker/blob/622867482d16441ce342e5e90f8e7aeb050b5d20/src/Durable/InvokeActivityFunctionCommand.cs#L13-L30
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/Durable/InvokeActivityFunctionCommand.cs at the linked parameter definition, then reproduce the PowerShell invocation without an Input value. Trace how the null input reaches the command and add or update coverage so an activity that requires no input can be invoked without the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, powershell
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100