Skip to content

[MDO] Fix empty subject by sorting on the first to last message and get first one (oldest should be the original)#2218

Merged
iserrano76 merged 3 commits into
microsoft:mainfrom
iserrano76:MDO
Nov 6, 2024
Merged

[MDO] Fix empty subject by sorting on the first to last message and get first one (oldest should be the original)#2218
iserrano76 merged 3 commits into
microsoft:mainfrom
iserrano76:MDO

Conversation

@iserrano76

@iserrano76 iserrano76 commented Nov 6, 2024

Copy link
Copy Markdown
Contributor

Issue:
If you have more that one copy in message trace not always shows subject

Reason:
With the current filter we do not take always the original one, the oldest one.

Fix:
Fix empty subject by sorting on the first to last message and get first one (oldest should be the original and has the original subject)

Validation:
Check it in lab

@iserrano76 iserrano76 requested review from a team and rosspa05 as code owners November 6, 2024 17:06

@rosspa05 rosspa05 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested, reviewed, and discussed. Looks good.

@iserrano76

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@rosspa05

rosspa05 commented Nov 6, 2024

Copy link
Copy Markdown
Contributor

Discussed, tested, and reviewed. Looks better.

@rosspa05 rosspa05 closed this Nov 6, 2024
@iserrano76 iserrano76 reopened this Nov 6, 2024
@iserrano76

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).


if (-not $IncludeDuplicates) {
[array]$failedMessages = $failedMessages | Sort-Object MessageId -Unique
[array]$failedMessages = $failedMessages | Group-Object -Property MessageId | ForEach-Object { $_.Group | Sort-Object -Property Received | Select-Object -First 1 }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How does this address empty subjects?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It looks an issue with Get-MessageTrace:
for all original messages it is able to get subject, but for some resend messages is not able.
With this we will get the oldest one, the original with that messageId

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it be better to include a where statement when the subject isn't null?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I though that but if the original message is null, it will not work

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We talking about original message subject or original message MessageId

@dpaulson45

Copy link
Copy Markdown
Member

Looks like the build pipeline is having an issue with checking out your branch. Not sure if this is due to the close or not.

@iserrano76

Copy link
Copy Markdown
Contributor Author

Looks like the build pipeline is having an issue with checking out your branch. Not sure if this is due to the close or not.
I try to run it again but it fail.
should we created it again?

@dpaulson45

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@dpaulson45

Copy link
Copy Markdown
Member

Got the pipeline to work after the merge.

@iserrano76 iserrano76 changed the title Fix empty subject in some weird cases. [MDO] Fix empty subject by sorting on the first to last message and get first one (oldest should be the original) Nov 6, 2024
@iserrano76 iserrano76 merged commit 76895e2 into microsoft:main Nov 6, 2024
@iserrano76 iserrano76 deleted the MDO branch November 11, 2024 17:01
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