Skip to content

Ordered Flow #397

Description

@fawadasaurus

Is your feature request related to a problem? Please describe.
I need to run an operation after other operations have completed.

component:
  kind: wick/component/composite@v1
  with:
    - name: db_url
      type: string
  operations:
  - name: migration_1
    uses:
      - name: COMPLETE_MIGRATION
        operation: candle_cloud_db::complete_migration
    flow:
    - candle_cloud_db::create_migrations_table.output -> drop
    - candle_cloud_db::create_users_table.output -> drop
    - candle_cloud_db::create_oauth_sessions_table.output -> drop
    - candle_cloud_db::create_oidc_claims_table.output -> drop
    - candle_cloud_db::create_tenants_table.output -> drop
    - candle_cloud_db::create_tenant_users_table.output -> drop
    - candle_cloud_db::create_deployments_table.output -> drop
    - candle_cloud_db::create_secrets_table.output -> drop
    - <>.name -> COMPLETE_MIGRATION.name
    - COMPLETE_MIGRATION.output -> <>.output

In this operation, I need to run create_tenant_users_table only after create_tenants_table and create_users_table completes.

Propose a solution
Make a _ component input. _ will not provide any value but just act as a means of informing the operation that prior operations must execute before the named instance operation executes.

In the following example, CREATE_TENANT_USERS_TABLE will only run after both create_users_table and create_tenants_table has completed.

component:
  kind: wick/component/composite@v1
  with:
    - name: db_url
      type: string
  operations:
  - name: migration_1
    uses:
      - name: CREATE_TENANT_USERS_TABLE
        operation: candle_cloud_db::create_tenant_users_table
      - name: COMPLETE_MIGRATION
        operation: candle_cloud_db::complete_migration
    flow:
    - candle_cloud_db::create_migrations_table.output -> drop
    - candle_cloud_db::create_users_table.output -> CREATE_TENANT_USERS_TABLE._
    - candle_cloud_db::create_oauth_sessions_table.output -> drop
    - candle_cloud_db::create_oidc_claims_table.output -> drop
    - candle_cloud_db::create_tenants_table.output -> CREATE_TENANT_USERS_TABLE._
    - CREATE_TENANT_USERS_TABLE.output -> drop
    - candle_cloud_db::create_deployments_table.output -> drop
    - candle_cloud_db::create_secrets_table.output -> drop
    - <>.name -> COMPLETE_MIGRATION.name
    - COMPLETE_MIGRATION.output -> <>.output

Describe alternatives you've considered
None

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions