Skip to content
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] AirflowInstance, sensor refactor #23538

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

dpeng817
Copy link
Contributor

@dpeng817 dpeng817 commented Aug 9, 2024

Made the AirflowInstance vended classes more composable so we're not throwing around raw dicts everywhere. Added some utilities to trigger and wait for the completion of airflow runs, which are used in tests (for now...)

Made some refactors to the sensor after realizing we don't actually want to report in topological order... we want to report in task order. So instead, retrieve per-task info about each execution. Better testing of this new method is forthcoming, but existing tests already exercise the codepath.

@dpeng817 dpeng817 changed the title [dagster-airlift] Make airflow instance methods more composable; add well-typed properties [dagster-airlift] AirflowInstance, sensor refactor Aug 9, 2024
@dpeng817 dpeng817 marked this pull request as ready for review August 9, 2024 00:15
@dpeng817 dpeng817 requested a review from schrockn August 9, 2024 00:17

@property
def end_date(self) -> float:
return AirflowInstance.timestamp_from_airflow_date(self.metadata["end_date"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point we might cross the threshold of wanting to use an openapi-generated client https://github.com/apache/airflow-client-python

Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems reasonable to me. As I noted, at some point it might make sense to either take a dependency or vendor an open-api generated client.

@dpeng817 dpeng817 force-pushed the dpeng817/airflow_instance_fixes branch from 5a69ee2 to bc014a2 Compare August 9, 2024 21:07
@dpeng817 dpeng817 merged commit 4a096f8 into master Aug 9, 2024
1 check was pending
@dpeng817 dpeng817 deleted the dpeng817/airflow_instance_fixes branch August 9, 2024 21:08
PedramNavid pushed a commit that referenced this pull request Aug 9, 2024
Made the AirflowInstance vended classes more composable so we're not
throwing around raw dicts everywhere. Added some utilities to trigger
and wait for the completion of airflow runs, which are used in tests
(for now...)

Made some refactors to the sensor after realizing we don't actually want
to report in topological order... we want to report in task order. So
instead, retrieve per-task info about each execution. Better testing of
this new method is forthcoming, but existing tests already exercise the
codepath.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants