Skip to content

Add optional signed_audience flag #114

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

Merged
merged 12 commits into from
Jul 2, 2023

Conversation

Tarpsvo
Copy link
Contributor

@Tarpsvo Tarpsvo commented Jun 29, 2023

Fix for #113

This fixes issues with some Cloud Run setups where providing the audience to the OidcToken causes the queue runners to receive 401 when trying to POST to Cloud Run instances.

$httpRequest->setOidcToken($token);

if ($availableAt > time()) {
$task->setScheduleTime(new Timestamp(['seconds' => $availableAt]));
}

$createdTask = CloudTasksApi::createTask($queueName, $task);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable was unused.

@Tarpsvo Tarpsvo changed the title Fix #113 Add optional signed_audience flag Add optional signed_audience flag Jun 29, 2023
@Tarpsvo
Copy link
Contributor Author

Tarpsvo commented Jun 30, 2023

Added a second fix as well - task name sanitization failed when the task was a closure. See error below:

  Task ID \"Closure (CreateMissingProductsFromErplyAction.php:70)-0b31fdb7-b683-431b-8e90-487020684351-1688131669\" can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). Task ID must between 1 and 500 characters.",  

@marickvantuil marickvantuil merged commit 48d5402 into stackkit:master Jul 2, 2023
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

Successfully merging this pull request may close these issues.

2 participants