Page MenuHomeElementl

Refactor launch_run and submit_run to take in an IWorkspace rather than an ExternalPipeline
ClosedPublic

Authored by dgibson on Jun 28 2021, 4:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 13, 6:03 PM
Unknown Object (File)
Apr 20 2023, 6:49 PM
Unknown Object (File)
Apr 13 2023, 2:57 PM
Unknown Object (File)
Apr 10 2023, 11:35 AM
Unknown Object (File)
Apr 10 2023, 1:38 AM
Unknown Object (File)
Apr 9 2023, 3:55 PM
Unknown Object (File)
Apr 9 2023, 7:27 AM
Unknown Object (File)
Apr 9 2023, 4:48 AM
Subscribers
None

Details

Summary

This allows the run queue daemon to launch runs without needing to reload the gRPC server for each repository, which is nice both for speed, but more importantly it can still operate even if the gRPC server is down (instead of throwing

For forward-compat, RunLauncher and RunCoordinator now take in a Context object rather than specific arguments.

Test Plan

BK, Integration

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 28 2021, 5:01 AM
Harbormaster failed remote builds in B32715: Diff 40297!
Harbormaster returned this revision to the author for changes because remote builds failed.Jun 28 2021, 3:41 PM
Harbormaster failed remote builds in B32732: Diff 40317!
Harbormaster returned this revision to the author for changes because remote builds failed.Jun 28 2021, 5:15 PM
Harbormaster failed remote builds in B32739: Diff 40333!
Harbormaster failed remote builds in B32740: Diff 40334!
dgibson retitled this revision from checkpoint: refactor launch_run to pull origin from PipelineRun, so there's no need to call out to the gRPC server when dequeuing runs to Refactor launch_run and submit_run to take in an IWorkspace rather than an ExternalPipeline.
dgibson edited the summary of this revision. (Show Details)

up

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 28 2021, 7:13 PM
Harbormaster failed remote builds in B32753: Diff 40349!
Harbormaster returned this revision to the author for changes because remote builds failed.Jun 28 2021, 8:55 PM
Harbormaster failed remote builds in B32760: Diff 40357!
dgibson edited the test plan for this revision. (Show Details)

upup

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 28 2021, 9:59 PM
Harbormaster failed remote builds in B32768: Diff 40365!

I think this is fine but lots of little changes through-out. Anything you think deserves a closer inspection?

not really? everything is pretty rote once the APIs. Maybe look at one representative run launcher and run coordinator, the top level RunLauncher and RunCoordinator APIs, and the piece inside DagsterInstance?

muk

python_modules/dagster/dagster/cli/pipeline.py
82–173

its touch unfortunate that you need an instance for these cli commands that don't interact with it

very niche use case tho so I don't think worth standing against

python_modules/dagster/dagster/cli/workspace/cli_target.py
171–176

[1] theoretically we could create a different flavor IWorkspace here that doesn't need the instance

592–643

might be worth commenting that instance and version are only required here to use a shared impl for IWorkspace [1] and not fundamentally required to produce the External artifact

python_modules/dagster/dagster/core/instance/__init__.py
1366–1367

update dis

This revision is now accepted and ready to land.Jul 2 2021, 9:29 PM

add comment to the get_xx_from_kwargs method where the instance isn't strictly required (share your feelings on that but ultimately decided it wasn't worth the trouble)

This revision was landed with ongoing or failed builds.Jul 3 2021, 2:49 AM
This revision was automatically updated to reflect the committed changes.