feat: set ERROR_HANDLING_AJV_JOI_PARITY on openapi-backend migrations - #826
Open
gibaros wants to merge 1 commit into
Open
feat: set ERROR_HANDLING_AJV_JOI_PARITY on openapi-backend migrations#826gibaros wants to merge 1 commit into
gibaros wants to merge 1 commit into
Conversation
… migrations [mojaloop/#4479] central-services-error-handling 13.2.0 maps the ajv enum/const/format/pattern validation keywords to 3101 (Malformed syntax) only when the ERROR_HANDLING_AJV_JOI_PARITY environment variable is true; the library default is 3100, preserving the behaviour of services already running openapi-backend. The services migrating from hapi-openapi/joi (central-ledger incl. all handler deployments, central-settlement, bulk-api-adapter, als-oracle-pathfinder) return 3101 for these validation failures in production today, so their charts now set the flag (configurable via config.error_handling_ajv_joi_parity, default true). The embedded event-sidecar containers receive the same variable for uniformity; the sidecar does not use the error-handling mapper, so it is inert there. Verified with helm template on all four charts; Golden Path 'Check Settlements Error #956' (which asserts the production 3101) passes against these services with the flag enabled and central-services-error-handling 13.2.0.
gibaros
requested review from
bushjames,
elnyry-sam-k,
kalinkrustev,
kleyow,
oderayi,
shashi165 and
vijayg10
as code owners
August 31, 2026 15:06
|
Member
|
Looks good @gibaros ! thanks for the PR.. Only changes needed - versions of updated charts need to be updated before the merge. |
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.



Scope
This PR touches only the charts of the five services being migrated to openapi-backend [mojaloop/project#4479] — the same five under review in the service PRs listed below. No other service's chart is modified (quoting-service, account-lookup-service, ml-api-adapter and the rest of the fleet are intentionally untouched: for them the new library behaviour is the default and no configuration is needed).
What
Sets the
ERROR_HANDLING_AJV_JOI_PARITYenvironment variable ("true", configurable viaconfig.error_handling_ajv_joi_parity) on the Kubernetes Deployments of the five migrating services:centralledger/centralsettlement/bulk-api-adapter/als-oracle-pathfinder/24 files changed: 12 deployment templates + 12 values files, nothing else.
Why
central-services-error-handling13.2.0 (mojaloop/central-services-error-handling#216) maps the ajvenum/const/format/patternvalidation keywords to FSPIOP 3101 "Malformed syntax" only when this variable istrue; the library default is 3100, preserving the behaviour of services already running openapi-backend/ajv.The five migrating services return 3101 for these validation failures in production today via joi, so their charts opt in — without this variable, the migration would silently change their API error contract (Golden Path
Check Settlements Error #956asserts the production 3101 and fails without it).Sequencing
Safe to merge before or after the service migration PRs land in chart image versions: the variable is unread by the current joi-based images, and becomes load-bearing once the openapi-backend releases (with
central-services-error-handling >= 13.2.0) are deployed. Related service PRs: mojaloop/central-ledger#1291, mojaloop/central-settlement#487, mojaloop/bulk-api-adapter#148, mojaloop/event-sidecar#82, mojaloop/als-oracle-pathfinder#124.Verification
helm templaterenders all four charts successfully; the variable appears on every enabled Deployment withvalue: "true"