Introduce health-check-interval module parameter#1851
Introduce health-check-interval module parameter#1851IvanBorislavovDimitrov wants to merge 2 commits into
Conversation
Add support for the MTA module-level parameter health-check-interval, mirroring the existing readiness-health-check-interval plumbing: - Register the constant in SupportedParameters and add it to MODULE_PARAMETERS so the descriptor whitelist accepts it. - Parse it in StagingParametersParser and forward it through the Staging value object. - Forward it to the CF Cloud Controller in CloudControllerRestClientImpl#buildHealthCheck so create and update flows propagate the value via Data.builder().interval(...). - Round-trip the value when reading processes from CF in RawCloudProcess#derive, with a matching getHealthCheckInterval() accessor on CloudProcess. - Surface the parameter in AdditionalModuleParametersReporter via a new MTA_USES_HEALTH_CHECK_INTERVAL_PARAMETER message constant. JIRA:LMCROSSITXSADEPLOY-3316
JIRA:LMCROSSITXSADEPLOY-3316
MTA Quality Report — cloudfoundry/multiapps-controller PR #1851Jira: LMCROSSITXSADEPLOY-3316 — Introduce Health check interval
Code ReviewSecuritySonarCloudSonarCloud check
Annotations unavailable: SonarCloud has not yet finished. Re-run the quality scan once the check completes to fetch per-line annotations. Dependency CVEs✅ No new CVEs — this PR does not modify any dependency files ( |
Description:
Add support for the MTA module-level parameter
health-check-interval, keeping feature parity with the underlying CF capability. Authors of an MTA descriptor can now configure how often the platform issues the liveness health check for an application, mirroring the existingreadiness-health-check-intervalplumbing:Until recently this was not possible because the new CF Java client did not expose the field; the latest CF Java client adoption unblocks the change.
What changed
SupportedParametersand add it toMODULE_PARAMETERSso the descriptor whitelist accepts it.StagingParametersParserand forward it through theStagingvalue object.CloudControllerRestClientImpl#buildHealthCheckso create and update flows propagate it viaData.builder().interval(...).RawCloudProcess#derive, with a matchinggetHealthCheckInterval()accessor onCloudProcess.AdditionalModuleParametersReportervia a newMTA_USES_HEALTH_CHECK_INTERVAL_PARAMETERmessage constant so usage is logged alongside the other tracked module parameters.Tests
multiapps-controller-client/.../RawCloudProcessTest— 4 cases coveringderiveround-trippinghealth-check-interval(present, absent, with the readiness counterpart, and edge values).multiapps-controller-process/.../AdditionalModuleParametersReporterTest— 7 cases exercising the new reporter branch and confirming the log message is emitted only when the parameter is set.multiapps-controller-core/.../StagingParametersParserTest— 3 added cases for parsinghealth-check-intervalfrom module parameters.Notes for the reviewer
buildHealthCheckhelper onCloudControllerRestClientImplwas intentionally not added: the method is private and the readiness counterpart has no unit-test precedent. The read-side round-trip is covered byRawCloudProcessTest.Issue:
Jira: LMCROSSITXSADEPLOY-3316