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] simple migration example #23555

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

dpeng817
Copy link
Contributor

@dpeng817 dpeng817 commented Aug 9, 2024

Adds a simple example which shows what it looks like to have completed the peer, observe, and migrate steps, before having actually decommissioned the airflow instance.

Also includes some necessary changes for the demo.

@dpeng817 dpeng817 marked this pull request as ready for review August 9, 2024 17:33
@dpeng817 dpeng817 requested a review from schrockn August 9, 2024 17:33
@dpeng817 dpeng817 force-pushed the dpeng817/simple_migration_example branch 3 times, most recently from a2e6fbb to b1a1e1e Compare August 9, 2024 19:48
@dpeng817 dpeng817 force-pushed the dpeng817/airflow_op_switcher branch from 485bdd5 to f969a17 Compare August 9, 2024 20:32
@dpeng817 dpeng817 force-pushed the dpeng817/simple_migration_example branch from b1a1e1e to 1822845 Compare August 9, 2024 20:33
@dpeng817 dpeng817 force-pushed the dpeng817/airflow_op_switcher branch from f969a17 to 8d46b49 Compare August 9, 2024 21:48
@dpeng817 dpeng817 force-pushed the dpeng817/simple_migration_example branch from 1822845 to 6c7e1dd Compare August 9, 2024 21:48
@dpeng817 dpeng817 force-pushed the dpeng817/airflow_op_switcher branch from 8d46b49 to d4c3c4e Compare August 9, 2024 22:01
@dpeng817 dpeng817 force-pushed the dpeng817/simple_migration_example branch 2 times, most recently from 6b0b3df to 7df6f3f Compare August 9, 2024 23:15
@dpeng817 dpeng817 force-pushed the dpeng817/airflow_op_switcher branch from d4c3c4e to d62b62d Compare August 9, 2024 23:15
@dpeng817 dpeng817 force-pushed the dpeng817/simple_migration_example branch from 7df6f3f to 198af5a Compare August 9, 2024 23:15
@dpeng817 dpeng817 force-pushed the dpeng817/airflow_op_switcher branch from d62b62d to 87da942 Compare August 9, 2024 23:31
@dpeng817 dpeng817 force-pushed the dpeng817/simple_migration_example branch from 198af5a to 6998ff9 Compare August 9, 2024 23:31
Comment on lines 21 to 31
t1 = PythonDefs(
name="simple__t1",
specs=[AssetSpec(key=A1)],
python_fn=t1_work,
)

t2 = PythonDefs(
name="simple__t2",
specs=[
AssetSpec(key=A2, deps=[AssetDep(asset=A1)]),
AssetSpec(key=A3, deps=[AssetDep(asset=A1)]),
],
python_fn=t2_work,
)

t3 = PythonDefs(
name="simple__t3",
specs=[
AssetSpec(key=A4, deps=[AssetDep(asset=A2), AssetDep(asset=A3)]),
],
python_fn=t3_work,
)

Copy link
Member

Choose a reason for hiding this comment

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

Let's make this look like this:

# Asset graph
a1 = AssetSpec(key="a1")
a2 = AssetSpec(key="a2"), deps=[a1])
a3 = AssetSpec(key="a3"), deps=[a1])
a4 = AssetSpec(key="a4"), deps=[a2, a3])

# Factory instance per Airflow tasks


t1 = PythonDefs(name="simple__t1", specs=[a1])
t2 = PythonDefs(name="simple__t2", specs=[a2, a3])
t3 = PythonDefs(name="simple__t3", specs=[a4])

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.

Let's tighten up the examples

Base automatically changed from dpeng817/airflow_op_switcher to master August 13, 2024 16:09
@dpeng817 dpeng817 force-pushed the dpeng817/simple_migration_example branch from c0b0d6b to 8ceea9f Compare August 13, 2024 16:40
@dpeng817 dpeng817 force-pushed the dpeng817/simple_migration_example branch from 8ceea9f to 82c5dd1 Compare August 13, 2024 18:00
@dpeng817 dpeng817 requested a review from schrockn August 13, 2024 18:16
@dpeng817 dpeng817 force-pushed the dpeng817/simple_migration_example branch 3 times, most recently from ebd571c to ca408aa Compare August 13, 2024 21:12
@dpeng817 dpeng817 force-pushed the dpeng817/simple_migration_example branch from ca408aa to 28f23c8 Compare August 13, 2024 21:17
@dpeng817 dpeng817 merged commit 373ac8b into master Aug 13, 2024
1 check passed
@dpeng817 dpeng817 deleted the dpeng817/simple_migration_example branch August 13, 2024 21:35
PedramNavid pushed a commit that referenced this pull request Aug 14, 2024
Adds a simple example which shows what it looks like to have completed
the peer, observe, and migrate steps, before having actually
decommissioned the airflow instance.

Also includes some necessary changes for the demo.
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