Skip to content

Gracefully handle empty bulk scheduled deletes#3279

Merged
mrkaye97 merged 3 commits intohatchet-dev:mainfrom
avirajkhare00:issue-3269-bulk-delete-scheduled
Mar 15, 2026
Merged

Gracefully handle empty bulk scheduled deletes#3279
mrkaye97 merged 3 commits intohatchet-dev:mainfrom
avirajkhare00:issue-3269-bulk-delete-scheduled

Conversation

@avirajkhare00
Copy link
Contributor

Summary

  • return 200 for filter-based bulk scheduled deletes when the filter matches no scheduled runs
  • preserve per-item errors when a filter only finds non-API scheduled runs
  • add targeted handler tests for empty filter matches and the missing ids/filter validation path

Fixes #3269

Testing

  • go test ./api/v1/server/handlers/workflows/...

@vercel
Copy link

vercel bot commented Mar 14, 2026

@avirajkhare00 is attempting to deploy a commit to the Hatchet Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@mrkaye97 mrkaye97 left a comment

Choose a reason for hiding this comment

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

thanks for this change! I left one small comment on existing patterns, but broadly looks great 👍

Comment on lines 9 to 23
config *server.ServerConfig
workflowSchedules v1.WorkflowScheduleRepository
}

func NewWorkflowService(config *server.ServerConfig) *WorkflowService {
var workflowSchedules v1.WorkflowScheduleRepository
if config != nil && config.V1 != nil {
workflowSchedules = config.V1.WorkflowSchedules()
}

return &WorkflowService{
config: config,
config: config,
workflowSchedules: workflowSchedules,
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

let's not do this - I agree that this is a clean approach, but we don't have this pattern anywhere else so I'd prefer to be consistent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updating PR

@avirajkhare00 avirajkhare00 requested a review from mrkaye97 March 14, 2026 22:13
@avirajkhare00 avirajkhare00 requested a review from mrkaye97 March 14, 2026 23:47
Copy link
Contributor

@mrkaye97 mrkaye97 left a comment

Choose a reason for hiding this comment

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

great stuff! will let CI pass and then merge - thanks for the fix!

@mrkaye97 mrkaye97 merged commit 69ef87a into hatchet-dev:main Mar 15, 2026
45 of 46 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.

[FEAT] Gracefully handle missing ids in bulk_delete_scheduled

2 participants