Skip to content

RFC: Deploy to GCP Cloud Workflows #172

Description

@FernandoCelmer

Description

Implement dotflow deploy --platform cloud-workflows that reads a Dotflow workflow, automatically generates the Cloud Workflows YAML definition, and deploys it to GCP.

Proposed Usage

dotflow deploy --platform cloud-workflows --project pipeline.py

What it does

  1. Reads the workflow and discovers all tasks
  2. Deploys each task as a Cloud Run service (or Cloud Function)
  3. Generates Cloud Workflows YAML from the workflow structure
  4. Creates the workflow in GCP
  5. Connects everything

Mapping

Dotflow Cloud Workflows
Tasks in sequential Steps with call: http.post
mode="parallel" parallel block
@action(retry=3) retry policy
@action(timeout=30) timeout on step
Context passing result variables between steps

Example output (generated YAML)

main:
  steps:
    - extract:
        call: http.post
        args:
          url: https://pipeline-extract-xxx.run.app
        result: extract_result
    - transform:
        call: http.post
        args:
          url: https://pipeline-transform-xxx.run.app
          body: ${extract_result.body}
        result: transform_result
    - load:
        call: http.post
        args:
          url: https://pipeline-load-xxx.run.app
          body: ${transform_result.body}

Optional: standalone export

dotflow export --format cloud-workflows --output workflow.yaml pipeline.py

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions