Skip to content

fix(storage): fix request token passing for Copier.Run#6863

Merged
tritone merged 3 commits intogoogleapis:mainfrom
BrennaEpp:fix-copy
Oct 14, 2022
Merged

fix(storage): fix request token passing for Copier.Run#6863
tritone merged 3 commits intogoogleapis:mainfrom
BrennaEpp:fix-copy

Conversation

@BrennaEpp
Copy link
Copy Markdown
Contributor

This fixes infinite retry issues.

Will follow up with tests to catch this behaviour.

Fixes #6857

@BrennaEpp BrennaEpp requested review from a team October 14, 2022 00:51
@product-auto-label product-auto-label Bot added size: xs Pull request size is extra small. api: storage Issues related to the Cloud Storage API. labels Oct 14, 2022
@BrennaEpp BrennaEpp requested a review from tritone October 14, 2022 00:52
Copy link
Copy Markdown
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

Comment thread storage/copy.go
return nil, err
}
c.RewriteToken = res.token
req.token = res.token
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You actually need to leave the update of c.RewriteToken as well -- this is an exported field of Copier and the user might use this to resume the copy if it's interrupted.

@BrennaEpp BrennaEpp requested a review from tritone October 14, 2022 17:39
@tritone tritone merged commit faaab06 into googleapis:main Oct 14, 2022
@BrennaEpp BrennaEpp deleted the fix-copy branch October 18, 2022 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. size: xs Pull request size is extra small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

storage: CopierFrom large files, progress resets and copy never finishes

2 participants