Skip to content

[WLM] add WLM header propagator #18571

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kaushalmahi12
Copy link
Contributor

Description

This will make the workloadGroupId header propagable by adding the WorkloadGroupThreadContextStatePropagator to list of ThreadContext#propagators.

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
@kaushalmahi12 kaushalmahi12 requested a review from a team as a code owner June 20, 2025 22:08
Copy link
Contributor

❌ Gradle check result for 6d5e32a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
@@ -595,6 +596,7 @@ protected Node(final Environment initialEnvironment, Collection<PluginInfo> clas

runnableTaskListener = new AtomicReference<>();
final ThreadPool threadPool = new ThreadPool(settings, runnableTaskListener, executorBuilders.toArray(new ExecutorBuilder[0]));
threadPool.getThreadContext().registerThreadContextStatePropagator(new WorkloadGroupThreadContextStatePropagator());
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a better way would be to do this inside WorkloadGroupThreadContextStatePropagator?

WorkloadGroupThreadContextStatePropagator(ThreadContext threadContext) {
     threadContext. registerThreadContextStatePropagator(this);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also add a basic test to verify this functionality?

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 will add a UT which will confirm the behavior

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 think a better way would be to do this inside WorkloadGroupThreadContextStatePropagator?

Why do we think that is a better way, In the end we will still have to init the WorkloadGroupThreadContextStatePropagator somewhere

Copy link
Contributor

✅ Gradle check result for 2ca823a: SUCCESS

Copy link

codecov bot commented Jun 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.73%. Comparing base (7c8f01b) to head (2ca823a).
Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #18571      +/-   ##
============================================
+ Coverage     72.68%   72.73%   +0.04%     
- Complexity    68130    68154      +24     
============================================
  Files          5540     5540              
  Lines        313379   313380       +1     
  Branches      45472    45472              
============================================
+ Hits         227785   227922     +137     
+ Misses        67070    66979      -91     
+ Partials      18524    18479      -45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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