-
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
[module-loaders] Genericize object list utils #26535
[module-loaders] Genericize object list utils #26535
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
7ec766f
to
f2e7f3d
Compare
8831b0b
to
db2f79a
Compare
f2e7f3d
to
a67444d
Compare
db2f79a
to
091517b
Compare
a67444d
to
fa8dff1
Compare
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.
I like the direction, just think we should update the names
@@ -9,8 +9,11 @@ | |||
from dagster._core.definitions.cacheable_assets import CacheableAssetsDefinition | |||
from dagster._core.definitions.source_asset import SourceAsset | |||
|
|||
LoadableAssetTypes = Union[AssetsDefinition, AssetSpec, SourceAsset, CacheableAssetsDefinition] | |||
KeyScopedAssetObjects = (AssetsDefinition, AssetSpec, SourceAsset) | |||
LoadableAssetObject = Union[AssetsDefinition, AssetSpec, SourceAsset, CacheableAssetsDefinition] |
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.
I think Object
-> Def
in all of these names would make more sense
@@ -46,17 +47,17 @@ def from_modules(cls, modules: Iterable[ModuleType]) -> "LoadedAssetsList": | |||
) | |||
|
|||
@cached_property | |||
def flat_object_list(self) -> Sequence[LoadableAssetTypes]: | |||
def flat_object_list(self) -> Sequence[LoadableDagsterObject]: |
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.
e.g.
def dlat_defs_list(self) -> Sequence[LoadableDagsterDef]:
091517b
to
49c6d6b
Compare
fa8dff1
to
d8e8a8f
Compare
49c6d6b
to
51512e6
Compare
d8e8a8f
to
01f281a
Compare
51512e6
to
3553a63
Compare
01f281a
to
f7eb224
Compare
f1016a1
to
2b7cdbb
Compare
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.
@OwenKephart so I'd like to push back for the asset case; it's very hard to reason about assets since there is AssetsDefinition
, SourceAsset
and AssetSpec
, and those can all have the same values. I think that that SourceAsset
and AssetSpec
falling into a defs_list is a bit strange, but maybe that's saying more about the naming of those APIs than anything else.
I don't feel that strongly about it but I'd request that if you really want the name change that we do it in a follow up; turns into an absolutely nightmarish rebase (changes like every line of the object_list.py file)
9e56100
to
143aa7b
Compare
2b7cdbb
to
d2db161
Compare
I do like But this isn't extremely publicly facing and we are in a release freeze zone, so I think landing + follow up for name changes is reasonable. (you have my verbal stamp. i will let owen approve in case of any strong reason not to) |
I'm fine with making the change in a follow up |
143aa7b
to
67ee4a3
Compare
d2db161
to
6bc53ed
Compare
67ee4a3
to
370277b
Compare
6bc53ed
to
a1e7c18
Compare
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.
Requesting changes in re: the naming change discussion in the PR above.
If we're aligned on those changes, happy to approve this PR and let you do the refactor stacked on top or wherever's convenient
370277b
to
349e3bd
Compare
a1e7c18
to
e9d0bba
Compare
We're aligned @OwenKephart - I'll make the naming changes in a followup |
349e3bd
to
a10d824
Compare
e9d0bba
to
b1f2469
Compare
a10d824
to
b5065bf
Compare
b1f2469
to
d4430a7
Compare
b5065bf
to
41ec0ab
Compare
d4430a7
to
3f706f1
Compare
3f706f1
to
73810c7
Compare
0405939
into
dpeng817/delete_extra_source_assets
## Summary & Motivation The object list utils were previously defining behavior mostly in terms of assets. Genericize the utilities to instead refer to "DagsterObjects" where appropriate; in preparation for handling other types of dagster definitions. ## How I Tested These Changes Existing tests
Summary & Motivation
The object list utils were previously defining behavior mostly in terms of assets. Genericize the utilities to instead refer to "DagsterObjects" where appropriate; in preparation for handling other types of dagster definitions.
How I Tested These Changes
Existing tests