Page MenuHomeElementl

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

Authored by sidkmenon on Mar 5 2021, 4:25 PM.
Referenced Files
Unknown Object (File)
Mon, Aug 8, 3:16 PM
Unknown Object (File)
Tue, Aug 2, 5:18 AM
Unknown Object (File)
Sun, Jul 31, 10:08 PM
Unknown Object (File)
Fri, Jul 29, 2:26 PM
Unknown Object (File)
Sat, Jul 23, 10:37 PM
Unknown Object (File)
Fri, Jul 22, 5:57 PM
Unknown Object (File)
Tue, Jul 12, 4:57 PM
Unknown Object (File)
Jul 12 2022, 5:04 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