-
Notifications
You must be signed in to change notification settings - Fork 389
test: add conformance scenario 7 #1813
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
Conversation
Would one of you mind pulling this down and running it a few times? I was seeing some weirdness locally and wouldn't mind a fresh set of eyes. |
src/gcs-resumable-upload/index.ts
Outdated
} | ||
|
||
protected async createURIAsync(): Promise<string> { | ||
const metadata = this.metadata; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to make a copy of this object? The delete
s mutate the object
const metadata = this.metadata; | |
const metadata = {...this.metadata}; |
|
||
protected async createURIAsync(): Promise<string> { | ||
const metadata = this.metadata; | ||
const headers: gaxios.Headers = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outside of the assignments, I'm not seeing how this is used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops forgot to actually assign it. Thanks.
|
||
export async function bucketUploadResumable(bucket: Bucket) { | ||
if (bucket.instancePreconditionOpts) { | ||
delete bucket.instancePreconditionOpts.ifMetagenerationMatch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps a comment here - I'm not sure what happens if ifMetagenerationMatch
isn't deleted
I think I see what the problem might be. I am constantly overwriting the same file which might be causing parallel access issues. Fixing this now. |
chunkSize: CHUNK_SIZE_BYTES, | ||
metadata: {contentLength: FILE_SIZE_BYTES}, | ||
}); | ||
deleteTestFile(filePath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if the test file is not deleted? do we delete buckets as well? (i dont recall that we do)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cleaning up the local file not the file in GCS / emulator. I suppose it is unnecessary as everything will get wiped when the environment is torn down but I figured better to just clean it up anyway.
030fe3b
to
00fc65e
Compare
will re-implement on a more up-to-date branch |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕