-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Http Client implementation (#1741)
Refactor the implementation using java.net with OkHttp. The current HTTP client has various issues. Instead of pathing the existing implementations, it's better to use another client library. OkHTTPClient is one of the most popular one and it's used by PinDeploy and Spinnaker. ## Improvements 1. Observability for outgoing requests. 2. 1 shared connection pool managed by OkHttp instead of many ad-hoc connections. 3. Exponential backup retry on certain failures. 4. Logging with configurable level and sensitive header redaction. 4. Moved to universal so Rodimus can use the same implementation ## Tests and validations Thanks to the added observability, it's very easy to know and monitor if this refactoring is working in addition to the unit tests. ### Smoke tests Deploy both service and worker to dev1 and ensure these are working - Github integration - commit data fetch - Rodimus integration - Ec2 tags can load - Changefeed - events are published to changefeed - Webhook - webhooks can be invoked ## Additional details ### Various logging levels #### Basic <img width="980" alt="Screenshot 2024-11-07 at 15 34 48" src="https://github.com/user-attachments/assets/5ac7359d-3011-413d-b5cf-1e6d8c11b346"> #### Body and header <img width="146" alt="Screenshot 2024-11-07 at 15 35 46" src="https://github.com/user-attachments/assets/85b65d95-7d61-47f3-a62a-d8a4d4fd197b"> ### Metrics <img width="1628" alt="Screenshot 2024-11-07 at 15 31 55" src="https://github.com/user-attachments/assets/8a414b08-f03e-47a4-a70c-2a2e64e7c533"> <img width="1589" alt="Screenshot 2024-11-07 at 15 31 42" src="https://github.com/user-attachments/assets/45dffe1d-329c-4460-8ad6-57599db8055f">
- Loading branch information
1 parent
f7b98a5
commit df4cc0d
Showing
18 changed files
with
810 additions
and
877 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
206 changes: 0 additions & 206 deletions
206
deploy-service/common/src/main/java/com/pinterest/deployservice/common/HTTPClient.java
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.