Page MenuHomePhabricator

(dict-where-type-is-used-2) Allow list in config
ClosedPublic

Authored by schrockn on Jan 9 2020, 1:17 AM.

Details

Summary

Now that we allow unadorned dictionaries to specify config
schema, it's natural to extend this to lists as well. Instead of
List[str] you can just do [str]. With this change I believe we
can rename the config List and Dict to Array and Shape and the user
will never have to see that if they just use the condensed syntax

Depends on D1796

Test Plan

BK

Diff Detail

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

Event Timeline

schrockn created this revision.Jan 9 2020, 1:17 AM
schrockn updated this revision to Diff 8488.Jan 9 2020, 1:23 AM
schrockn edited the summary of this revision. (Show Details)
schrockn added reviewers: alangenfeld, max.

upmessage

Harbormaster failed remote builds in B6890: Diff 8487!
alangenfeld accepted this revision.Jan 9 2020, 10:29 PM

goforit

python_modules/dagster/dagster/core/types/config/field.py
50–59

would probably be good to include some explanation of what list is used for in this context in these errors instead of assuming I knew what i doing and slightly messed up. Maybe just a lil example like

List specifications must only be of length 1 ie [str]

would be sufficient

python_modules/dagster/dagster/core/types/config/field_utils.py
309–321

i assume these are less likely to be user facing? if not same concern as above

This revision is now accepted and ready to land.Jan 9 2020, 10:29 PM
This revision was automatically updated to reflect the committed changes.