json_type insert option is parsed but has no effect in 13.7.2.1
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with doc/configuration.md and JsonTypeConfig in cardano-db-sync/src/Cardano/DbSync/Config/Types.hs, then read the config-parse tests and generator references. Trace whether schema, migration, insert, or query modules consume the option; done means either wiring text/jsonb/disable into JSON column storage or removing the inert setting and documenting the replacement.
Written by the indexing model from the issue text.
Description
Question
doc/configuration.md shows json_type in the insert_options examples (e.g. "json_type": "text"), but setting it appears to do nothing. Is it still a supported option, or is it dead config that should be wired up or removed/documented?
Observed
db-sync 13.7.2.1 (git db8cdf6), preview and a local testnet. Recreated the database from scratch under each setting:
json_type: text-> the.jsoncolumns arejsonbjson_type: jsonb-> the.jsoncolumns arejsonb
The text and jsonb settings produce an identical schema. Columns checked:
tx_metadata.json, script.json, off_chain_pool_data.json, off_chain_vote_data.json (all stay jsonb, which is also the default).
Source
sioJsonType / JsonTypeConfig is defined and parsed in cardano-db-sync/src/Cardano/DbSync/Config/Types.hs (accepted values text, jsonb, disable; default JsonTypeText).
Grepping the tree, the only references to JsonType / sioJsonType are in that file plus the config-parse tests and a generator - there is no reference in any Schema, Migration, Insert or Query module.
So the value is validated and round-tripped in the config but never consumed, which matches the "no effect" behaviour above.
Resolution
Either:
- Wire
json_typeinto the schema sotext/jsonb/disableactually control the storage type of the JSON columns, or - If it is intentionally inert (superseded by
remove_jsonb_from_schema), document that and/or remove it from the config and the examples so users do not set an option that does nothing.
- Dominant language
- Haskell
- Stars
- 319
- Forks
- 169
- Avg merge
- 10h 54m
- Merged PRs (30d)
- 3
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IntersectMBO/cardano-db-sync
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
IntersectMBO/cardano-db-sync#1952 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
IntersectMBO/cardano-db-sync#1645 · 3 comments ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
IntersectMBO/cardano-db-sync#2189 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
IntersectMBO/cardano-db-sync#2187 · 1 comment ·
-
pool_relay ipv4/ipv6 stored with literal double quotes in 13.8.0.0Possibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 72/100
IntersectMBO/cardano-db-sync#2182 ·
All issues in IntersectMBO/cardano-db-sync
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
15-minutes 5-minutes algorithm any-language beginner-friendly c cpp csharp easy go good first issue hacktoberfest help wanted java javascript kotlin python rust swift typescript
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Huerte/algo-solutions-python#260 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
IntersectMBO/cardano-ledger#6276 ·
Maintainers usually reply within 1 day