Skip to content

Apply Spring Boot connection validation settings to HttpClient - #1883

Merged
fatroom merged 2 commits into
zalando:mainfrom
vadimturkov:fix-time-to-live-for-connections
Sep 16, 2026
Merged

fatroom merged 2 commits into
zalando:mainfrom
vadimturkov:fix-time-to-live-for-connections

Conversation

@vadimturkov

Copy link
Copy Markdown

The change ensures time-to-live and validate-after-inactivity are merged correctly and applied to the underlying ConnectionConfig, including the default configuration for the Spring Boot starter.

Description

This PR fixes the Spring Boot auto-configuration for Apache HttpClient connections by ensuring the connection lifecycle settings are correctly merged and applied.

The update adds validate-after-inactivity to the Spring Boot properties model, keeps the default value consistent with the starter defaults, and ensures client-specific values override the default configuration as expected. It also wires both time-to-live and validate-after-inactivity into the underlying ConnectionConfig used by the pooled HttpClient.

In addition, the documentation was updated to describe the new property and regression tests were added to cover both defaulting and configuration behavior.

Motivation and Context

The Spring Boot auto-configured HttpClient was missing part of the connection configuration. In particular, the inactivity validation setting was not being merged or applied, which could allow stale pooled connections to remain active longer than intended.

This change ensures that connection lifetime and inactivity validation are configured consistently for Riptide clients using the Spring Boot starter.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@fatroom fatroom added the bugfix Bug fixes and patches, e.g. fixing of a production issue that is affecting the customer experience. label Sep 11, 2026
@fatroom

fatroom commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

👍

1 similar comment
@vadimturkov

Copy link
Copy Markdown
Author

👍

@fatroom
fatroom merged commit e9a683b into zalando:main Sep 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug fixes and patches, e.g. fixing of a production issue that is affecting the customer experience.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants