google-cloud-tasks

cloudtasks.CreateTask fails: `lacks IAM permission “cloudtasks.tasks.create”` even though my account has that permission

让人想犯罪 __ 提交于 2021-02-11 16:42:23
问题 I'm following the Creating HTTP Target tasks guide. When I run the code posted below I get this error: cloudtasks.CreateTask: rpc error: code = PermissionDenied desc = The principal (user or service account) lacks IAM permission "cloudtasks.tasks.create" for the resource "projects/my_project/locations/europe-west1/queues/my_queue" (or the resource may not exist). I have signed in with gcloud auth login my@email.com . my@email.com has the following permissions set by my custom cloud task role:

DEADLINE_EXCEEDED while adding tasks to Google Cloud Tasks

試著忘記壹切 提交于 2021-01-29 21:54:53
问题 I'm occasionally getting an error called DEADLINE_EXCEEDED while adding tasks to Google Cloud Tasks from Node.js client. It's only 17 tasks that I tried to add in a for-loop. Not sure why this is happening occasionally and sometimes works perfectly fine! Here is the detailed error log: Error: 4 DEADLINE_EXCEEDED: Deadline exceeded at Object.callErrorFromStatus (/Users/gijo/Desktop/workspace/flying-press-server/node_modules/@grpc/grpc-js/build/src/call.js:30:26) at Object.onReceiveStatus (

Facing challenge to invoke cloud Function from cloud task using oidcToken

て烟熏妆下的殇ゞ 提交于 2020-12-15 01:38:42
问题 I am facing challenge to invoke cloud Function from cloud task using oidcToken . Here are details of my IAM & Code: const { CloudTasksClient } = require('@google-cloud/tasks'); const client = new CloudTasksClient(); //See https://cloud.google.com/tasks/docs/tutorial-gcf module.exports = async (payload, scheduleTimeInSec) => { const project = process.env.GOOGLE_APPLICATION_PROJECTID; const queue = process.env.QUEUE_NAME; const location = process.env.QUEUE_LOCATION; const callBackUrl = https:/

Facing challenge to invoke cloud Function from cloud task using oidcToken

青春壹個敷衍的年華 提交于 2020-12-15 01:37:09
问题 I am facing challenge to invoke cloud Function from cloud task using oidcToken . Here are details of my IAM & Code: const { CloudTasksClient } = require('@google-cloud/tasks'); const client = new CloudTasksClient(); //See https://cloud.google.com/tasks/docs/tutorial-gcf module.exports = async (payload, scheduleTimeInSec) => { const project = process.env.GOOGLE_APPLICATION_PROJECTID; const queue = process.env.QUEUE_NAME; const location = process.env.QUEUE_LOCATION; const callBackUrl = https:/

Google Cloud Tasks HTTP trigger - how to disable retry

偶尔善良 提交于 2020-08-06 05:09:03
问题 I'm trying to create a Cloud Tasks queue that never retries if an HTTP task fails. According to the documentation, maxAttempts should be what I'm looking for: Number of attempts per task. Cloud Tasks will attempt the task maxAttempts times (that is, if the first attempt fails, then there will be maxAttempts - 1 retries). Must be >= -1. So, if maxAttempts is 1, there should be 0 retries. But, for example, if I run gcloud tasks queues create test-queue --max-attempts=1 --log-sampling-ratio=1.0

Google Cloud Tasks HTTP trigger - how to disable retry

泪湿孤枕 提交于 2020-08-06 05:07:27
问题 I'm trying to create a Cloud Tasks queue that never retries if an HTTP task fails. According to the documentation, maxAttempts should be what I'm looking for: Number of attempts per task. Cloud Tasks will attempt the task maxAttempts times (that is, if the first attempt fails, then there will be maxAttempts - 1 retries). Must be >= -1. So, if maxAttempts is 1, there should be 0 retries. But, for example, if I run gcloud tasks queues create test-queue --max-attempts=1 --log-sampling-ratio=1.0