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

Add support for MongoDB 6.0 data sources #5843

Closed
wants to merge 1 commit into from

Conversation

pimpreneil
Copy link

What type of PR is this?

  • Refactor
  • Feature
  • 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)
  • Manually
  • N/A

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

@pimpreneil
Copy link
Author

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.

@PatrickBig
Copy link

PatrickBig commented Jan 30, 2023

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

@kausikram
Copy link

Can this PR get some love please :)

@aashishvanand
Copy link

Any updates on this?

@justinclift
Copy link
Member

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. 😄

@justinclift justinclift closed this Jul 7, 2023
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.

6 participants