Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Abhi347
Copy link
Member

@Abhi347 Abhi347 commented Apr 9, 2025

The join() on fetching access tokens can cause thread deadlock when there are many requests in the pool. Making the entire method chain async should fix this.

Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 66.25000% with 27 lines in your changes missing coverage. Please review.

Project coverage is 77.41%. Comparing base (496845f) to head (b6de3b0).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...va/com/spotify/github/v3/clients/GitHubClient.java 66.25% 25 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #229      +/-   ##
============================================
- Coverage     77.42%   77.41%   -0.01%     
- Complexity      421      433      +12     
============================================
  Files            60       60              
  Lines          1373     1368       -5     
  Branches         59       60       +1     
============================================
- Hits           1063     1059       -4     
+ Misses          267      265       -2     
- Partials         43       44       +1     

☔ 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.

@Abhi347 Abhi347 force-pushed the fix/fix-thread-deadlock-in-client branch from fdf6449 to b6de3b0 Compare April 9, 2025 10:22
Comment on lines +183 to +186
assertThat(ex.getCause().getMessage(), is("Could not generate access token for github app"));

assertThat(ex.getCause(), is(notNullValue()));
assertThat(ex.getCause().getMessage(), startsWith("Got non-2xx status 500 when getting an access token from GitHub"));
assertThat(ex.getCause().getCause(), is(notNullValue()));
assertThat(ex.getCause().getCause().getCause().getMessage(), startsWith("Got non-2xx status 500 when getting an access token from GitHub"));
Copy link
Member Author

Choose a reason for hiding this comment

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

The Exceptions are wrapped in extra RuntimeExceptions now. Not sure if that's gonna be a problem or not. Ideally we should have a specific Exception class to deal with AccessToken Exceptions

@Abhi347 Abhi347 marked this pull request as ready for review April 10, 2025 11:13
@Abhi347 Abhi347 enabled auto-merge (squash) April 10, 2025 11:13
Copy link
Contributor

@dennisgranath dennisgranath left a comment

Choose a reason for hiding this comment

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

LGTM

@Abhi347 Abhi347 merged commit d3f09fe into master Apr 10, 2025
3 of 5 checks passed
@Abhi347 Abhi347 deleted the fix/fix-thread-deadlock-in-client branch April 10, 2025 11:25
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