-
Notifications
You must be signed in to change notification settings - Fork 389
Closed
googleapis/gcs-resumable-upload
#243Labels
🚨This issue needs some love.This issue needs some love.api: storageIssues related to the googleapis/nodejs-storage API.Issues related to the googleapis/nodejs-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.status: blockedResolving the issue is dependent on other work.Resolving the issue is dependent on other work.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Blocked
- fix: make cache key unique by including generation gcs-resumable-upload#243
- feat: allow removing cache file gcs-resumable-upload#244
I'm using file('example', { generation: 0 }).save()
and discovered a strange behavior. I've managed to get resumable saves stuck in my config store, and as a result, when I subsequently invoke file('example').save()
, the ifGenerationMatch
header is still present on the response.
This is caused by the resumable upload code, which is turned on by default. I'm not sure whether the bug is here or in that library.
Steps to reproduce:
const bucket = new Storage({ projectId }).bucket(bucketName)
await bucket.file('example').save('hello', { resumable: false })
try {
await bucket.file('example', { generation: 0 }).save('hello')
} catch (e) {
// Catch a precondition failure
}
// Saves a new version as expected.
await bucket.file('example').save('hello', { resumable: false })
// Expected to save a new version, but throws precondition failure
await bucket.file('example').save('hello')
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: storageIssues related to the googleapis/nodejs-storage API.Issues related to the googleapis/nodejs-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.status: blockedResolving the issue is dependent on other work.Resolving the issue is dependent on other work.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.