Repository navigation
Conversation
9 tasks
Macbet
marked this pull request as ready for review
November 29, 2026 00:30
Macbet
force-pushed
the
refactor/api-restclient
branch
from
November 29, 2026 00:45
445ffd8 to
8e67a7d
Compare
Macbet
force-pushed
the
refactor/api-restclient
branch
from
November 29, 2026 01:17
8e67a7d to
e181e38
Compare
Macbet
force-pushed
the
refactor/api-restclient
branch
2 times, most recently
from
November 29, 2026 10:00
01cc45e to
54ab407
Compare
Macbet
force-pushed
the
refactor/api-restclient
branch
from
November 29, 2026 10:02
54ab407 to
84b7fef
Compare
Macbet
force-pushed
the
refactor/api-restclient
branch
from
November 29, 2026 10:05
84b7fef to
2c93512
Compare
Macbet
force-pushed
the
refactor/api-restclient
branch
from
November 29, 2026 10:32
2d58d58 to
e6ecdc3
Compare
Macbet
force-pushed
the
refactor/api-restclient
branch
from
November 29, 2026 12:58
e6ecdc3 to
f0d1be9
Compare
Macbet
force-pushed
the
refactor/api-restclient
branch
from
November 29, 2026 19:29
f0d1be9 to
f7aef18
Compare
The API built RestTemplate in several ways, in some places once per request and without timeouts. Every blocking outbound call now uses a RestClient built once per service through RestClientFactory, which replaces RestTemplateFactory. WebClient code is untouched. RestClientFactory keeps what RestTemplate did on the wire and on failure: the URI encoding mode, the Accept header, Content-Length: 0 on a request without a body, and a ResourceAccessException when the status line or first body byte cannot be read. Redirect policy per client is unchanged, and the webhook client keeps its pool and SameOriginRedirectStrategy. Behaviour changes: - GitLab hook create/update, GitHub token and discovery, GitLab, Bitbucket and Azure DevOps discovery, and the TF Cloud importer now have a 10s connect and 30s read timeout; they had none. - Each discovery service shares one connection pool (20 per route, 50 total, 5s wait for a connection) instead of a new pool per request. - HTTP error messages no longer contain the request URL. - The GitHub proxy setting is read once at startup; a missing or invalid http.proxyPort falls back to 80 instead of failing the call. Apache HttpStatus constants are replaced with Spring's. Refs #4052
Commented-out-code false positive (java:S125), unnamed catch variables (java:S7467), an empty switch arm (java:S108), concatenated HTTP heads (java:S6126), multi-call assertThatThrownBy lambdas (java:S5778) and locals hiding the server field (java:S1117).
Macbet
force-pushed
the
refactor/api-restclient
branch
from
November 29, 2026 19:34
f7aef18 to
ebd4f1f
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What changed and why?
Part 4 of #4052. Stacked on the retry pull request.
The API built
RestTemplatein several ways, in some places once per request and without timeouts. Every blocking outbound call now uses aRestClientbuilt once per service throughRestClientFactory, which replacesRestTemplateFactory.WebClientcode is untouched. ApacheHttpStatusconstants are replaced with Spring's.RestClientFactorykeeps whatRestTemplatedid on the wire and on failure: the URI encoding mode, theAcceptheader,Content-Length: 0on a request without a body, and aResourceAccessExceptionwhen the status line or first body byte cannot be read. Redirect policy per client is unchanged, and the webhook client keeps its pool andSameOriginRedirectStrategy.Behaviour changes:
http.proxyPortfalls back to 80 instead of failing the call.Known and unchanged: on a network error the destination URL still ends up in
last_error, as it did withRestTemplate. For Slack that URL contains the secret path.Testing