Skip to content

Conversation

@jww3
Copy link
Contributor

@jww3 jww3 commented Dec 16, 2022

see #2313

Note above: if approved, I'll merge this branch into the branch that backs #2313 (users/jww3/jit-displayname-evaluation). That PR already has a detailed description.

Before

image

After

image

@jww3 jww3 requested a review from a team as a code owner December 16, 2022 16:14
@jww3 jww3 requested review from AvaStancu and fhammerl December 16, 2022 16:15
if (_didFullyEvaluateDisplayName || !string.IsNullOrEmpty(Action.DisplayName))
{
return false;
return true;
Copy link
Contributor Author

@jww3 jww3 Dec 16, 2022

Choose a reason for hiding this comment

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

This is a subtle change in behavior, but fortunately there weren't many existing callers (mainly just unit tests) and even fewer existing callers that even bothered checking the return value.

{
if (updated)
{
actionRunner.ExecutionContext.UpdateTimelineRecordDisplayName(actionRunner.DisplayName);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

when updated is true, actionRunner.DisplayName is effectively guaranteed to be non-null.

}
catch (Exception ex)
{
Trace.Warning("Caught exception while attempting to evaulate/update the step's DisplayName. Exception Details: {0}", ex);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

now a warning since I can't assume anything about the caller of this new method.

Comment on lines +203 to +204
DisplayName = explicitDisplayName,
DisplayNameToken = new BasicExpressionToken(null, null, null, "matrix.node"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

in this unit test, we're setting both DisplayName and DisplayNameToken.

@jww3 jww3 merged commit 16ee671 into users/jww3/jit-displayname-evaluation Jan 5, 2023
@jww3 jww3 deleted the users/jww3/jit-displayname-take2 branch January 5, 2023 09:32
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.

3 participants