Skip to content

Conversation

sh-cho
Copy link
Contributor

@sh-cho sh-cho commented Jun 20, 2025

Motivation:
Blockhound detects blocked thread after upgrading kubernetes-client 7.3.1 (#6271, https://github.com/line/armeria/actions/runs/15771639756/job/44457567699)

Modification:

  • Remove io.fabric8.kubernetes.client.http.StandardHttpRequest$Builder from allow list, as it uses UUID created via AtomicLong now.
  • Add io.fabric8.kubernetes.client.server.mock.WatchEventsListener to allow list, because it is only used in the mock server.

Result:
Blockhound passes.

Copy link

codecov bot commented Jun 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (8150425) to head (43cf415).
⚠️ Report is 170 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #6287       +/-   ##
============================================
- Coverage     74.46%       0   -74.47%     
============================================
  Files          1963       0     -1963     
  Lines         82437       0    -82437     
  Branches      10764       0    -10764     
============================================
- Hits          61385       0    -61385     
+ Misses        15918       0    -15918     
+ Partials       5134       0     -5134     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jrhee17
Copy link
Contributor

jrhee17 commented Jun 23, 2025

It looks like the CI is still failing due to a blocking call. Can you check this?

@sh-cho
Copy link
Contributor Author

sh-cho commented Jun 23, 2025

@jrhee17 Ok let me check

@sh-cho sh-cho marked this pull request as draft June 23, 2025 12:14
Motivation:
Blockhound detects blocked thread after upgrading kubernetes-client
7.3.1 (line#6271)

Modification:
- Remove `io.fabric8.kubernetes.client.http.StandardHttpRequest$Builder`
  from allow list, as it uses UUID created via AtomicLong now.
- Add `io.fabric8.kubernetes.client.server.mock.WatchEventsListener` to
  allow list, because it is only used in the mock server.

Result:
Blockhound passes

Signed-off-by: Seonghyeon Cho <[email protected]>
@sh-cho sh-cho force-pushed the kubernetes-client-blocking branch from e6f6e37 to a000801 Compare June 23, 2025 12:14
@ikhoon ikhoon added the defect label Jun 24, 2025
@ikhoon ikhoon added this to the 1.33.0 milestone Jun 24, 2025
builder.allowBlockingCallsInside(
"io.fabric8.kubernetes.client.http.StandardHttpRequest$Builder",
"build");
"io.fabric8.kubernetes.client.server.mock.WatchEventsListener", "onClosed");
Copy link
Contributor

Choose a reason for hiding this comment

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

This should work, but I’d prefer not to add test-related code into the production codebase. What do you think about introducing a separate KubernetesTestBlockHoundIntegration class under the test directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good :)
I will try it

sh-cho added 3 commits July 1, 2025 23:48
Signed-off-by: Seonghyeon Cho <[email protected]>
@minwoox minwoox marked this pull request as ready for review July 3, 2025 02:25
Copy link
Contributor

@minwoox minwoox left a comment

Choose a reason for hiding this comment

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

Thanks! 👍 👍 👍

@jrhee17
Copy link
Contributor

jrhee17 commented Jul 3, 2025

Sorry, still looks like the blockhound CI is failing

@minwoox
Copy link
Contributor

minwoox commented Jul 3, 2025

Oops, let me also take a look.

@minwoox
Copy link
Contributor

minwoox commented Jul 4, 2025

After we update the version from 6.x to 7.x, the test suite uses the embedded Vert.x server:
https://github.com/fabric8io/kubernetes-client/blob/ed36981b306116d0c896e53ec4f7a04c2a065a72/doc/MIGRATION-v7.md?plain=1#L26

Vert.x utilizes FastThreadLocalThread for its blocking worker threads which are classified as non-blocking by Netty's BlockHoundIntegration.
In order to solve this issue, I left my suggestion to the block hound:
reactor/BlockHound#516

Let's wait for their answer. 😉

@ikhoon ikhoon modified the milestones: 1.33.0, 1.34.0 Aug 1, 2025
@github-actions github-actions bot added Stale and removed Stale labels Aug 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants