Skip to content

Add batch activity unpause.#747

Merged
ychebotarev merged 3 commits intonext-serverfrom
y_batch_unpause
Feb 5, 2025
Merged

Add batch activity unpause.#747
ychebotarev merged 3 commits intonext-serverfrom
y_batch_unpause

Conversation

@ychebotarev
Copy link
Contributor

@ychebotarev ychebotarev commented Feb 4, 2025

What was changed

Update "activity unpause" API to support batch operation.

Why?

Part of the activity API work.

Checklist

  1. Closes
    https://temporalio.atlassian.net/browse/OSS-3789

  2. How was this tested:

By adding test.

  1. Any docs updates needed?

Not yet.

@ychebotarev ychebotarev requested review from bergundy, cretz and josh-berry and removed request for josh-berry February 4, 2025 18:56
Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Approved with comments.

@ychebotarev ychebotarev requested a review from cretz February 5, 2025 17:19
Copy link
Contributor

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Just a curious question about --match-all, nothing blocking

Comment on lines +480 to +484
- name: match-all
type: bool
description: |
Every paused activity should be unpaused. This flag is ignored if
activity-type is provided. Can only be used with --query.
Copy link
Contributor

Choose a reason for hiding this comment

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

Question, what if activity-type is not provided and this is not set either, what is the default behavior?

Copy link
Contributor Author

@ychebotarev ychebotarev Feb 5, 2025

Choose a reason for hiding this comment

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

This:

	case BatchTypeUnpauseActivities:
		if params.UnpauseActivitiesParams.ActivityType == "" && !params.UnpauseActivitiesParams.MatchAll {
			return fmt.Errorf("must provide ActivityType or MatchAll flag")
		}

so basically the call will fail

Copy link
Contributor

@cretz cretz Feb 5, 2025

Choose a reason for hiding this comment

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

Can you make that clear in the CLI docs for users that one of these two is required when query is present? It was a bit hard to know from CLI help alone.

@ychebotarev ychebotarev merged commit 3afb5ad into next-server Feb 5, 2025
7 checks passed
@ychebotarev ychebotarev deleted the y_batch_unpause branch February 5, 2025 19:24
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.

4 participants