Skip to content

flows create --step_configs doesn't apply handler configs #1001

@chubes4

Description

@chubes4

Bug

wp datamachine flows create --step_configs accepts handler configuration JSON but doesn't persist the handler configs to the created flow steps. The steps are created with the correct step_type but handler_configs comes back as an empty array.

Reproduction

wp datamachine flows create \
  --pipeline_id=205 \
  --name="Bar Freda" \
  --step_configs='{"event_import":{"handler_slugs":["universal_web_scraper"],"handler_configs":{"universal_web_scraper":{"source_url":"https://www.barfreda.com/event","venue":34304,"venue_name":"Bar Freda"}}},"update":{"handler_configs":{"upsert_event":{"post_status":"publish","taxonomy_location_selection":"Queens"}}}}' \
  --scheduling=daily

Result: Flow created (ID 716) with 3 steps synced, but:

  • event_import step has handler_configs: {"universal_web_scraper": []} — empty
  • update step has handler key update instead of upsert_event, config applied to wrong key
  • Warning output: Some step configurations failed: event_import: At least one of handler_slug, handler_config, user_message, add_handler, or remove_handler is required

Expected: Handler configs should be applied to the created flow steps in a single command.

Workaround

Three separate commands per step after creation:

  1. flows add-handler to add the handler slug
  2. flows update --step=<id> --handler-config='{...}' to apply the config
  3. If default handler key is wrong, remove-handler the default and add-handler the correct one

Context

Discovered while setting up the Bar Freda flow in the new Queens pipeline. The Brooklyn pipeline flows (e.g. flow 407) have correct configs — unclear if those were created via admin UI or CLI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions