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][federation-tutorial] Observe section federation tutorial #25892

Merged

Conversation

dpeng817
Copy link
Contributor

Summary & Motivation

How I Tested These Changes

Changelog

Insert changelog entry or delete this section.

@dpeng817 dpeng817 marked this pull request as ready for review November 13, 2024 00:41
@graphite-app graphite-app bot added the docs-to-migrate Docs to migrate to new docs site label Nov 13, 2024
Copy link

graphite-app bot commented Nov 13, 2024

Graphite Automations

"Add a 'docs-to-migrate' label to PRs with docs" took an action on this PR • (11/13/24)

1 label was added to this PR based on Christopher DeCarolis's automation.

@@ -949,6 +949,10 @@
{
"title": "Part 1: Setup upstream and downstream Airflow instances",
"path": "/integrations/airlift/federation-tutorial/setup"
},
{
"title": "Part 2: Observe dag lineage in Dagster",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"title": "Part 2: Observe dag lineage in Dagster",
"title": "Part 2: Observe DAG lineage in Dagster",

@@ -0,0 +1,208 @@
# Airflow Federation Tutorial: Observing multiple Airflow instances

At this point, we should have finished the [setup](/integrations/airlift/federation-tutorial/setup) step, and now we have the example code setup with a fresh virtual environment, and our two Airflow instances running locally. Now, we can start writing Dagster code.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
At this point, we should have finished the [setup](/integrations/airlift/federation-tutorial/setup) step, and now we have the example code setup with a fresh virtual environment, and our two Airflow instances running locally. Now, we can start writing Dagster code.
At this point, you should have finished the [setup](/integrations/airlift/federation-tutorial/setup) step, and now you have the example code in a fresh virtual environment, and two Airflow instances running locally. Now, let's start writing Dagster code.


## Observing the Airflow instances

We'll start by creating asset representations of our DAGs in Dagster.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
We'll start by creating asset representations of our DAGs in Dagster.
We'll start by creating asset representations of our Airflow DAGs in Dagster.


### Observing the `warehouse` Airflow instance

Next, we'll declare a reference to our `warehouse` Airflow instance, which is running at `http://localhost:8081`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I requested changes above of we -> you, but let's just make sure there's consistency across guides.

Copy link
Contributor

@cmpadden cmpadden left a comment

Choose a reason for hiding this comment

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

Approved with some nits.

We need to make sure we're consistent in how we talk to the user, whether that be us saying "you" directly, which I believe we do in other docs, or "we".

@dpeng817 dpeng817 changed the title [dagster-airlift] Observe section federation tutorial [dagster-airlift][federation-tutorial] Observe section federation tutorial Nov 13, 2024
@dpeng817 dpeng817 force-pushed the dpeng817/fed-tutorial-observe-section branch from ea3067a to 2390f28 Compare November 13, 2024 19:00
@dpeng817 dpeng817 force-pushed the dpeng817/fed-tutorial-observe-section branch from 2390f28 to d038556 Compare November 13, 2024 19:10
@dpeng817 dpeng817 force-pushed the dpeng817/fed-tutorial-observe-section branch from d038556 to 3eb8689 Compare November 13, 2024 19:15
@dpeng817 dpeng817 force-pushed the dpeng817/implement_dags branch 2 times, most recently from 2ac9632 to 13ff868 Compare November 13, 2024 20:01
@dpeng817 dpeng817 force-pushed the dpeng817/fed-tutorial-observe-section branch from 3eb8689 to 9b8354a Compare November 13, 2024 20:01
@dpeng817 dpeng817 force-pushed the dpeng817/fed-tutorial-observe-section branch from 9b8354a to 2adfd07 Compare November 13, 2024 22:00
)
# end_lineage

defs = Definitions(assets=[load_customers, customer_metrics_dag_asset])
Copy link

Choose a reason for hiding this comment

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

The final Definitions object is missing the sensor registrations that were defined earlier. To ensure both DAGs are properly monitored, the sensors should be included:

defs = Definitions(
    assets=[load_customers, customer_metrics_dag_asset],
    sensors=[warehouse_sensor, metrics_sensor]
)

This ensures that both the warehouse and metrics DAGs will be monitored for new runs.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@dpeng817 dpeng817 force-pushed the dpeng817/fed-tutorial-observe-section branch from 2adfd07 to 71aa819 Compare November 13, 2024 22:03
@dpeng817 dpeng817 force-pushed the dpeng817/fed-tutorial-observe-section branch from 71aa819 to 72e4fe5 Compare November 13, 2024 22:18
@dpeng817 dpeng817 force-pushed the dpeng817/fed-tutorial-observe-section branch from 72e4fe5 to 48e9247 Compare November 13, 2024 23:19
@dpeng817 dpeng817 force-pushed the dpeng817/fed-tutorial-observe-section branch from 48e9247 to 86ce701 Compare November 13, 2024 23:47
@dpeng817 dpeng817 force-pushed the dpeng817/fed-tutorial-observe-section branch from 86ce701 to 3940172 Compare November 14, 2024 00:00
@dpeng817 dpeng817 force-pushed the dpeng817/fed-tutorial-observe-section branch from 3940172 to 7da4baa Compare November 14, 2024 18:09
Base automatically changed from dpeng817/implement_dags to dpeng817/federation-tutorial November 14, 2024 18:10
@dpeng817 dpeng817 merged commit 7da4baa into dpeng817/federation-tutorial Nov 14, 2024
1 of 2 checks passed
@dpeng817 dpeng817 deleted the dpeng817/fed-tutorial-observe-section branch November 14, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-to-migrate Docs to migrate to new docs site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants