Skip to content

Support additional fields to start api#1026

Merged
Assem-Uber merged 4 commits intocadence-workflow:masterfrom
Assem-Uber:feature/15220/support-optional-fields-in-start-wf-api
Sep 16, 2025
Merged

Support additional fields to start api#1026
Assem-Uber merged 4 commits intocadence-workflow:masterfrom
Assem-Uber:feature/15220/support-optional-fields-in-start-wf-api

Conversation

@Assem-Uber
Copy link
Contributor

@Assem-Uber Assem-Uber commented Sep 15, 2025

Summary
Add following fields to start API:

  • Header
  • Memo
  • SearchAttributes
  • Retry Policy
  • WorkflowIdReusePolicy

Changes

  • Add fields to schema
  • Pass fields to the startEndpoint
  • Make log function switch between info & error based on the error type

Test
Locally through Form

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR extends the start workflow API to support additional workflow configuration fields including Header, Memo, SearchAttributes, Retry Policy, and WorkflowIdReusePolicy. It also improves error handling by differentiating between duplicate workflow errors and other errors in logging.

  • Add support for 5 new workflow configuration fields in the API schema and request handling
  • Implement conditional logging that uses info level for duplicate workflow errors instead of error
  • Add comprehensive test coverage for all new fields with proper data transformation verification

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/utils/grpc/grpc-error.ts Maps ALREADY_EXISTS gRPC status to HTTP 409 for duplicate workflow handling
src/route-handlers/start-workflow/start-workflow.ts Processes new workflow fields and implements conditional error logging
src/route-handlers/start-workflow/start-workflow.constants.ts Defines valid WorkflowIdReusePolicy enum values
src/route-handlers/start-workflow/schemas/start-workflow-request-body-schema.ts Adds validation schemas for new workflow configuration fields
src/route-handlers/start-workflow/tests/start-workflow.node.ts Adds comprehensive test coverage for all new fields with proper assertions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Assem-Uber and others added 2 commits September 15, 2025 17:18
Signed-off-by: Assem Hafez <assem.hafez@uber.com>
@Assem-Uber Assem-Uber merged commit c0e0564 into cadence-workflow:master Sep 16, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants