https://dagster.io/ logo
Title
r

Rubén Lopez Lozoya

10/27/2021, 5:09 PM
hey guys any way to prevent the execution of a c_solid? I am using conditional outputs and passing them to the composite but I get this error:
raise DagsterInvalidDefinitionError(
E   dagster.core.errors.DagsterInvalidDefinitionError: @composite_solid 'c_solid_create_re_uw_template' has unmapped input 'enable'. Remove it or pass it to the appropriate solid invocation.
p

prha

10/28/2021, 12:06 AM
@Rubén Lopez Lozoya do you have some sample code that illustrates the error?
r

Rubén Lopez Lozoya

10/28/2021, 2:23 PM
@pipeline(
    mode_defs=[default_mode, local_nobq_mode],
    tags=default_k8s_tag,
)
def re_uw_pipeline():
    company_name, company_id, _ = solid_get_company_info()
    current_uw_sources = solid_get_current_sources(company_id)

    previous_completed_uw_id = solid_get_previous_completed_uw_id(company_id)
    previous_uw_sources = solid_get_previous_uw_sources(  # noqa: F841
        previous_completed_uw_id
    )
    previous_uw_decisions = solid_get_previous_uw_decisions(previous_completed_uw_id)
    enable_re_uw = solid_check_current_uw_sources_enough(
        current_uw_sources, previous_uw_sources
    )

    current_uw_decisions = c_solid_create_re_uw_template(
        company_id, previous_uw_decisions, enable=enable_re_uw
    )
This is the composite solid I want to prevent from running
c_solid_create_re_uw_template
@solid(
    output_defs=[
        OutputDefinition(name="enable_re_uw", dagster_type=bool, is_required=False)
    ]
)
def solid_check_current_uw_sources_enough(
    context, current_uw_sources: DataFrame, previous_uw_sources: DataFrame
) -> bool:
    are_uw_sources_enough = check_current_uw_sources_enough(
        current_uw_sources, previous_uw_sources
    )

    if are_uw_sources_enough:
        yield Output(1, "enable_re_uw")
the c_solid is not even waiting for the inputs to be there, its just the solids inside the composite waiting, so its also just the solids inside the composite listening to the enable property, is there anyway to prevent the whole composite from running until at least the inputs are ready?