feat: add env var config layer for EurekaClient intervals — GH#4774#4794
Open
balhar-jakub wants to merge 3 commits into
Open
feat: add env var config layer for EurekaClient intervals — GH#4774#4794balhar-jakub wants to merge 3 commits into
balhar-jakub wants to merge 3 commits into
Conversation
Insert envConfig.js module between YAML and constructor layers in the EurekaClient merge chain. Maps EUREKA_CLIENT_REGISTRYFETCHINTERVALSECONDS and EUREKA_CLIENT_INSTANCEINFOREPLICATIONINTERVALSECONDS env vars (seconds) to registryFetchInterval and heartbeatInterval (milliseconds). - New: onboarding-enabler-nodejs/src/envConfig.js — data-driven module - Modified: EurekaClient.js — import + envConfig() in merge chain - New tests: 6 test cases covering override, precedence, fallback Signed-off-by: Balda <balda@zowe.org> Signed-off-by: Jakub Balhar <jakub.balhar@broadcom.com>
Signed-off-by: Jakub Balhar <jakub.balhar@broadcom.com>
Signed-off-by: Jakub Balhar <jakub.balhar@broadcom.com>
Member
Author
QA + Security Review — PR #4794 (#4774)Verdict: ✅ APPROVEDArchitecture ComplianceImplementation matches the architect's solution design exactly:
No architecture drift detected. Pavel's Lens — All 8 Rules
Code Quality Notes
CI Status
|
|
tapheret2
reviewed
Jul 10, 2026
tapheret2
left a comment
There was a problem hiding this comment.
Review pass
Static review of the open diff:
- Looks focused enough for a community review pass
- Please ensure tests/docs match any behavior change
- Call out breaking changes in the PR body if any
Thanks — re-submitted after rate-limit cooldown.
achmelo
reviewed
Jul 10, 2026
| // Future: add entries here for circuit breaker properties (#4775) | ||
| // { env: 'EUREKA_CLIENT_MAXFAILURES', key: 'maxFailures', unit: 'milliseconds' }, | ||
| // { env: 'EUREKA_CLIENT_COOLDOWNTIME', key: 'cooldownTime', unit: 'seconds' }, | ||
| // { env: 'EUREKA_CLIENT_BACKOFFMAX', key: 'backoffMax', unit: 'seconds' }, |
Member
There was a problem hiding this comment.
I would just uncomment these properties if they are suppose to be used by changes in another PR
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.



Closes #4774
Adds a configuration layer into EurekaClient.js's merge chain so that
EUREKA_CLIENT_REGISTRYFETCHINTERVALSECONDSandEUREKA_CLIENT_INSTANCEINFOREPLICATIONINTERVALSECONDSenv vars override YAML/default values.Files changed:
onboarding-enabler-nodejs/src/envConfig.js— data-driven module mapping env vars to eureka config keys with seconds→ms conversiononboarding-enabler-nodejs/src/EurekaClient.js— insertedenvConfig()in merge chain between YAML and constructor layersonboarding-enabler-nodejs/test/EurekaClient.test.js— 6 new tests covering override, precedence, fallback for missing/invalid/zero env varsonboarding-enabler-nodejs/src/index.js— pre-existing ESLint indentation fix (line 78)Precedence chain (after change):
constructor > env vars > YAML files > defaultsTest results:
./gradlew :onboarding-enabler-nodejs:build→ BUILD SUCCESSFUL