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

Tasks: restore expanded example from PR #7025 after synth. #7062

Merged
merged 1 commit into from Jan 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 20 additions & 11 deletions tasks/google/cloud/tasks_v2beta3/gapic/cloud_tasks_client.py
Expand Up @@ -434,15 +434,15 @@ def create_queue(
>>>
>>> # Initialize `queue`:
>>> queue = {
>>> # The fully qualified path to the queue
>>> 'name': client.queue_path('[PROJECT]', '[LOCATION]', '[NAME]'),
>>> 'app_engine_http_queue': {
>>> 'app_engine_routing_override': {
>>> # The App Engine service that will receive the tasks.
>>> 'service': 'default',
>>> },
>>> },
>>> }
... # The fully qualified path to the queue
... 'name': client.queue_path('[PROJECT]', '[LOCATION]', '[NAME]'),
... 'app_engine_http_queue': {
... 'app_engine_routing_override': {
... # The App Engine service that will receive the tasks.
... 'service': 'default',
... },
... },
... }
>>>
>>> response = client.create_queue(parent, queue)

Expand Down Expand Up @@ -539,8 +539,17 @@ def update_queue(
>>>
>>> client = tasks_v2beta3.CloudTasksClient()
>>>
>>> # TODO: Initialize `queue`:
>>> queue = {}
>>> # Initialize `queue`:
>>> queue = {
... # The fully qualified path to the queue
... 'name': client.queue_path('[PROJECT]', '[LOCATION]', '[NAME]'),
... 'app_engine_http_queue': {
... 'app_engine_routing_override': {
... # The App Engine service that will receive the tasks.
... 'service': 'default',
... },
... },
... }
>>>
>>> response = client.update_queue(queue)

Expand Down
10 changes: 5 additions & 5 deletions tasks/synth.metadata
@@ -1,19 +1,19 @@
{
"updateTime": "2018-12-18T13:27:29.496588Z",
"updateTime": "2019-01-05T18:32:56.245650Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.16.3",
"dockerImage": "googleapis/artman@sha256:bfb92654b4a77368471f70e2808eaf4e60f263b9559f27bb3284097322787bf1"
"version": "0.16.4",
"dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "c04bc0dc0a9164d924a9ab923fd6845b4ae6a7ab",
"internalRef": "225851467"
"sha": "a111a53c0c6722afcd793b64724ceef7862db5b9",
"internalRef": "227896184"
}
},
{
Expand Down
38 changes: 23 additions & 15 deletions tasks/synth.py
Expand Up @@ -34,13 +34,6 @@

s.copy(library, excludes=excludes)

# Fix unindentation of bullet list second line
s.replace(
f"google/cloud/tasks_{version}/gapic/cloud_tasks_client.py",
"( \* .*\n )([^\s*])",
"\g<1> \g<2>",
)

s.replace(
f"google/cloud/tasks_{version}/gapic/cloud_tasks_client.py",
"(Google IAM .*?_) ",
Expand All @@ -50,20 +43,35 @@
# Issues with Anonymous ('__') links. Change to named.
s.replace(f"google/cloud/tasks_{version}/proto/*.py", ">`__", ">`_")

# Issue in v2beta2
s.replace(
f"google/cloud/tasks_v2beta2/gapic/cloud_tasks_client.py",
r'(Sample filter \\"app_engine_http_target: )\*\\".',
'\g<1>\\*\\".',
)

# Wrapped link fails due to space in link (v2beta2)
s.replace(
f"google/cloud/tasks_v2beta2/proto/queue_pb2.py",
"google/cloud/tasks_v2beta2/proto/queue_pb2.py",
"(uests in queue.yaml/xml) <\n\s+",
"\g<1>\n <",
)

# Restore updated example from PR #7025.
s.replace(
"google/cloud/tasks_v2beta3/gapic/cloud_tasks_client.py",
">>> # TODO: Initialize `queue`:",
">>> # Initialize `queue`:",
)
s.replace(
"google/cloud/tasks_v2beta3/gapic/cloud_tasks_client.py",
"^(\s+)>>> queue = {}\n",
"\g<1>>>> queue = {\n"
"\g<1>... # The fully qualified path to the queue\n"
"\g<1>... 'name': client.queue_path('[PROJECT]', '[LOCATION]', '[NAME]'),\n"
"\g<1>... 'app_engine_http_queue': {\n"
"\g<1>... 'app_engine_routing_override': {\n"
"\g<1>... # The App Engine service that will receive the tasks.\n"
"\g<1>... 'service': 'default',\n"
"\g<1>... },\n"
"\g<1>... },\n"
"\g<1>... }\n"
)


# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
Expand Down