Skip to content

Conversation

AnatoliB
Copy link
Contributor

@AnatoliB AnatoliB commented Feb 1, 2021

Feature documentation: Custom orchestration status.

Usage sample:

Set-DurableCustomStatus -CustomStatus 'Processing'

@AnatoliB AnatoliB force-pushed the anatolib/custom-status branch from 99e0e4d to e1819ac Compare February 23, 2021 22:23
@AnatoliB AnatoliB marked this pull request as ready for review February 24, 2021 06:50
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.

One minor comment and one question. Other than that, LGTM.

{
[Parameter(
Mandatory = true,
Position = 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to assign a Position for this parameter? I took a look at the other Durable cmdlets and this is the only one with a Positional parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm trying to be very careful with adding positional parameters in general, but in this case I believe this is justified. The cmdlet takes just one parameter, and the purpose of this parameter is very obvious, so I want to allow users omit the parameter name: Set-DurableCustomStatus "my status".

I think we can carefully allow some positional parameters for some other durable-related cmdlets, but we can do this later.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good @AnatoliB, thank you.

[Parameter(
Mandatory = true,
Position = 0,
ValueFromPipeline = true)]
Copy link
Contributor

Choose a reason for hiding this comment

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

What would the use case be here for ValueFromPipeline? Something like:

# 1)
'Processing Tokyo' | Set-DurableCustomStatus

# 2)
 @{ ProgressMessage = 'Processing Seattle'; Stage = 2 }  | Set-DurableCustomStatus

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, exactly.

@AnatoliB AnatoliB merged commit e04925d into dev Feb 24, 2021
@AnatoliB AnatoliB deleted the anatolib/custom-status branch February 24, 2021 22:06
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.

2 participants