CARVIEW |
Select Language
HTTP/2 200
date: Fri, 25 Jul 2025 18:56:48 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/googleapis/google-api-go-client.git
etag: W/"fa09d6f40b51d7d23c5b57b72ca77d4c"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=cXsQke2OwGeymxVCC%2FJuLz6fA89Vhw8m1%2Fv1PsUrEb0TJ5UQKcxgcGDOG3fTy3xR6MlAAPNjt6PPBw1paAdwwIXd23uHkEywEnxrCMLelzIhWtEt4t9w7RPTRp%2F6NHF1JFXM4rqSQJPVI8%2Ba2Hlp2e3cGxwUGc52Wea%2BOyDYQRW1V57YMhgn%2BvwSHY53f1B8JzdDA7aEkTk6DZOZEdIJVclVQWiHkfWN0jBgnXG3bpgN%2F2gUfF8QLDl1j%2FB7Pa6XrbcUNBj%2B0ukcHGOAJDyQMg%3D%3D--E3%2BK8ufhc%2FEK11XK--M2lU7m5Q3OA42Kt8M5vKSQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1967176619.1753469807; Path=/; Domain=github.com; Expires=Sat, 25 Jul 2026 18:56:47 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 25 Jul 2026 18:56:47 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: A370:32DF28:1F380:28434:6883D36F
fix(gensupport): update chunk upload logic for robust timeout handlin… · googleapis/google-api-go-client@93865aa · GitHub
Copy file name to clipboardExpand all lines: internal/gensupport/resumable.go
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit 93865aa
authored
fix(gensupport): update chunk upload logic for robust timeout handling. (#3208)
The ChunkTransferTimeout was previously initiated before reading the media chunk via Media.Chunk(). This caused the timeout to incorrectly include the media read time, leading to premature timeouts for uploads with slow media sources (e.g., slow disk I/O or slow write from application).
This change refactors the upload logic to apply the chunkRetryDeadline timer after the chunk has been read from Media.Chunk() and chunkTransferTimeout timeout only applies to the network request portion of the chunk transfer. The context.WithTimeout is now created within the transferChunk function, immediately before the doUploadRequest call, ensuring its scope is limited to the network round trip.
Additionally, this commit introduces additional unit test to validate the fix and prevent regressions:
A slow media read, which should now succeed.
A slow network response, which correctly continues to fail with a timeout.
Retries work as expected within chunkRetryDeadline.
Note: Testing of storage (unit tests, emulator test, integration tests) is done and results are attached in the bug.
Internal Bug: 4274909951 parent ceceb79 commit 93865aaCopy full SHA for 93865aa
File tree
Expand file treeCollapse file tree
2 files changed
+407
-157
lines changedFilter options
- internal/gensupport
Expand file treeCollapse file tree
2 files changed
+407
-157
lines changedinternal/gensupport/resumable.go
Copy file name to clipboardExpand all lines: internal/gensupport/resumable.go+121-131Lines changed: 121 additions & 131 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
126 | 126 |
| |
127 | 127 |
| |
128 | 128 |
| |
129 |
| - | |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 |
| - | |
134 |
| - | |
135 |
| - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
136 | 141 |
| |
137 | 142 |
| |
138 |
| - | |
| 143 | + | |
139 | 144 |
| |
140 | 145 |
| |
141 | 146 |
| |
| |||
149 | 154 |
| |
150 | 155 |
| |
151 | 156 |
| |
| 157 | + | |
| 158 | + | |
152 | 159 |
| |
153 |
| - | |
154 |
| - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
155 | 245 |
| |
156 |
| - | |
157 | 246 |
| |
158 | 247 |
| |
159 | 248 |
| |
160 |
| - | |
161 |
| - | |
162 | 249 |
| |
163 | 250 |
| |
164 | 251 |
| |
165 | 252 |
| |
166 | 253 |
| |
167 | 254 |
| |
168 | 255 |
| |
169 |
| - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
170 | 263 |
| |
171 |
| - | |
172 |
| - | |
173 |
| - | |
174 |
| - | |
175 |
| - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
176 | 269 |
| |
177 | 270 |
| |
178 | 271 |
| |
179 | 272 |
| |
180 | 273 |
| |
181 | 274 |
| |
182 |
| - | |
| 275 | + | |
183 | 276 |
| |
184 | 277 |
| |
185 | 278 |
| |
| 279 | + | |
186 | 280 |
| |
187 | 281 |
| |
188 | 282 |
| |
189 | 283 |
| |
190 |
| - | |
| 284 | + | |
191 | 285 |
| |
192 |
| - | |
193 |
| - | |
194 |
| - | |
195 |
| - | |
196 |
| - | |
197 |
| - | |
198 |
| - | |
199 |
| - | |
200 |
| - | |
201 |
| - | |
202 |
| - | |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
208 |
| - | |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - | |
249 | 286 |
| |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 |
| - | |
259 |
| - | |
260 |
| - | |
261 |
| - | |
262 |
| - | |
263 |
| - | |
264 |
| - | |
265 |
| - | |
266 |
| - | |
267 |
| - | |
268 |
| - | |
269 |
| - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
270 | 291 |
| |
271 | 292 |
| |
272 | 293 |
| |
273 |
| - | |
274 |
| - | |
275 |
| - | |
276 |
| - | |
277 |
| - | |
278 |
| - | |
279 |
| - | |
280 |
| - | |
281 |
| - | |
282 |
| - | |
283 |
| - | |
284 |
| - | |
285 |
| - | |
286 |
| - | |
287 |
| - | |
288 |
| - | |
289 |
| - | |
290 |
| - | |
291 |
| - | |
292 |
| - | |
293 |
| - | |
294 |
| - | |
295 |
| - | |
296 |
| - | |
297 |
| - | |
298 |
| - | |
299 |
| - | |
300 |
| - | |
301 |
| - | |
302 |
| - | |
303 |
| - | |
| 294 | + | |
304 | 295 |
| |
305 | 296 |
| |
306 |
| - | |
307 |
| - | |
| 297 | + | |
308 | 298 |
| |
309 | 299 |
|
You can’t perform that action at this time.
0 commit comments