redash
redash copied to clipboard
Add support for MongoDB 6.0 data sources
What type of PR is this?
- [ ] Refactor
- [ ] Feature
- [x] Bug Fix
- [ ] New Query Runner (Data Source)
- [ ] New Alert Destination
- [ ] Other
Description
Because of the use of an outdated of the pymongo lib, Redash is not compatible with the latest stable release of MongoDB: MongoDB 6.0+
How is this tested?
- [ ] Unit tests (pytest, jest)
- [ ] E2E Tests (Cypress)
- [x] Manually
- [ ] N/A
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Note that it seems that this modification breaks the "schema" pane displayed when editing a query. It is not preventing you from write your query though, just the schema is not displayed and a "Schema refresh failed" error is displayed.
Note that it seems that this modification breaks the "schema" pane displayed when editing a query. It is not preventing you from write your query though, just the schema is not displayed and a "Schema refresh failed" error is displayed.
That is because pymongo deprecated db.collection_names()
in favor of db.list_collection_names()
in the latest version jump.
To fix it update the query runner for mongodb in redash\query_runner\mongodb.py
The deprecated function is used in get_schema
Can this PR get some love please :)
Any updates on this?
Closing this because we merged the newer Mongo library in #5970.
Thanks for taking the time and effort to creating this PR though @pimpreneil. Things should start getting reviewed and taken care of faster from here on in now. :smile: