Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Oct 14, 2022

Conversation

BrennaEpp
Copy link
Contributor

This fixes infinite retry issues.

Will follow up with tests to catch this behaviour.

Fixes #6857

@BrennaEpp BrennaEpp requested review from a team as code owners 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
Copy link
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!

@@ -126,7 +126,7 @@ func (c *Copier) Run(ctx context.Context) (attrs *ObjectAttrs, err error) {
if err != nil {
return nil, err
}
c.RewriteToken = res.token
req.token = res.token
Copy link
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.

@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