Page MenuHomeElementl

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

Authored by sidkmenon on Mar 5 2021, 4:25 PM.

Details

Summary

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

Repository
R1 dagster
Branch
experimental_tag (branched from master)
Lint
Lint Passed
Unit
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!

rebasing off of green master

sidkmenon added a reviewer: prha.
prha added inline comments.
python_modules/dagster/dagster/utils/backcompat.py
186

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

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

192

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

python_modules/dagster/dagster/utils/backcompat.py
192

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