feat(taskqueue): migrate push queue client to Cloud Tasks v2 while retaining v2beta3 for QueueStats - #160
Open
riddhi-shivhare wants to merge 1 commit into
Open
Conversation
…taining v2beta3 for QueueStats - Switch CloudTasksClient in task creation, batch creation, task deletion, and queue purge to tasks_v2. - Switch HttpMethod mappings in _build_ct_task_payload to tasks_v2.HttpMethod. - Update cloudtask_transactional payload construction and task dispatch to use tasks_v2.CloudTasksClient. - Retain tasks_v2beta3.CloudTasksClient in fetch_queue_stats_in_cloud_tasks as QueueStats is out of scope for v2 GA. - Add unit tests verifying tasks_v2 for mutations and tasks_v2beta3 for QueueStats.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR prepares the App Engine TaskQueue Python SDK for General Availability (GA) by transitioning Push Queue operations to the Google Cloud Tasks
v2client SDK, while retainingv2beta3exclusively forQueueStats.Changes Summary
Push Queue Operations (
cloudtask.py):_create_single_task_in_cloud_tasksand_create_batch_tasks_in_cloud_tasksto instantiatetasks_v2.CloudTasksClient().delete_tasks_in_cloud_tasksandpurge_queue_in_cloud_tasksto instantiatetasks_v2.CloudTasksClient()._build_ct_task_payloadHTTP method enum mapping to usetasks_v2.HttpMethod.Transactional Tasks (
cloudtask_transactional.py):from google.cloud import tasks_v2beta3withfrom google.cloud import tasks_v2.build_task_payload_for_transactional_task()anddispatch_task_payload()to instantiatetasks_v2.CloudTasksClient().Queue Statistics (
cloudtask.py):fetch_queue_stats_in_cloud_tasks()ontasks_v2beta3.CloudTasksClient().QueueStatsis out of scope for Cloud Tasks v2 GA and remains onv2beta3.taskqueue-migration-previewAPPENGINE_USE_CLOUDTASK_PUSH_QUEUEpreserved