Repository navigation
Remove mongomock dependency from mongo provider and introduce MongoDbContainer testcontainer for testing. - #53773
Merged
Merged
Conversation
gopidesupavan
requested review from
amoghrajesh,
eladkal,
jscheffl,
potiuk and
shahar1
July 25, 2025 21:41
gopidesupavan
force-pushed
the
unblock-pymongo
branch
from
July 25, 2025 21:42
1cd9ef4 to
5177598
Compare
gopidesupavan
commented
Jul 25, 2025
gopidesupavan
force-pushed
the
unblock-pymongo
branch
2 times, most recently
from
July 26, 2025 08:01
6dbf921 to
686fd25
Compare
eladkal
reviewed
Jul 26, 2025
gopidesupavan
force-pushed
the
unblock-pymongo
branch
from
July 26, 2025 09:36
686fd25 to
11cadbc
Compare
potiuk
approved these changes
Jul 26, 2025
potiuk
left a comment
Member
There was a problem hiding this comment.
Very cool. First use of testcontainers :). We could likely migrate some of our integration tests to use testcontainers!
Member
Author
yeah offcourse thats on my list to get it :) |
1 of 2 tasks
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes: #51972
closes: #52547
pymongo is restricted due to mongomock, as mongomock no longer maintained we should remove this dependency.
In place of mongomock, i am introducing to use
MongoDbContainertestcontainer , this is working nicely, theMongoDbContaineris very light weight, after addingMongoDbContainerto tests are working fine , now the total time taking for mongo test approx 1min, i think this fine to considering the fact we dont have any other option to mock the pymongo and we are testing mongo against real client it gives more confidence :)Bumped pymongo to latest version.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.