HomePhabricator

Fix bug with config defaults

Authored by Sashank Thupukari <s@thupukari.com> on Aug 1 2019, 9:25 PM.

Description

Fix bug with config defaults

Summary:
See https://github.com/dagster-io/dagster/issues/1608

Also included small utility function print_schema() to make it easier to debug config_types

Example:

{
  solids: {
    print_value?: {
      outputs?: {
        result?: {
          |–json: {
          |  path: [Path]
          |}
          |–pickle: {
          |  path: [Path]
          |}
        }
      }
    } default={}
    prefix_id: {
      inputs: {
        id: {
          |–value: [ANY]
          |–json: {
          |  path: [Path]
          |}
          |–pickle: {
          |  path: [Path]
          |}
        }
      }
      outputs?: {
        result?: {
          |–json: {
          |  path: [Path]
          |}
          |–pickle: {
          |  path: [Path]
          |}
        }
      }
      config?: {
        prefix?: [String]  default=_id_
      } default={'prefix': '_id_'}
    }
  }
  expectations?: {
    evaluate?: [Bool]  default=True
  } default={'evaluate': True}
  storage?: {
    |–in_memory?: {
    |
    |} default={}
    |–filesystem?: {
    |  config?: {
    |    base_dir?: [String]
    |  } default={}
    |} default={'config': {}}
  }
  execution?: {

  } default={}
  loggers?: {
    console?: {
      config?: {
        log_level?: [String]  default=INFO
        name?: [String]  default=dagster
      } default={'log_level': 'INFO', 'name': 'dagster'}
    }
  } default={}
  resources?: {

  } default={}
}

Test Plan: unit

Reviewers: #ft, natekupp

Reviewed By: #ft, natekupp

Subscribers: natekupp, alangenfeld

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

Details

Committed
Sashank Thupukari <s@thupukari.com>Aug 1 2019, 11:56 PM
Reviewer
Restricted Project
Differential Revision
D753: Fix bug with config defaults
Parents
R1:a3e7c966752a: Fix undefined name on py2
Branches
Unknown
Tags
Unknown