Skip to content

feat: [Cadence Schedules] Add schedule API request/response types#7749

Merged
abhishekj720 merged 1 commit intomasterfrom
schedule-2
Feb 26, 2026
Merged

feat: [Cadence Schedules] Add schedule API request/response types#7749
abhishekj720 merged 1 commit intomasterfrom
schedule-2

Conversation

@abhishekj720
Copy link
Contributor

What changed?

  • Add request/response types for all Schedule CRUD and lifecycle APIs (Create, Describe, Update, Delete, Pause, Unpause, List, Backfill) in common/types/schedule_service.go
  • Add ScheduleListEntry for paginated list responses
  • Include nil-safe getters for every field on every type, consistent
    with existing patterns in common/types/shared.go
  • Add schedule_service_test.go with nil-receiver and value getter tests

Why?
To support the new Cadence Schedules feature (pause/resume, catch-up, backfill), we need internal Go types to represent schedule entities within the server codebase. These types mirror the IDL definitions. This serves as the foundation for the scheduler workflow and API implementation.

Builds on #7745 which introduced the core schedule types and enums.

How did you test it?
Added unit tests and ran go test ./.. on the added files

Potential risks
N/A

Release notes
Added request/response types for cadence schedules

Documentation Changes
N/A


Reviewer Validation

PR Description Quality (check these before reviewing code):

  • "What changed" provides a clear 1-2 line summary
    • Project Issue is linked
  • "Why" explains the full motivation with sufficient context
  • Testing is documented:
    • Unit test commands are included (with exact go test invocation)
    • Integration test setup/commands included (if integration tests were run)
    • Canary testing details included (if canary was mentioned)
  • Potential risks section is thoughtfully filled out (or legitimately N/A)
  • Release notes included if this completes a user-facing feature
  • Documentation needs are addressed (or noted if uncertain)

Signed-off-by: abhishek.jha <abhishek.jha@uber.com>
@gitar-bot
Copy link

gitar-bot bot commented Feb 26, 2026

Code Review ✅ Approved 1 resolved / 1 findings

Previous finding (missing Memo/SearchAttributes on Describe and Update types) has been resolved — fields, getters, and test coverage all added. No new issues found in this well-structured, pattern-consistent set of schedule API types.

✅ 1 resolved
Bug: Memo/SearchAttributes missing from Describe and Update types

📄 common/types/schedule_service.go:147 📄 common/types/schedule_service.go:191 📄 common/types/schedule_service.go:64
CreateScheduleRequest accepts schedule-level Memo and SearchAttributes fields (lines 70-71), but these fields are absent from both DescribeScheduleResponse and UpdateScheduleRequest. This creates an asymmetric API contract:

  • DescribeScheduleResponse (line 147): A schedule created with Memo/SearchAttributes cannot have those fields retrieved via Describe. These are distinct from the workflow-level Memo/SearchAttributes inside StartWorkflowAction — they represent schedule metadata.
  • UpdateScheduleRequest (line 191): A schedule's Memo/SearchAttributes cannot be modified after creation.

This means data that can be written at creation time becomes inaccessible and immutable, which is likely unintentional. When handlers are implemented, the Describe API won't be able to return the full schedule configuration, and the Update API won't be able to modify these fields.

Suggested fix: Add Memo and SearchAttributes fields (with the same json:"-" PII filtering) to both DescribeScheduleResponse and UpdateScheduleRequest, along with corresponding getter methods.

Rules ❌ No requirements met

Repository Rules

GitHub Issue Linking Requirement: Add GitHub issue link to PR description (e.g., 'Fixes #XXXX' or 'Relates to #XXXX')

2 rules not applicable. Show all rules by commenting gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@abhishekj720 abhishekj720 merged commit d664d83 into master Feb 26, 2026
75 checks passed
@abhishekj720 abhishekj720 deleted the schedule-2 branch February 26, 2026 20:03
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.

2 participants