Skip to content

feat(cloud): add --wait flag to subscription commands #192

@joshrotenberg

Description

@joshrotenberg

Summary

Add --wait flag support to Cloud subscription operations that return task IDs, building on the foundation established in #191.

Part of #175

Background

Subscription operations are asynchronous and return task IDs. With the async_utils module now in place from #191, we can extend the --wait functionality to these commands.

Commands to Update

Subscription Operations

  • cloud subscription create - Creating subscriptions
  • cloud subscription update - Updating subscription configuration
  • cloud subscription delete - Deleting subscriptions

Implementation Notes

  1. Update CLI enum in cli.rs to add AsyncOperationArgs via #[command(flatten)]
  2. Update command handlers in subscription.rs to pass async_ops parameter
  3. Update implementation functions in subscription_impl.rs to use handle_async_response()
  4. Follow the same pattern as database commands in feat(cloud): add --wait flag to async database operations #191

Example Usage

# Create subscription and wait for completion
redisctl cloud subscription create --data @config.json --wait

# Delete subscription with custom timeout
redisctl cloud subscription delete 123 --wait --wait-timeout 600

Acceptance Criteria

  • All 3 subscription commands support --wait flag
  • Progress indicators show during wait
  • Timeout and interval options work correctly
  • Existing behavior unchanged when --wait not specified
  • Help text updated for all commands

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions