HomeElementl

Create interface for determining python type of all DagsterTypes

Description

Create interface for determining python type of all DagsterTypes

Summary:
OUTDATED SUMMARY BELOW:

This is the initial state, which I don't really like. It seems like what we really want to expose is something like a typing_type for each of these. This initially came up in the context of me wanting to write an IOManager that could alter its loading behavior based on what type it will be loaded as downstream. This is trivial if you're using DagsterTypes directly, but if you're relying on the TypeHintInferredDagsterType stuff, you really want to rely on the behavior that if you annotate a solid:

@solid
def my_solid(in1: List[Optional[int]]):
...

Then context.dagster_type.python_type will be equivalent to List[Optional[int]]. However, List and Optional are not valid types, so with this diff it'll actually just give you list. Putting this diff out just as a point of reference, but I'll probably try to go down the typing_type route.

Test Plan: bk

Reviewers: alangenfeld, cdecarolis, sandyryza

Reviewed By: alangenfeld

Differential Revision: https://dagster.phacility.com/D8262

Details

Provenance
owenAuthored on Jun 4 2021, 11:56 PM
Reviewer
alangenfeld
Differential Revision
D8262: Create interface for determining python type of all DagsterTypes
Parents
R1:085034a8c065: expose retry attempts on SoildExecutionContext
Branches
Unknown
Tags
Unknown