Page MenuHomeElementl

[core][dagster-mysql] Fixing @experimental tag to work for classes

Authored by sidkmenon on Mar 5 2021, 4:25 PM.
Referenced Files
F2579300: D6810.diff
Wed, Oct 5, 8:31 AM
Unknown Object (File)
Tue, Oct 4, 2:57 AM
Unknown Object (File)
Sat, Sep 24, 6:25 PM
Unknown Object (File)
Tue, Sep 13, 7:29 AM
Unknown Object (File)
Tue, Sep 13, 7:29 AM
Unknown Object (File)
Tue, Sep 13, 7:29 AM
Unknown Object (File)
Tue, Sep 13, 7:29 AM
Unknown Object (File)
Tue, Sep 13, 7:29 AM



I was inspired by D6751, but I noticed that since the @experimental decorator treats its arguments as functions, the decorator & classes that rely on the ConfigurableClass mixin were incompatible. I added a custom decorator for classes. I didn't utilize subclassing since we want the class' signature (all of the metadata to be associated with it) to be the same with or without the decorator - I think with subclassing we'd need a lot more boilerplate (i.e. to overwrite attributes like __name__, etc.)

Test Plan

bk & local testing w/ dagit (via loading from dagster.yaml)

Diff Detail

R1 dagster
experimental_tag (branched from master)
Lint Passed
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Mar 5 2021, 4:43 PM
Harbormaster failed remote builds in B26910: Diff 32901!
prha added inline comments.

generally prefer not to use old/new in var names.

how about old => dunder_init and new => warn_and_init?


feel a little leery of doing this assignment, but I can't identify any glaring gotchas... @alangenfeld / @max any thoughts?

new_init => warn_and_init, old_init => dunder_init


Yeah definitely felt this was a bit weird but couldn't get subclassing to work without also overriding important metadata about the class (e.g. __name__, etc.)

Adding @experimental tag to dagster-pandas as per @rexledesma's comment

This revision is now accepted and ready to land.Mar 12 2021, 4:05 AM
This revision now requires review to proceed.Jul 7 2021, 5:59 PM