Page MenuHomePhabricator

Do not pin to python37 executable in append_generated

Authored by schrockn on Jun 5 2019, 3:29 PM.



Hardcoding to python37 executable in this script creates dependencies on the local setup of your development environment. For example I manage python dependencies via pyenv and this command is not available. If we need to pin to specific versions with should check that within append_generated itself. Or we should figure out an alternative approach for hiding autogened ts files

Test Plan

Run generate types

Diff Detail

R1 dagster
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

schrockn updated this revision to Diff 1462.Jun 5 2019, 3:29 PM
schrockn created this revision.
schrockn added a reviewer: max.


bengotow accepted this revision.Jun 5 2019, 4:40 PM

Looks good to me! One minor nit is that a few months ago generate-types started to require that it is run inside the dagster venv. I wonder if there's a super easy way to bail / alert the user if they run generate-types outside the env that will run the python script happily? Right now it blows up in a bit of a cryptic way:

/bin/sh: dagster-graphql: command not found

    at checkExecSyncError (child_process.js:637:11)
    at Object.execSync (child_process.js:674:13)
    at Object.<anonymous> (/Users/bengotow/Work/F376/Projects/dagster/js_modules/dagit/src/scripts/DownloadSchema.ts:5:16)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Module.m._compile (/Users/bengotow/Work/F376/Projects/dagster/js_modules/dagit/node_modules/ts-node/src/index.ts:439:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:810:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/Users/bengotow/Work/F376/Projects/dagster/js_modules/dagit/node_modules/ts-node/src/index.ts:442:12)
    at Module.load (internal/modules/cjs/loader.js:666:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
    at Function.Module._load (internal/modules/cjs/loader.js:598:3)
error Command failed with exit code 1.
This revision is now accepted and ready to land.Jun 5 2019, 4:40 PM
This revision was automatically updated to reflect the committed changes.