Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add batch activity unpause. #747

Merged
merged 3 commits into from
Feb 5, 2025
Merged

Add batch activity unpause. #747

merged 3 commits into from
Feb 5, 2025

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 josh-berry, cretz and bergundy 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.

temporalcli/commands.activity_test.go Show resolved Hide resolved
temporalcli/commands.activity_test.go Show resolved Hide resolved
temporalcli/commandsgen/commands.yml Outdated Show resolved Hide resolved
@ychebotarev ychebotarev requested a review from cretz February 5, 2025 17:19
Copy link
Member

@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
Member

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
Member

@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