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

Service Account needs Cloud Tasks Task Deleter role #44

Closed
s1351 opened this issue Mar 5, 2022 · 1 comment
Closed

Service Account needs Cloud Tasks Task Deleter role #44

s1351 opened this issue Mar 5, 2022 · 1 comment

Comments

@s1351
Copy link

s1351 commented Mar 5, 2022

When the handle-task route is called the task itself is executed succesfully.

But each "succesful" execution gives the following 500 error:

The principal (user or service account) lacks IAM permission "cloudtasks.tasks.delete"

Apparently gcloud wants to delete the task after completing it, when this fails this causes the task to be repeatedly called until the Max attempts limit is reached.

Adding the Cloud Tasks Task Deleter role to the Service Account resolved the issue for me.

But is this the expected behavior? If so this role should be added to the required roles in the readme.

@marickvantuil
Copy link
Member

Added the Cloud Tasks Task Deleter bit to the README, it is indeed necessary for the package!

However, I am confused why the job is being deleted. As far as I am aware, this should only happen when the job has reached the max attempts (retry time or max tries). This is all part of the inner workings of the Laravel queue: markJobAsFailedIfAlreadyExceedsMaxAttempts (checks before job is executed) and markJobAsFailedIfWillExceedMaxAttempts (checks after job is executed). If it's possible to share more of the used queue settings, that would make it easier to find the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants