Skip to content

Add exponential backoff handling for Google Sheets API requests#28985

Merged
ebyhr merged 1 commit intotrinodb:masterfrom
ebyhr:ebi/sheets-retry
Apr 6, 2026
Merged

Add exponential backoff handling for Google Sheets API requests#28985
ebyhr merged 1 commit intotrinodb:masterfrom
ebyhr:ebi/sheets-retry

Conversation

@ebyhr
Copy link
Copy Markdown
Member

@ebyhr ebyhr commented Apr 3, 2026

Description

Hope this change mitigates a flaky issue:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 
503 Service Unavailable
POST https://sheets.googleapis.com/v4/spreadsheets?fields=spreadsheetId
{
  "code" : 503,
  "errors" : [ {
    "domain" : "global",
    "message" : "The service is currently unavailable.",
    "reason" : "backendError"
  } ],
  "message" : "The service is currently unavailable.",
  "status" : "UNAVAILABLE"
}
	at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145)
	at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:118)
	at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:37)
	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$3.interceptResponse(AbstractGoogleClientRequest.java:479)
	at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1111)
	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:565)
	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:506)
	at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:616)
	at io.trino.plugin.google.sheets.TestGoogleSheets.createSpreadsheetWithTestdata(TestGoogleSheets.java:81)
	at io.trino.plugin.google.sheets.TestGoogleSheets.createQueryRunner(TestGoogleSheets.java:59)

[ERROR] Tests run: 12, Failures: 0, Errors: 1, Skipped: 0
[ERROR] TestGoogleSheets.createQueryRunner:59->createSpreadsheetWithTestdata:81 - GoogleJsonResponse 503 Service Unavailable
CI job: google-sheets-tests | Run: 23673083486 | Job: 68970575570

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@cla-bot cla-bot bot added the cla-signed label Apr 3, 2026
@github-actions github-actions bot added the google-sheets Google Sheets connector label Apr 3, 2026
@ebyhr ebyhr force-pushed the ebi/sheets-retry branch from e6a0a54 to 7c318f0 Compare April 3, 2026 03:09
@ebyhr ebyhr requested review from chenjian2664 and wendigo April 3, 2026 08:38
@ebyhr ebyhr merged commit 9b054ad into trinodb:master Apr 6, 2026
18 checks passed
@ebyhr ebyhr deleted the ebi/sheets-retry branch April 6, 2026 02:51
@github-actions github-actions bot added this to the 481 milestone Apr 6, 2026
@ebyhr ebyhr mentioned this pull request Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed google-sheets Google Sheets connector

Development

Successfully merging this pull request may close these issues.

3 participants