Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: flaky logging mdc tests #1410

Merged
merged 4 commits into from
Jul 24, 2024
Merged

Conversation

Roiocam
Copy link
Member

@Roiocam Roiocam commented Jul 23, 2024

@@ -90,6 +91,12 @@ import pekko.annotation.InternalApi
}

val marker: Option[Marker] = Option(event.getMarkerList).flatMap(_.asScala.headOption)
val mdc: Map[String, String] = Option(event.getMDCPropertyMap)
.filterNot(_.isEmpty)
.orElse(Option(MDC.getMDCAdapter.getCopyOfContextMap))
Copy link
Member Author

Choose a reason for hiding this comment

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

if MDC didn't useLogbackMDCAdapter as mdcAdapter, then fallback to the original MDC field.

Copy link
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

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

lgtm

@laglangyue
Copy link
Contributor

lgtm

@Roiocam
Copy link
Member Author

Roiocam commented Jul 24, 2024

let us merge, and then we will see what happens

@Roiocam Roiocam merged commit 0930982 into apache:main Jul 24, 2024
18 checks passed
@Roiocam Roiocam deleted the fix-flaky-logging-tests branch July 24, 2024 12:46
@pjfanning
Copy link
Contributor

@Roiocam can you backport this change to 1.0.x branch?

@Roiocam
Copy link
Member Author

Roiocam commented Jul 25, 2024

@Roiocam can you backport this change to 1.0.x branch?

they looks cool in 1.0.x

@pjfanning
Copy link
Contributor

I thought the test was flaky in 1.0.x - but not failing as often as in the main branch. Let me keep an eye on the 1.0.x builds. This test did not fail there last night. I'm going to try to backport some other changes to 1.0.x for other broken tests first.

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.

investigate ClusterActorLoggingSpec
3 participants