Skip to content

Improve reliability of the codebase and its test suite - #1762

Merged
bart-vmware merged 77 commits into
mainfrom
reliability-fixes-all
Nov 6, 2026
Merged

bart-vmware merged 77 commits into
mainfrom
reliability-fixes-all

Conversation

@bart-vmware

@bart-vmware bart-vmware commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Description

Steeltoe libraries: fix leaks (undisposed configuration providers, certificates and private key files left on disk, keystore streams, DiagnosticListener subscriptions), an infinite recursion with certain combinations of placeholders and connectors, and wrong exception types and disposal errors. Timers and heartbeats now use an injected TimeProvider (no breaking changes to the public API).

Tests: dispose what they create, stop reaching real servers or the ambient environment, and use fake clocks instead of sleeping. Many weak tests now fail when the behavior they cover breaks, while reducing flakiness.

Running all tests locally takes 20% less time (main 317s vs PR 257s, reducing total time by 1m).

Quality checklist

  • Your code complies with our Coding Style.
  • You've updated unit and/or integration tests for your change, where applicable.
  • You've updated documentation for your change, where applicable.
    If your change affects other repositories, such as Documentation and/or Samples, add linked PRs here.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
  • You've added required license files and/or file headers (explaining where the code came from with proper attribution), where code is copied from StackOverflow, a blog, or OSS.

Dispose the temporary copy of the parent configuration that connectors build to post-process connection strings, so the providers it creates, such as file watchers, no longer leak. Providers created for such a copy no longer dispose the post-processors they share with the actual configuration, which would otherwise delete the temporary certificate files that connection strings still point to.
…rary discovery clients it created while loading
…nfiguration when wrapped in Placeholder/Decryption composite sources
…ured parent configuration or disposes shared post-processors
…unique content instead of on every configuration reload
…ate key material is left on disk on Windows and macOS
…hosts, so no private key files are left on disk on Windows
…nd the temporary service provider is always disposed
…ispose what tests create

Fix: ConfigServer tests no longer call the default Config Server address, and the DisposesTimer tests now verify that the timer exists
Fix: Eureka and discovery tests no longer make real network or DNS calls while keeping the client enabled
Fix: Config Server discovery tests no longer call the default Config Server address, and now assert on discovered instances and retries instead of an always-empty result
Fix: tests dispose ConfigurationDiscoveryClient and the Eureka VCAP tests stop their register and fetch timers
…is already disconnected, so it can't mask an earlier error
…f chained host configuration, so a connector's temporary parent copy can't dispose it while the app runs
…lowException when the cipher text has an invalid length prefix
… configuration roots and HTTP handler they create
…ns they create, and no longer leave a running delay or an unobserved background task behind
…, with liveness and readiness enabled, and assert the availability states
…nt certificates from the local CA, so they fail when the org/space check is removed
…KEY and CF_SYSTEM_CERT_PATH variables that AddAppInstanceIdentityCertificate sets
@bart-vmware
bart-vmware requested a review from TimHess November 5, 2026 18:10
@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

@TimHess TimHess left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This was a lot of work, thanks for digging in! LGTM

@bart-vmware
bart-vmware merged commit 6e07b01 into main Nov 6, 2026
44 of 45 checks passed
@bart-vmware
bart-vmware deleted the reliability-fixes-all branch November 6, 2026 02:00
@bart-vmware bart-vmware added the ReleaseLine/4.x Identified as a feature/fix for the 4.x release line label Nov 16, 2026
@bart-vmware bart-vmware added this to the 4.3.1 milestone Nov 16, 2026
@bart-vmware bart-vmware added Component/Common Component/Bootstrapping Issues related to AutoConfiguration package Component/Configuration Issues related to Configuration providers Component/Connectors Issues related to Steeltoe connectors Component/Discovery Issues related to Steeltoe Service Discovery Component/Management Issues related to Steeltoe Management (actuators) Component/Security Issues related to Steeltoe Security components (not app-sec) labels Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component/Bootstrapping Issues related to AutoConfiguration package Component/Common Component/Configuration Issues related to Configuration providers Component/Connectors Issues related to Steeltoe connectors Component/Discovery Issues related to Steeltoe Service Discovery Component/Management Issues related to Steeltoe Management (actuators) Component/Security Issues related to Steeltoe Security components (not app-sec) ReleaseLine/4.x Identified as a feature/fix for the 4.x release line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants