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

feat: expose package version on MongoClient #2709

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Contributor

Description

Provide the current package version statically. The idea here is to use this to solve NODE-3043, by allowing mongodb-client-encryption to pass the correct options for a specific driver version.

If this is merged, I’ll make the corresponding change in the libmongocrypt repository. If you think that this is not a good approach, that’s very much okay and you can just go ahead and close this in that case.

@addaleax addaleax changed the base branch from master to 4.0 January 20, 2021 14:26
Provide the current package version statically.
The idea here is to use this to solve NODE-3043, by allowing
mongodb-client-encryption to pass the correct options for
a specific driver version.
@addaleax
Copy link
Contributor Author

(Just forced-pushed this and #2710 to kick off evergreen)

@emadum emadum requested review from emadum, nbbeeken and durran January 21, 2021 13:54
@durran
Copy link
Member

durran commented Jan 21, 2021

@addaleax This seems a reasonable change here, but just a quick question... If I am looking at this correctly is it the intention that libmongocrypt will now with this change keep a map of sorts to map valid driver options to the driver version? If so, it seems that may be better placed in the driver itself, since those options are not specific to FLE but the core driver. What do you think?

@addaleax
Copy link
Contributor Author

@durran Basically, yes - for the 4.0 driver, libmongocrypt would omit the now-removed options.

If so, it seems that may be better placed in the driver itself, since those options are not specific to FLE but the core driver.

I'm ultimately happy with any solution here. If you are suggesting to list all valid options in a programmatically accessible way, then I think that's great to have either way, and also something that would solve this problem on the FLE side. The FLE addon would still have to do some version-specific code, because no published version of the driver provides a list like that (as far as I know, that is).

@nbbeeken
Copy link
Contributor

As discussed in sync meeting, closing this in favor of #2713 which reintroduces the options that mongo-client-encryptions uses, this will allow existing versions to keep working with version 4.0 of the driver. Thank you for your help in getting to the bottom of the breakage 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants