Repository navigation
Conversation
Spring Cloud Bindings still rely on the EnvironmentPostProcessor interface that was deprecated in Spring Boot 4.0. This commit disables this feature and adapts to new deprecation warnings. See spring-projectsgh-50955
See spring-projectsgh-50461 Signed-off-by: somiljain2006 <somil16022006@gmail.com>
…nfiguration" Allow `management.opentelemetry.otlp.compression` to act as a common default for OTLP compression, mirroring the existing endpoint/headers fallback. Tracing, logging and metrics exporters now fall back to it when their own signal-specific compression property is unset. See spring-projectsgh-50461
Closes spring-projectsgh-50461 * pr/50461: Polish "Align OTLP signal-specific properties with common fallback configuration" Align OTLP signal-specific properties with common fallback configuration
See spring-projectsgh-50595 Signed-off-by: Phil Clay <philsttr@users.noreply.github.com>
Derive logging.pattern.correlation from the configured MDC keys so that log correlation keeps working when the keys are customized, instead of silently rendering a blank correlation field. Reject empty MDC keys and only clear Brave's default correlation fields when the keys have been customized, so that applications using the defaults are unaffected if Brave adds a default field. Replace the tests that asserted on bean wiring with integration tests covering the MDC contents, plus a smoke test for the log output. See spring-projectsgh-50595
Closes spring-projectsgh-50595 * pr/50595: Polish "Allow configuring Micrometer Tracing MDC keys" Allow configuring Micrometer Tracing MDC keys
…lable Previously, doHealthCheck() only called builder.up() when the LDAP server's protocol version (java.naming.ldap.version) could be read from the JNDI environment. That attribute is only populated when a client explicitly requests it, and Spring LDAP's default LdapContextSource does not set it, so it is commonly absent even on a healthy connection. As a result, a successful LDAP round trip with no version attribute left the Health.Builder at its default Status.UNKNOWN instead of UP, even though executeReadOnly() completed without error. Call builder.up() unconditionally after a successful read, and only guard the "version" detail on the attribute actually being present. Signed-off-by: 2heunxun <seapeon@naver.com>
Contributor
Author
|
Sorry for the noise, I originally opened this against the wrong base branch (4.1.x) and closed it (#51440). |
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 happened?
LdapHealthIndicator.doHealthCheck()reads the LDAP server's protocol version from a JNDI environment attribute and only reports the health status asUPif that version is present:However,
executeReadOnly()returning without throwing already means the LDAP connection succeeded.java.naming.ldap.versionis a JNDI environment attribute that a client requests explicitly. It is not something the server always echoes back, and Spring LDAP's defaultLdapContextSourceconfiguration does not set it.As a result, in a common setup,
versioncan benulleven though the LDAP connection is perfectly healthy.When this happens,
builder.up()is never called. SinceHealth.Builderdefaults toStatus.UNKNOWN, the indicator incorrectly reportsUNKNOWNfor a working LDAP connection instead ofUP.What should happen?
A successful LDAP round trip should report
UP, regardless of whether the optional version detail is available.How to reproduce?
Added
LdapHealthIndicatorTests#ldapIsUpWhenVersionIsUnavailable.The test stubs
executeReadOnly()to returnnull, representing a successful connection where the LDAP version is unavailable, and asserts that:UP.versiondetail is included.On the current code, this test fails because the status is
UNKNOWNinstead ofUP.What does this PR change?
doHealthCheck()now callsbuilder.up()unconditionally after a successfulexecuteReadOnly()call.The
versiondetail is only added when the version is available:No public API changes are introduced.
Impact / risk
UPwith theversiondetail.UPinstead ofUNKNOWN. This is the fix.DOWNthroughAbstractHealthIndicator's exception handling.Tests
ldapIsUpWhenVersionIsUnavailable.LdapHealthIndicatorTestscontinue to pass.checkstyleMainpasses.checkstyleTestpasses.formatpasses.:module:spring-boot-ldap:testpasses.