Page MenuHomeElementl

Ensure that origins don't change when we switch from cli api repos to grpc repos

Authored by dgibson on Oct 20 2020, 12:29 AM.



The grpc server defaults the working dir to the current directory if its empty or null (much like other dagster cli commands do). However, if we are spinning up a gRPC server for a repo in a workspace that did not set the working directory, this causes the origin to change - in particular, when we swap the default loading API to be gRPC instead of the CLI Api, a bunch of origins will change if we're not careful.

This diff makes sure that repos with an empty working directory still have an empty workspace when their gRPC server loads, by using a new --empty-working-directory parameter, while ensuring that people spinning up their own gRPC servers manually still get a nice default.

Test Plan

New test cases that were failing before the changes in open_server_process

Diff Detail

R1 dagster
Lint Not Applicable
Tests Not Applicable

Event Timeline

prha added inline comments.

oh, this is a good idea.

This revision is now accepted and ready to land.Oct 20 2020, 4:05 PM

we could also add it to commands like dagit/launch/execute too, this was just the only command where we needed it to ensure correctness