Skip to content

Domain APIs and Doobie related fix for Postgres 16 - #2931

Merged
simonredfern merged 3 commits into
OpenBankProject:developfrom
simonredfern:develop
Oct 4, 2026
Merged

simonredfern merged 3 commits into
OpenBankProject:developfrom
simonredfern:develop

Conversation

@simonredfern

Copy link
Copy Markdown
Member

No description provided.

/obp/dynamic-endpoint/banks/BANK_ID/dynamic-resource-doc/REQUEST_URL,
with SYS for the system space, matching the v7.0.0 Dynamic Entity URLs.
A verb and URL are now unique within a space, not across every  space,
so a system doc and docs at two banks may each answer GET /names under
their own /banks/X/. The index on (RequestUrl, RequestVerb) becomes
(BankId, RequestUrl, RequestVerb), and the check before create looks in
the doc's own space only (a bank-level doc whose URL another space used
used to pass that check and then fail on the index with a database
error). A system level doc now stores SYS as its bank id instead of
NULL, as a Dynamic Entity does; NULLs never equal each other in a unique
index on Postgres or H2, so with NULL the new index could not have kept
two system docs off one URL. In memory the system space is still None,
so the v4.0.0 responses for a system doc no longer carry "bank_id":
null. The step Boot runs on every start
(prepareDynamicEntitySpaceScopedIndexes, not an opt-in migration script)
moves existing NULL bank ids to SYS and drops the old index before
Schemifier creates the new one. The URL without a space still works
while only one space has a doc there; when more
than one does it answers 409 with OBP-40067 naming the spaces to call it
under, and records an API Metric. A call to the URL
without a space records the URL with its space. Tests:
DynamicResourceDocSpaceUrlTest (system, bank A and bank B docs at one
URL each answer under their space and the URL without a space gives 409;
per space uniqueness; a system doc is stored as SYS, reads back as the
system space and a second system doc at the same verb and URL is refused
by the database.
@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2026

Copy link
Copy Markdown

@simonredfern
simonredfern merged commit 8c9205a into OpenBankProject:develop Oct 4, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant