HomeElementl

RFC make_values_resource

Description

RFC make_values_resource

Summary:
depends on D7446

before: https://github.com/dagster-io/dagster/discussions/3213
after the change, users can pass in config:

@solid(required_resource_keys={"my_str"})
def solid1(context):
    my_str = context.resources.my_str
    # do stuff

@solid(required_resource_keys={"my_str"})
def solid2(context):
    my_str = context.resources.my_str
    # do stuff

@pipeline(mode_defs=[ModeDefinition(resource_defs={"my_str": make_values_resource()})])
def my_pipeline():
    solid1()
    solid2()

yaml:

resources:
  my_str:
    config: some_value

Test Plan:
bk

docs:

Screen Shot 2021-04-26 at 12.03.03 PM.png (2×1 px, 410 KB)

Reviewers: alangenfeld, max, sandyryza, schrockn

Reviewed By: schrockn

Subscribers: schrockn

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

Details

Provenance
yuhanAuthored on Apr 16 2021, 6:47 PM
Reviewer
schrockn
Differential Revision
D7484: RFC make_values_resource
Parents
R1:e1c479f42e1e: s3 io manager tiny cleanup
Branches
Unknown
Tags
Unknown