-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test AssetExecutionContext subclass deprecations #16598
Conversation
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
|
||
other_ignores = [ | ||
"_abc_impl", | ||
# TODO - what to do about instance vars for OpExecutionContext? listed below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The below attributes are instance variables on OpExecutionContext
that are not available on AssetExecutionContext
because AssetExecutionContext
overrides the __init__
of OpExecutionContext
. We could:
- make properties for each of these attrs on
AssetExecutionContext
and throw deprecation warnings - do nothing since the underscore implies they are private. But there's probably a user somewhere who is calling these, and their code would break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should be able to break users that are accessing private members
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think we should intercept calls to private members...
# Test that every method on OpExecutionContext is either reimplemented by AssetExecutionContext | ||
# or throws a deprecation warning on AssetExecutionContext | ||
|
||
# If this test fails, it is likely because you added a method to OpExecutionContext without | ||
# also adding that method to AssetExecutionContext. Please add the same method to AssetExecutionContext | ||
# with an appropriate deprecation warning (see existing deprecated methods for examples). | ||
# If the method should not be deprecated for AssetExecutionContext, please still add the same method | ||
# to AssetExecutionContext and add the method name to asset_execution_context_attrs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great summary
12894b6
to
ec70892
Compare
896a7d2
to
9d026e9
Compare
ec70892
to
a09fa99
Compare
9d026e9
to
beae87d
Compare
a09fa99
to
bcf4e6e
Compare
beae87d
to
945482e
Compare
682fb19
to
d596c86
Compare
945482e
to
9fbf870
Compare
d596c86
to
9c78c7e
Compare
9fbf870
to
5d3c659
Compare
9c78c7e
to
7c6b42a
Compare
5d3c659
to
c9751d3
Compare
7c6b42a
to
431ffab
Compare
ef91ce0
to
72e04ec
Compare
1919f73
to
384d390
Compare
72e04ec
to
3d8e088
Compare
384d390
to
5c4494f
Compare
3d8e088
to
5fad4f7
Compare
5c4494f
to
2c59e3b
Compare
5fad4f7
to
4c8533d
Compare
2c59e3b
to
ab3472a
Compare
4c8533d
to
f821ec9
Compare
ab3472a
to
2b23f4f
Compare
f821ec9
to
ff9ba61
Compare
2b23f4f
to
db73b3c
Compare
ff9ba61
to
ee3aac2
Compare
converting to draft to get it out of review queues - this will need to be re-opened once we start deprecating methods on AssetExecutionContext |
#17339 replaces this |
Summary & Motivation
Adds a test to ensure that
AssetExecutionContext
stays in sync withOpExecutionContext
. We don't want methods added toOpExecutionContext
without their corresponding deprecated versions added toAssetExecutionContext
, otherwise splittingAssetExecutionContext
into it's own class will be a breaking change. This test goes through each attr onOpExecutionContext
and ensure that it's either:AssetExecutionContext
AssetExecutionContext
How I Tested These Changes