Skip to content

Conversation

AnatoliB
Copy link
Contributor

Allow writing null to Function output by making the InputObject parameter of Trace-PipelineObject optional (which enables passing $null).

Resolves #561, #559, #504

Copy link
Contributor

@Francisco-Gamino Francisco-Gamino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AnatoliB AnatoliB merged commit 18bab20 into dev Nov 30, 2020
@AnatoliB AnatoliB deleted the anatolib/trace-null branch November 30, 2020 19:34
@VasylZvarydchuk
Copy link

That's a great fix @AnatoliB. Thank you very much. We spent tons of time to refactor our PowerShell functions previously worked fine in Azure Automation. It took much time to investigate these weird errors and add Out-Null statements. How to know when this fix will be release?

@AnatoliB
Copy link
Contributor Author

@VasylZvarydchuk Expect this to be deployed to Azure within ~3-4 weeks.

@VasylZvarydchuk
Copy link

@AnatoliB we still see such errors. Apparently, this change doesn't fix the problem. So, if code has such code like return $null PowerShell Azure Functions fails with Cannot bind argument to parameter 'InputObject' because it is null

@AnatoliB
Copy link
Contributor Author

AnatoliB commented Feb 9, 2021

@VasylZvarydchuk The 3-4 weeks estimate turned out to be overoptimistic. For reasons unrelated to the fix, the rollout to Azure was delayed. It is happening right now, and many regions already have the fix. Please check the Functions runtime version for your app on the Portal (the Overview tab): if you see 3.0.15371 or higher, you've got the fix. Otherwise, you may need to wait for a few more days and/or restart the app.

If you are on 3.0.15371 and still see the problem, please file a new issue, as this is probably something else.

@VasylZvarydchuk
Copy link

Thank you @AnatoliB . I see we have still 3.0.15193.0. Ok, waiting.

@VasylZvarydchuk
Copy link

@AnatoliB just today we have got a new AF update and indeed the fix works. Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Writing $null to the output causes Trace-PipelineObject error
3 participants