Skip to content

Unable to set httpTarget update mask in gRPC scheduler client #604

@bcoe

Description

@bcoe

There is an odd issue occurring, in which setting the httpTarget update mask on the scheduler client results in the following exception:

Error: 3 INVALID_ARGUMENT: Invalid mask for Job: httpTarget at Object.callErrorFromStatus (/workspace/node_modules/@grpc/grpc-js/build/src/call.js:31:26) at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client.js:179:52) at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141) at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181) at /workspace/node_modules/@grpc/grpc-js/build/src/call-stream.js:145:78 at processTicksAndRejections (internal/process/task_queues.js:79:11)

Similar code in the Python gRPC client succeeds:

from google.cloud import scheduler_v1beta1
from google.protobuf.field_mask_pb2 import FieldMask
 
job_id="http_job"
location="us-central1"
project="ekaramad-playground"
 
job_name=f"projects/{project}/locations/{location}/jobs/{job_id}"
 
client = scheduler_v1beta1.CloudSchedulerClient()
 
job = client.get_job(name=job_name)
print(job)
# client.update_job(job={'name': job_name, 'http_target': {'uri': 'https://www4.google.ca'}})
mask = FieldMask()
mask.FromJsonString('httpTarget')
client.update_job(job=job, update_mask=mask)

This makes me think the issue is potentially a problem with the generator.

CC: @averikitsch

Metadata

Metadata

Assignees

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions