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

PYTHON-3668 Use polling SDAM mode on FaaS and add sdamMode=auto/stream/poll #1360

Merged
merged 12 commits into from
Oct 12, 2023

Conversation

ShaneHarvey
Copy link
Member

@ShaneHarvey ShaneHarvey commented Aug 21, 2023

https://jira.mongodb.org/browse/PYTHON-3668

The implementation of mongodb/specifications#1452.

  • Introduces sdamMode URI option.
  • Disable streaming on FaaS by default.
  • Resync SDAM and uri-options spec tests.
  • Update Lambda test to assert streaming is not used.

@ShaneHarvey ShaneHarvey requested a review from a team as a code owner August 21, 2023 23:21
@ShaneHarvey ShaneHarvey requested review from NoahStapp and removed request for a team August 21, 2023 23:21
Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM!

@blink1073
Copy link
Member

I'd say let's wait for consensus on mongodb/specifications#1452, and defer this to 4.6.

Copy link
Contributor

@NoahStapp NoahStapp left a comment

Choose a reason for hiding this comment

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

One minor typing comment.

@@ -669,6 +672,16 @@ def validate_datetime_conversion(option: Any, value: Any) -> Optional[DatetimeCo
raise TypeError(f"{option} must be a str or int representing DatetimeConversion")


def validate_sdam_mode(option: Any, value: Any) -> str:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is value annotated as Any for consistency with other validation methods? We're explicitly checking that value is one of three specific strings, which suggests it should be annotated as such.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call. Done.

pymongo/monitor.py Outdated Show resolved Hide resolved
@blink1073
Copy link
Member

I opened https://jira.mongodb.org/browse/PYTHON-3994 to track the docs failure.

@ShaneHarvey ShaneHarvey merged commit 4c00227 into mongodb:master Oct 12, 2023
@ShaneHarvey ShaneHarvey deleted the PYTHON-3668 branch October 16, 2023 17:20
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