You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ThoughtSpot converter: wrongly-typed values in a TML or Ossie document produce raw tracebacks #469
Found by an independent adversarial review (fuzzing). Pre-existing in the merged converter (#364).
The converter contracts to fail with a clear ConversionError, never a bare traceback — its own stash.py comment calls this "this module's own never-a-bare-traceback contract". Wrongly typed values break that. Well-formed input never crashed, and malformed YAML, empty files, top-level scalars and missing keys all still fail cleanly; it is specifically values of the wrong Python type.
to-ossie
Input
Result
a column with no name
KeyError
name as int, null or bool (also model name as int)
TypeError: normalize() argument 2 must be str
aggregation as a list or dict
TypeError at tml_to_ossie.py:1029
data_type as a list
TypeError
formulas[].expr as int
TypeError
join on as int
AttributeError
db_column_name as int
TypeError
columns, model_tables, properties or join destination as the wrong container type
AttributeError
to-tml
A custom_extensions stash with _v: 1 and wrongly-typed values — at model, field, metric and relationship scope — raises AttributeError / ValueError / TypeError.
Documents that already fail the schema (expression as a string, dialects as a dict, a dialect expression as int, name as int, source as int, metrics as a dict) crash rather than being rejected.
Why it is worth fixing as a class
These are all the same shape — a value read as a string or container without checking — so a single guard at the read boundary would cover most of them, rather than eight separate fixes.
The to-tml stash cases are the more likely to be hit in practice: a hand-edited Ossie document is exactly the use case the portable format exists for, and the stash is the part a user is least likely to edit correctly.
Activity
fix(thoughtspot): a malformed column or model name should not crash t…
fix(thoughtspot): move apache#469 guards to the data boundary
fix(thoughtspot): guard wrongly-typed TML values from bare tracebacks (…
fix(thoughtspot): reject a null container element, not crash on it
fix(thoughtspot): report a wrongly-typed container, not a bare traceb…