Add idempotency token modified#9
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for an idempotency token header (X-Goog-Gcs-Idempotency-Token) in ApiCommand for Google Cloud Storage requests, controlled by a new configuration option add_idempotency_token_header. Feedback on the changes highlights a critical issue where defining INVOCATION_ID as a class-level constant causes all API requests to share the same ID, defeating its purpose; using a lazy-loaded instance variable is recommended instead. Additionally, the reviewer suggests lazy-loading the @idempotency_token to avoid unnecessary allocations, using safe navigation to prevent potential NoMethodErrors, and optimizing hash checks by avoiding .keys.any?.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for sending an idempotency token header (X-Goog-Gcs-Idempotency-Token) in API commands, enabled by default via the new add_idempotency_token_header option. It also caches the invocation ID (@invocation_id) to ensure consistency across retries. Feedback points out that caching the invocation ID can lead to duplicate gccl-invocation-id values in the X-Goog-Api-Client header if prepare! is called multiple times, and suggests updating set_api_client_header to filter out existing invocation IDs.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
No description provided.