Repository navigation
Conversation
This script demonstrates how to deduplicate retried Cloud Scheduler HTTP requests using Firestore, ensuring that duplicate job requests are handled appropriately. Per b/574556578
Add unit tests for deduplicating job requests handling.
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Code Review
This pull request introduces a Python snippet and corresponding unit tests demonstrating how to deduplicate retried Cloud Scheduler HTTP requests using Firestore. The feedback highlights a contradiction where manual runs (lacking the schedule time header) are rejected with a 400 error despite docstring claims, and suggests allowing them to run directly. Additionally, the reviewer recommends handling expired locks to prevent crashed jobs from blocking retries due to Firestore's asynchronous TTL deletion, along with adding unit tests to cover both scenarios.
Reordered import statements for consistency.
Added a link to the Cloud Scheduler documentation for deduplication.
|
Thanks @camiekim for this sample and for the docs page it supports. I've opened #14772 as a rewrite built on your work. You're credited as co-author, and it keeps the The main changes:
I also tested what the headers look like on each target type, which might be useful for the page:
If #14772 works for you, would you be open to closing this PR in favor of it? Feedback on the rewrite is very welcome. |
Description
Fixes b/574556578
Checklist
Testing
Compliance & Style
Post-Approval Actions