dagster icon indicating copy to clipboard operation
dagster copied to clipboard

RFC (more like dump prototype) Typed resource ctor:

Open schrockn opened this issue 2 years ago • 3 comments

This is more of a pattern rather than real technology. I banged this out very quickly so it is not fleshed out. The idea here is to make it norm to provide typed constructors for resources as opposed to configured. The configurable resource is still available for advanced cases.

The big drawback here is that this breaks direct resource invocation. However I think for the spin-up/simple use case this is far more self-explantory.

Additionally a natural extension would be to generate config schema from the python types on the typed signature if that is desirable.

schrockn avatar Sep 21 '22 16:09 schrockn

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Updated
dagit-storybook ⬜️ Ignored (Inspect) Sep 21, 2022 at 4:49PM (UTC)
dagster ⬜️ Ignored (Inspect) Sep 21, 2022 at 4:49PM (UTC)
dagster-oss-cloud-consolidated ⬜️ Ignored (Inspect) Sep 21, 2022 at 4:49PM (UTC)

vercel[bot] avatar Sep 21 '22 16:09 vercel[bot]

To point it out explictly, the level of indirection is so that existing callsites that call configured still work

schrockn avatar Sep 21 '22 16:09 schrockn

The big drawback here is that this breaks direct resource invocation. However I think for the spin-up/simple use case this is far more self-explantory.

Is there a fundamental reason it needs to break direct resource invocation?

sryza avatar Sep 21 '22 16:09 sryza