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

refactor!(NODE-3427): remove md5 hashing from GridFS API #2899

Merged
merged 5 commits into from
Jul 12, 2021

Conversation

nbbeeken
Copy link
Contributor

@nbbeeken nbbeeken commented Jul 9, 2021

If you view the second commit forward you can get the reasonable looking diff, I first did some legacy clean up ensured the tests still worked without changes, then commiting that, made the drivers changes and fixed the test failures as a result.

NODE-3427

Comment on lines +1229 to +1231
const specKeys = Object.keys(specDoc)
.filter(key => key !== 'md5')
.sort();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's new spec tests that omit the md5 property for us, we should use those, but we are also behind on our GridFS sync so I defer that to later work.

@@ -9,7 +9,7 @@ import { MongoClient } from './mongo_client';
import { Db } from './db';
import { Collection } from './collection';
import { Logger } from './logger';
import { GridFSBucket } from './gridfs-stream';
import { GridFSBucket } from './gridfs';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can revert this, I figured now that its our only "gridfs" no need to name it after its implementation detail

Comment on lines -32 to -39
_id: GridFSBucketWriteStream['id'];
length: GridFSBucketWriteStream['length'];
chunkSize: GridFSBucketWriteStream['chunkSizeBytes'];
md5?: string;
filename: GridFSBucketWriteStream['filename'];
contentType?: GridFSBucketWriteStream['options']['contentType'];
aliases?: GridFSBucketWriteStream['options']['aliases'];
metadata?: GridFSBucketWriteStream['options']['metadata'];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We just don't do this anywhere else, so consistency

test/functional/gridfs_stream.test.js Outdated Show resolved Hide resolved
test/functional/gridfs_stream.test.js Outdated Show resolved Hide resolved
test/functional/gridfs_stream.test.js Outdated Show resolved Hide resolved
test/functional/gridfs_stream.test.js Outdated Show resolved Hide resolved
test/functional/gridfs_stream.test.js Outdated Show resolved Hide resolved
test/functional/gridfs_stream.test.js Outdated Show resolved Hide resolved
test/functional/gridfs_stream.test.js Outdated Show resolved Hide resolved
test/functional/gridfs_stream.test.js Outdated Show resolved Hide resolved
test/functional/gridfs_stream.test.js Outdated Show resolved Hide resolved
test/functional/gridfs_stream.test.js Outdated Show resolved Hide resolved
@dariakp dariakp added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jul 12, 2021
@dariakp dariakp self-assigned this Jul 12, 2021
@nbbeeken nbbeeken requested a review from dariakp July 12, 2021 18:55
@dariakp dariakp marked this pull request as ready for review July 12, 2021 19:27
@dariakp dariakp added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Jul 12, 2021
@dariakp dariakp requested review from a team, emadum and W-A-James and removed request for a team and W-A-James July 12, 2021 19:28
@dariakp dariakp merged commit a488d88 into 4.0 Jul 12, 2021
@dariakp dariakp deleted the NODE-3427/removeMD5Hash branch July 12, 2021 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants