apache / apache/ossie

ossie-dbt osi-to-msi crashes: PydanticSemanticManifest has no model_dump_json

Open Beginner friendly
#296 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.1k
Forks
267
Avg merge
4d 20h
Merged PRs (30d)
24

Description

`ossie-dbt osi-to-msi` fails on every input, including the repo's own example:

```
$ ossie-dbt osi-to-msi -i examples/tpcds_semantic_model.yaml -o out.json
File "converters/dbt/src/ossie_dbt/cli.py", line 78, in _cmd_osi_to_msi
output_path.write_text(result.output.model_dump_json(by_alias=True, exclude_none=True, indent=2))
AttributeError: 'PydanticSemanticManifest' object has no attribute 'model_dump_json'
```

`PydanticSemanticManifest` comes from `metricflow_semantic_interfaces` and subclasses `pydantic.v1.BaseModel`, so the serializer is `.json()`, not `.model_dump_json()`. Calling `.json(by_alias=True, exclude_none=True, indent=2)` on the same object produces valid output.

Reproduced on main at 88e0011. The conversion itself works — only the CLI write fails. No test covers the CLI, so CI passes.

Contributor guide

Open the contributing guide

Research direction

Start in converters/dbt/src/ossie_dbt/cli.py at _cmd_osi_to_msi, then run the reported ossie-dbt osi-to-msi command with examples/tpcds_semantic_model.yaml. Verify that the CLI writes valid JSON to out.json and add coverage for this CLI path, since no existing test covers it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.