-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[dagster-airlift][federation-apis] federation APIs accumulator #25857
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
924767f
to
9c3d3d3
Compare
3b23857
to
ca0b0d6
Compare
18e94a9
to
ba5b005
Compare
ca0b0d6
to
0f431c5
Compare
ba5b005
to
a3fe72d
Compare
6e8a029
to
252e061
Compare
a3fe72d
to
dcdf600
Compare
252e061
to
66d03ae
Compare
790dad2
to
46df90c
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.
q on some of the type signatures, otherwise lgtm
@@ -36,7 +37,7 @@ | |||
@dataclass | |||
class AirflowInstanceDefsLoader(StateBackedDefinitionsLoader[SerializedAirflowDefinitionsData]): | |||
airflow_instance: AirflowInstance | |||
explicit_defs: Definitions | |||
mapped_assets: Iterable[MappedAsset] |
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.
could we use Sequence
instead of Iterable
across this PR? doesn't seem like we have a strong reason to make it Iterable
& Sequence
is more consistent across other parts of codebase
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.
yea I buy this.
def enrich_airflow_mapped_assets( | ||
mapped_assets: Iterable[MappedAsset], | ||
airflow_instance: AirflowInstance, | ||
) -> Sequence[AssetsDefinition]: |
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.
do we know that the outputs here are AssetsDefinition
, since the input could be specs?
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.
oh I see, _apply_airflow_data_to_specs
forcibly definition-izes the specs, makes sense
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.
yup
46df90c
to
e9d165b
Compare
e9d165b
to
5e8ff6d
Compare
Deploy preview for dagster-docs ready! Preview available at https://dagster-docs-r7d52yv93-elementl.vercel.app Direct link to changed pages: |
Graphite Automations"Add a 'docs-to-migrate' label to PRs with docs" took an action on this PR • (11/14/24)1 label was added to this PR based on Christopher DeCarolis's automation. |
This PR is now being used to accumulate federation API commits before landing.
ORIGINAL DESCRIPTION:
Summary & Motivation
Right now, all airlift internals which operate over mapped airflow assets take in a fully-qualified Definitions object. This PR changes them to instead operate over an iterable of assets, and leaves the definitions munging to the callsites.
After making this change, it becomes easy to add asset-oriented airlift methods - and I demonstrate that with a standalone method to enrich airflow assets. We'll eventually be able to re-implement the full defs loader on top of this.
How I Tested These Changes
New test for the new method, existing test suite.
Changelog
NOCHANGELOG