HomePhabricator

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

Description

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

Summary:
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

Reviewers: alangenfeld, prha, sashank

Reviewed By: prha

Differential Revision: https://dagster.phacility.com/D4823

Details

Provenance
dgibsonAuthored on Oct 19 2020, 11:44 PM
Reviewer
prha
Differential Revision
D4823: Ensure that origins don't change when we switch from cli api repos to grpc repos
Parents
R1:77f3ec8fba9e: serialization safety
Branches
Unknown
Tags
Unknown