dwall
01/24/2020, 8:33 PMalex
01/24/2020, 8:36 PMdwall
01/24/2020, 8:40 PMalex
01/24/2020, 8:41 PMdwall
01/24/2020, 8:41 PMalex
01/24/2020, 8:42 PMenv
part of the problemdwall
01/24/2020, 8:46 PMalex
01/24/2020, 8:47 PMbash_command_solid
- could you wrap that in a function that does said processing for you (and potentially bundles it in a composte that locks the env vars)dwall
01/24/2020, 8:50 PM@solid(
description='A solid to invoke a ranch process.',
input_defs=[InputDefinition(name='start', dagster_type=Nothing, description='Nothing.')],
output_defs=[OutputDefinition(name='end', dagster_type=Nothing, description='Nothing.')],
config={
"command": Field(
dagster_type=String,
is_optional=False,
description="The command to run"
),
"app": Field(
dagster_type=String,
is_optional=False,
description="The ranch app to run the command on."
)
}
)
def ranch_run(context):
command = f"ranch run {context.solid_config['command']} --app {context.solid_config['app']}"
solid = bash_command_solid(command)
alex
01/24/2020, 8:55 PMbash_command_solid
is a solid factory function - so invoking it in a solid is going to try do that work at runtimebash_command_solid
as a reference but just creating you’re own that allows you to do what you wantdwall
01/24/2020, 8:58 PMbash_command_solid
. Do y'all by chance have an example of how to properly leverage this solid?alex
01/24/2020, 8:58 PMbash_command_solid
has a lot of battle testing on it - its really just a first stab at thingsdwall
01/24/2020, 8:59 PMalex
01/24/2020, 8:59 PMhave an example of how to properly leverage this solid?the test cases are the only callsites we have
dwall
01/24/2020, 9:06 PM