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(NODE-4738)!: remove dot notation support by default #3520

Merged
merged 12 commits into from
Jan 20, 2023

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Jan 11, 2023

Description

What is changing?

The Filter and UpdateFilter types have been reverted to pre-dot notation support.
Additionally, new types StrictUpdateFilter and StrictFilter are exported for consumption. These types are experimental and provide the same dot-notation functionality as version 4.13.0 of the driver but they are not used in any driver CRUD APIs.

Is there new documentation needed for these changes?

Yes.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson marked this pull request as ready for review January 12, 2023 13:08
etc/notes/CHANGES_5.0.0.md Outdated Show resolved Hide resolved
src/mongo_types.ts Outdated Show resolved Hide resolved
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jan 12, 2023
Co-authored-by: Durran Jordan <durran@gmail.com>
@baileympearson baileympearson requested a review from durran January 12, 2023 17:58
@durran durran added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Jan 13, 2023
durran
durran previously approved these changes Jan 13, 2023
@nbbeeken nbbeeken self-requested a review January 13, 2023 16:33
src/mongo_types.ts Outdated Show resolved Hide resolved
src/mongo_types.ts Outdated Show resolved Hide resolved
etc/notes/CHANGES_5.0.0.md Outdated Show resolved Hide resolved
etc/notes/CHANGES_5.0.0.md Outdated Show resolved Hide resolved
etc/notes/CHANGES_5.0.0.md Outdated Show resolved Hide resolved
etc/notes/CHANGES_5.0.0.md Outdated Show resolved Hide resolved
Co-authored-by: Neal Beeken <neal.beeken@mongodb.com>
nbbeeken
nbbeeken previously approved these changes Jan 19, 2023
durran
durran previously approved these changes Jan 19, 2023
etc/notes/CHANGES_5.0.0.md Outdated Show resolved Hide resolved
etc/notes/CHANGES_5.0.0.md Outdated Show resolved Hide resolved
etc/notes/CHANGES_5.0.0.md Outdated Show resolved Hide resolved
etc/notes/CHANGES_5.0.0.md Outdated Show resolved Hide resolved
etc/notes/CHANGES_5.0.0.md Outdated Show resolved Hide resolved
etc/notes/CHANGES_5.0.0.md Outdated Show resolved Hide resolved
durran and others added 2 commits January 19, 2023 20:43
Co-authored-by: Daria Pardue <daria.pardue@mongodb.com>
@baileympearson baileympearson dismissed stale reviews from durran and nbbeeken via 77112b6 January 19, 2023 21:57
@durran durran merged commit 26145df into mongodb:main Jan 20, 2023
@avaly
Copy link
Contributor

avaly commented Jan 24, 2023

@dariakp
Copy link
Contributor

dariakp commented Jan 24, 2023

@avaly Yes, we are aware - unfortunately there were a lot of unintended consequences in making this the default behavior, which is why we are preserving it in an opt-in capacity and will consider options for integrating it more naturally in the future. We are leaving it marked experimental because we have not had the opportunity to test it as thoroughly as something with such wide-reaching scope would merit. In retrospect, we should have taken the time to do a technical design to fully define the intended boundaries of the functionality - but we were excited and it did seem to "just work". We would like to take a step back now and give this feature the attention it deserves, which we cannot do right this moment. Until we are able to prioritize this work, we are definitely open to feedback from the community to help guide this in the right direction.

@avaly
Copy link
Contributor

avaly commented Jan 25, 2023

Thanks @dariakp for the message!

Will the mongodb team accept pull requests regarding these strict filter types? Or would you like to keep those as-is until the team has resources to make those a priority?

@dariakp
Copy link
Contributor

dariakp commented Jan 26, 2023

@avaly We are open to accepting PRs, with the caveat that as experimental features, triage and review of changes to these types will fall lower on our priority list than bugs or improvements to our officially supported features. However, our ultimate goal with these experimental types is to get them into a form that our users find most helpful, so we will consider all feedback we get: whether through PRs, Jira tickets, or comments.

One thing to keep in mind is that the current StrictFilter is intended to be strict on known schema fields, but to allow for unknown $-operators (because the driver does not attempt to exhaustively catalogue all available server-side operators), so improvements to that type would need to adhere to that design intent. If there is a use case for restricting the set of allowed operators, we are open to considering a separate experimental type.

@avaly
Copy link
Contributor

avaly commented Jan 27, 2023

Thanks again for the honest response.

We (at Plex) have build Papr with full type-safety in mind from day 0. That's why we opted to submit all these features upstream to the driver. But given these shifted priorities in the driver project, we will copy these types in our library code to be able to move faster (plexinc/papr#410).

@dariakp
Copy link
Contributor

dariakp commented Jan 31, 2023

@avaly We strive for transparency :) As far as dot notation support: we'll be sure to follow your version of the types and consider them in any future updates to ours. Thank you again for making the original contribution!

@avaly
Copy link
Contributor

avaly commented Feb 15, 2023

As mentioned previously, we're adopting these strict types in our Papr library to be able to iterate on them faster and introduce more strictness: plexinc/papr#430

@dariakp Would your team be interesting in getting some of these changes submitted in PRs here?

I know some changes will probably not be accepted (e.g. removing recursive types support), so I won't bother submitting those. But how about the other parts?

@dariakp
Copy link
Contributor

dariakp commented Feb 15, 2023

@avaly As long as they come with tests and don't run counter to the objectives I mentioned above for StrictFilter, we welcome any improvements to functionality :)

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.

5 participants